Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comments to addFuncs #3172

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,20 @@ var (

// addFunc adds a FileAnnotation.
//
// Both the Descriptor and Location can be nil.
type addFunc func(bufprotosource.Descriptor, []bufprotosource.Descriptor, bufprotosource.Location, string, ...interface{})
// descriptor is what the FileAnnotation applies to.
// extraIgnoreDescriptors are extra descriptors to check for ignores. This is used in situations
// where the file we care about has been deleted, and we want to use the previous file to check
// for things like config ignores or unstable packages.
// location is the granular Location of the FileAnnotation.
//
// descriptor, extraIgnoreDescriptors, and location can be nil.
type addFunc func(
descriptor bufprotosource.Descriptor,
extraIgnoreDescriptors []bufprotosource.Descriptor,
location bufprotosource.Location,
format string,
args ...interface{},
)

// corpus is a store of the previous files and files given to a check function.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ import (
// location != descriptor.Location().
//
// descriptor, location, and extraIgnoreLocations can be nil.
type addFunc func(descriptior bufprotosource.Descriptor, location bufprotosource.Location, extraIgnoreLocations []bufprotosource.Location, message string, args ...interface{})
type addFunc func(
descriptior bufprotosource.Descriptor,
location bufprotosource.Location,
extraIgnoreLocations []bufprotosource.Location,
format string,
args ...interface{},
)

func fieldToLowerSnakeCase(s string) string {
// Try running this on googleapis and watch
Expand Down
Loading