Documentation
¶
Overview ¶
Package buflint contains the linting functionality.
The primary entry point to this package is the Handler.
Index ¶
- Variables
- func GetAllRulesV1() ([]bufcheck.Rule, error)
- func GetAllRulesV1Beta1() ([]bufcheck.Rule, error)
- func GetAllRulesV2() ([]bufcheck.Rule, error)
- func GetRelevantDeprecations(fileVersion bufconfig.FileVersion) (map[string][]string, error)
- func PrintFileAnnotationSetConfigIgnoreYAMLV1(writer io.Writer, fileAnnotationSet bufanalysis.FileAnnotationSet) error
- func RulesForConfig(config bufconfig.LintConfig) ([]bufcheck.Rule, error)
- type Handler
Constants ¶
This section is empty.
Variables ¶
var AllFormatStrings = append( bufanalysis.AllFormatStrings, "config-ignore-yaml", )
AllFormatStrings are all format strings.
Functions ¶
func GetAllRulesV1Beta1 ¶
GetAllRulesV1Beta1 gets all known rules.
Should only be used for printing.
func GetAllRulesV2 ¶ added in v1.32.0
GetAllRulesV2 gets all known rules.
Should only be used for printing.
func GetRelevantDeprecations ¶ added in v1.32.0
func GetRelevantDeprecations(fileVersion bufconfig.FileVersion) (map[string][]string, error)
GetRelevantDeprecations gets deprecation information for the given version. The map is from deprecated rule IDs to zero or more replacement rule IDs.
func PrintFileAnnotationSetConfigIgnoreYAMLV1 ¶ added in v1.32.0
func PrintFileAnnotationSetConfigIgnoreYAMLV1( writer io.Writer, fileAnnotationSet bufanalysis.FileAnnotationSet, ) error
PrintFileAnnotationSetConfigIgnoreYAMLV1 prints the FileAnnotationSet to the Writer for the config-ignore-yaml format.
TODO FUTURE: This is messed.
func RulesForConfig ¶
func RulesForConfig(config bufconfig.LintConfig) ([]bufcheck.Rule, error)
RulesForConfig returns the rules for a given config.
Does NOT include deprecated rules.
Should only be used for printing.
Types ¶
type Handler ¶
type Handler interface {
// Check runs the lint checks.
//
// The image should have source code info for this to work properly.
//
// Images should *not* be filtered with regards to imports before passing to this function.
//
// An error of type bufanalysis.FileAnnotationSet will be returned on breaking failure.
Check(
ctx context.Context,
config bufconfig.LintConfig,
image bufimage.Image,
) error
}
Handler handles the main lint functionality.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
buflintbuild
Package buflintbuild contains the RuleBuilders used by buflintv*.
|
Package buflintbuild contains the RuleBuilders used by buflintv*. |
|
buflintcheck
Package buflintcheck impelements the check functions.
|
Package buflintcheck impelements the check functions. |
|
buflintv1
Package buflintv1 contains the VersionSpec for v1.
|
Package buflintv1 contains the VersionSpec for v1. |
|
buflintv1beta1
Package buflintv1beta1 contains the VersionSpec for v1beta1.
|
Package buflintv1beta1 contains the VersionSpec for v1beta1. |
|
buflintv2
Package buflintv2 contains the VersionSpec for v2.
|
Package buflintv2 contains the VersionSpec for v2. |