-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for multiple config files of different versions (#68)
- Loading branch information
1 parent
ef7846b
commit 7ec2204
Showing
26 changed files
with
179 additions
and
8 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: v2 | ||
modules: | ||
- path: barapis | ||
- path: fooapis | ||
- path: petapis | ||
lint: | ||
use: | ||
- DEFAULT | ||
except: | ||
- FIELD_NOT_REQUIRED | ||
- PACKAGE_NO_IMPORT_CYCLE | ||
disallow_comment_ignores: true | ||
breaking: | ||
use: | ||
- FILE | ||
except: | ||
- EXTENSION_NO_DELETE | ||
- FIELD_SAME_DEFAULT |
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 @@ | ||
# gazelle:buf_breaking_against //:against_file |
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,11 @@ | ||
load("@rules_buf//buf:defs.bzl", "buf_breaking_test") | ||
|
||
# gazelle:buf_breaking_against //:against_file | ||
|
||
buf_breaking_test( | ||
name = "buf_breaking", | ||
against = "//:against_file", | ||
config = "//:buf.yaml", | ||
module = "fooapis", | ||
targets = ["//fooapis/foo/v1:foo_v1_proto"], | ||
) |
Empty file.
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,16 @@ | ||
load("@rules_proto//proto:defs.bzl", "proto_library") | ||
load("@rules_buf//buf:defs.bzl", "buf_lint_test") | ||
|
||
proto_library( | ||
name = "foo_v1_proto", | ||
srcs = ["foo.proto"], | ||
strip_import_prefix = "/fooapis", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
buf_lint_test( | ||
name = "foo_v1_proto_lint", | ||
config = "//:buf.yaml", | ||
module = "fooapis", | ||
targets = [":foo_v1_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,5 @@ | ||
syntax = "proto3"; | ||
|
||
package foo.v1; | ||
|
||
message Foo {} |
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 @@ | ||
# gazelle:buf_breaking_against //:against_file |
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,11 @@ | ||
load("@rules_buf//buf:defs.bzl", "buf_breaking_test") | ||
|
||
# gazelle:buf_breaking_against //:against_file | ||
|
||
buf_breaking_test( | ||
name = "buf_breaking", | ||
against = "//:against_file", | ||
config = "//:buf.yaml", | ||
module = "petapis", | ||
targets = ["//petapis/pets/v1:pets_v1_proto"], | ||
) |
Empty file.
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,17 @@ | ||
load("@rules_proto//proto:defs.bzl", "proto_library") | ||
load("@rules_buf//buf:defs.bzl", "buf_lint_test") | ||
|
||
proto_library( | ||
name = "pets_v1_proto", | ||
srcs = ["pets.proto"], | ||
strip_import_prefix = "/petapis", | ||
visibility = ["//visibility:public"], | ||
deps = ["//fooapis/foo/v1:foo_v1_proto"], | ||
) | ||
|
||
buf_lint_test( | ||
name = "pets_v1_proto_lint", | ||
config = "//:buf.yaml", | ||
module = "petapis", | ||
targets = [":pets_v1_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,9 @@ | ||
syntax = "proto3"; | ||
|
||
package pets.v1; | ||
|
||
import "foo/v1/foo.proto"; | ||
|
||
message Pet { | ||
foo.v1.Foo foo = 1; | ||
} |
Empty file.
Empty file.
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,7 @@ | ||
version: v1 | ||
breaking: | ||
use: | ||
- FILE | ||
lint: | ||
use: | ||
- DEFAULT |
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,9 @@ | ||
load("@rules_proto//proto:defs.bzl", "proto_library") | ||
load("@rules_buf//buf:defs.bzl", "buf_lint_test") | ||
|
||
proto_library( | ||
name = "zap_proto", | ||
srcs = ["zap.proto"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
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,15 @@ | ||
load("@rules_proto//proto:defs.bzl", "proto_library") | ||
load("@rules_buf//buf:defs.bzl", "buf_lint_test") | ||
|
||
proto_library( | ||
name = "zap_proto", | ||
srcs = ["zap.proto"], | ||
strip_import_prefix = "/v1", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
buf_lint_test( | ||
name = "zap_proto_lint", | ||
config = "//v1:buf.yaml", | ||
targets = [":zap_proto"], | ||
) |
Empty file.
Empty file.
Empty file.
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,14 @@ | ||
version: v2 | ||
lint: | ||
use: | ||
- DEFAULT | ||
except: | ||
- FIELD_NOT_REQUIRED | ||
- PACKAGE_NO_IMPORT_CYCLE | ||
disallow_comment_ignores: true | ||
breaking: | ||
use: | ||
- FILE | ||
except: | ||
- EXTENSION_NO_DELETE | ||
- FIELD_SAME_DEFAULT |
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,9 @@ | ||
load("@rules_proto//proto:defs.bzl", "proto_library") | ||
load("@rules_buf//buf:defs.bzl", "buf_lint_test") | ||
|
||
proto_library( | ||
name = "tap_proto", | ||
srcs = ["tap.proto"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
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,15 @@ | ||
load("@rules_proto//proto:defs.bzl", "proto_library") | ||
load("@rules_buf//buf:defs.bzl", "buf_lint_test") | ||
|
||
proto_library( | ||
name = "tap_proto", | ||
srcs = ["tap.proto"], | ||
strip_import_prefix = "/v2", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
buf_lint_test( | ||
name = "tap_proto_lint", | ||
config = "//v2:buf.yaml", | ||
targets = [":tap_proto"], | ||
) |
Empty file.