Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make "buf lint" work correctly with top-level extensions (#2920)
This fixes a potential panic introduced in a previous PR and fleshes out support (including tests) for running lint checks over top-level extensions (which in past versions were inadvertently excluded from lint checks).
- Loading branch information
Showing
4 changed files
with
98 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
private/bufpkg/bufcheck/buflint/testdata/field_lower_snake_case/b.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
syntax = "proto2"; | ||
|
||
package b; | ||
|
||
message Foo { | ||
extensions 1 to 100; | ||
message Bar { | ||
extend Foo { | ||
optional string a = 1; | ||
optional string B = 2; | ||
} | ||
} | ||
} | ||
|
||
extend Foo { | ||
optional string c = 3; | ||
optional string D = 4; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters