Documentation ¶
Index ¶
- func CheckCollisionErrors(targetName, expectedKind string, generatedKinds *treeset.Set, ...) error
- func GazelleWalkDir(args language.GenerateArgs, ignore *git.GitIgnore, excludes []string, ...) error
- func GetFileRuleByName(args language.GenerateArgs, ruleName string) *rule.Rule
- func IsBazelPackage(dir string) bool
- func IsFileExcluded(rel, fileRelPath string, excludes []string) bool
- func MapKind(args language.GenerateArgs, kind string) string
- func RemoveRule(args language.GenerateArgs, ruleName string, generatedKinds *treeset.Set, ...)
- func ToDefaultTargetName(args language.GenerateArgs, defaultRootName string) string
- type GazelleWalkFunc
- type LabelSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCollisionErrors ¶ added in v1.508.19
func CheckCollisionErrors(targetName, expectedKind string, generatedKinds *treeset.Set, args language.GenerateArgs) error
Check if a target with the same name we are generating already exists, and that rule type is unknown or can not be adapted to the new rule kind. If an existing rule can not be adapted (maybe due to Gazelle bugs/limitations) an error explaining the case is returned.
func GazelleWalkDir ¶
func GazelleWalkDir(args language.GenerateArgs, ignore *git.GitIgnore, excludes []string, recurse bool, walkFunc GazelleWalkFunc) error
Walk the directory of the language.GenerateArgs, optionally recursing into subdirectories unlike the files provided in GenerateArgs.RegularFiles.
func GetFileRuleByName ¶ added in v1.508.19
func GetFileRuleByName(args language.GenerateArgs, ruleName string) *rule.Rule
func IsBazelPackage ¶
IsBazelPackage determines if the directory is a Bazel package by probing for the existence of a known BUILD file name.
func IsFileExcluded ¶
func RemoveRule ¶ added in v1.508.19
func RemoveRule(args language.GenerateArgs, ruleName string, generatedKinds *treeset.Set, result *language.GenerateResult)
func ToDefaultTargetName ¶
func ToDefaultTargetName(args language.GenerateArgs, defaultRootName string) string
Return the default target name for the given language.GenerateArgs. The default target name of a BUILD is the directory name. WHen within the repository root which may be outside of version control the default target name is the repository name.
Types ¶
type GazelleWalkFunc ¶
type LabelSet ¶
type LabelSet struct {
// contains filtered or unexported fields
}
A basic set of label.Labels with logging of set modifications.