Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsCustomSrcs ¶
Types ¶
type BazelPackageTree ¶
type BazelPackageTree struct {
// contains filtered or unexported fields
}
BazelPackageTree is a representation of a filesystem tree specialized for filtering paths that are under a Bazel sub-package. It understands the file-based boundaries that represent a sub-package (a nested BUILD file). The nature of this data structure also enables us to remove duplicated paths.
func NewBazelPackageTree ¶
func NewBazelPackageTree(pkg string) *BazelPackageTree
NewBazelPackageTree constructs a new BazelPackageTree.
func (*BazelPackageTree) AddPath ¶
func (pt *BazelPackageTree) AddPath(parts []string)
AddPath adds a path to the package tree.
func (*BazelPackageTree) Paths ¶
func (pt *BazelPackageTree) Paths() []starlark.Value
Paths returns the list of paths in the tree, filtering Bazel sub-packages.
type Globber ¶
type Globber struct {
// contains filtered or unexported fields
}
Globber implements the glob built-in to evaluate the srcs attribute containing glob patterns.
func (*Globber) Glob ¶
func (g *Globber) Glob( _ *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple, ) (starlark.Value, error)
Glob expands the glob patterns and filters Bazel sub-packages from the tree. This is used to index manually created targets that contain globs so the resolution phase depends less on `gazelle:resolve` directives set by the user.