Documentation ¶
Overview ¶
Package bufbreaking contains the breaking change detection functionality.
The primary entry point to this package is the Handler.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Checkers are the checkers to run. // // Checkers will be sorted by first categories, then id when Configs are // created from this package, i.e. created wth ConfigBuilder.NewConfig. Checkers []Checker IgnoreIDToRootPaths map[string]map[string]struct{} IgnoreRootPaths map[string]struct{} }
Config is the check config.
type ConfigBuilder ¶
type ConfigBuilder struct { Use []string Except []string IgnoreIDOrCategoryToRootPaths map[string][]string IgnoreRootPaths []string }
ConfigBuilder is a config builder.
func (ConfigBuilder) NewConfig ¶
func (b ConfigBuilder) NewConfig() (*Config, error)
NewConfig returns a new Config.
type Handler ¶
type Handler interface { // BreakingCheck 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. // // Annotations will use the image file paths, if these should be relative, use // FixAnnotationFilenames. BreakingCheck( ctx context.Context, breakingConfig *Config, previousImage bufpb.Image, image bufpb.Image, ) ([]*analysis.Annotation, error) }
Handler handles the main breaking functionality.
type Runner ¶
type Runner interface { // Check runs the breaking checkers, returning a system error if any system error occurs // or returning the annotations otherwise. // // previousFiles do not need to have Locations, and BreakingCheckers cannot rely on this. // // Annotations will be sorted, but Filenames will not have the roots as a prefix, instead // they will be relative to the roots. This should be fixed for linter outputs if image // mode is not used. Check(context.Context, *Config, []protodesc.File, []protodesc.File) ([]*analysis.Annotation, error) }
Runner is a runner.
Click to show internal directories.
Click to hide internal directories.