Documentation ¶
Overview ¶
Package bufbreaking contains the breaking change detection functionality.
The primary entry point to this package is the Handler.
Index ¶
- func GetAllRules(fileVersion bufconfig.FileVersion) ([]bufcheck.Rule, error)
- 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 RulesForConfig(config bufconfig.BreakingConfig) ([]bufcheck.Rule, error)
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllRules ¶ added in v1.32.0
func GetAllRules(fileVersion bufconfig.FileVersion) ([]bufcheck.Rule, error)
GetAllRules gets all known rules for the given version.
Should only be used for testing.
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 RulesForConfig ¶
func RulesForConfig(config bufconfig.BreakingConfig) ([]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 breaking checks. // // The image should have source code info for this to work properly. The previousImage // does not need to have source code info. // // Images should 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.BreakingConfig, previousImage bufimage.Image, image bufimage.Image, ) error }
Handler handles the main breaking functionality.
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
bufbreakingbuild
Package bufbreakingbuild contains the RuleBuilders used by bufbreakingv*.
|
Package bufbreakingbuild contains the RuleBuilders used by bufbreakingv*. |
bufbreakingcheck
Package bufbreakingcheck impelements the check functions.
|
Package bufbreakingcheck impelements the check functions. |
bufbreakingv1
Package bufbreakingv1 contains the VersionSpec for v1.
|
Package bufbreakingv1 contains the VersionSpec for v1. |
bufbreakingv1beta1
Package bufbreakingv1beta1 contains the VersionSpec for v1beta1.
|
Package bufbreakingv1beta1 contains the VersionSpec for v1beta1. |
bufbreakingv2
Package bufbreakingv2 contains the VersionSpec for v2.
|
Package bufbreakingv2 contains the VersionSpec for v2. |