-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow lint task to be configured after Buf v1.31.0 while using protob…
…uf-gradle-plugin (#256) Gets custom linting working again with new versions of Buf.
- Loading branch information
1 parent
6d322b4
commit a342ff2
Showing
15 changed files
with
146 additions
and
22 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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
...n_implementation_dependency_and_a_lint_config_with_the_protobuf_gradle_plugin_v1/buf.yaml
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 @@ | ||
version: v1 | ||
lint: | ||
ignore: | ||
- protokt | ||
use: | ||
- STANDARD | ||
except: | ||
- ENUM_ZERO_VALUE_SUFFIX |
22 changes: 22 additions & 0 deletions
22
...plementation_dependency_and_a_lint_config_with_the_protobuf_gradle_plugin_v1/build.gradle
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,22 @@ | ||
plugins { | ||
id 'java' | ||
id 'com.google.protobuf' version "$protobufGradleVersion" | ||
id 'build.buf' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
protobuf { | ||
protoc { | ||
artifact = "com.google.protobuf:protoc:$protobufVersion" | ||
} | ||
} | ||
|
||
compileJava.enabled = false | ||
|
||
dependencies { | ||
implementation "com.google.protobuf:protobuf-java:$protobufVersion" | ||
implementation "com.toasttab.protokt:protokt-runtime:0.6.5" | ||
} |
27 changes: 27 additions & 0 deletions
27
...nd_a_lint_config_with_the_protobuf_gradle_plugin_v1/src/main/proto/buf/test/v1/test.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,27 @@ | ||
// Copyright 2024 Buf Technologies, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package buf.test.v1; | ||
|
||
import "protokt/protokt.proto"; | ||
|
||
message BasicMessage { | ||
protokt.ProtoktFileOptions protokt_file_options = 1; | ||
|
||
enum BrokenEnum { | ||
BROKEN_ENUM_NONSPECIFIED = 0; // should be _UNSPECIFIED | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...n_implementation_dependency_and_a_lint_config_with_the_protobuf_gradle_plugin_v2/buf.yaml
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 @@ | ||
version: v2 | ||
lint: | ||
ignore: | ||
- protokt | ||
use: | ||
- STANDARD | ||
except: | ||
- ENUM_ZERO_VALUE_SUFFIX |
22 changes: 22 additions & 0 deletions
22
...plementation_dependency_and_a_lint_config_with_the_protobuf_gradle_plugin_v2/build.gradle
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,22 @@ | ||
plugins { | ||
id 'java' | ||
id 'com.google.protobuf' version "$protobufGradleVersion" | ||
id 'build.buf' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
protobuf { | ||
protoc { | ||
artifact = "com.google.protobuf:protoc:$protobufVersion" | ||
} | ||
} | ||
|
||
compileJava.enabled = false | ||
|
||
dependencies { | ||
implementation "com.google.protobuf:protobuf-java:$protobufVersion" | ||
implementation "com.toasttab.protokt:protokt-runtime:0.6.5" | ||
} |
27 changes: 27 additions & 0 deletions
27
...nd_a_lint_config_with_the_protobuf_gradle_plugin_v2/src/main/proto/buf/test/v1/test.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,27 @@ | ||
// Copyright 2024 Buf Technologies, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package buf.test.v1; | ||
|
||
import "protokt/protokt.proto"; | ||
|
||
message BasicMessage { | ||
protokt.ProtoktFileOptions protokt_file_options = 1; | ||
|
||
enum BrokenEnum { | ||
BROKEN_ENUM_NONSPECIFIED = 0; // should be _UNSPECIFIED | ||
} | ||
} |