Skip to content

Commit

Permalink
Add testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
emcfarlane committed Jan 15, 2025
1 parent 419c1c0 commit 37c005f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
4 changes: 2 additions & 2 deletions make/go/dep_protoc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ $(call _assert_var,CACHE_INCLUDE)
$(call _assert_var,CACHE_BIN)

# Settable
# https://github.com/protocolbuffers/protobuf/releases 20241204 checked 20241217
# https://github.com/protocolbuffers/protobuf/releases 20250108 checked 20250115
# NOTE: Set to version compatible with genproto source code (only used in tests).
PROTOC_VERSION ?= 29.1
PROTOC_VERSION ?= 29.3

# Google adds a dash to release candidate versions in the name of the
# release artifact, i.e. v27.0-rc1 -> v27.0-rc-1
Expand Down
9 changes: 9 additions & 0 deletions private/bufpkg/bufcheck/lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,15 @@ func TestRunLintCustomWasmPlugins(t *testing.T) {
)
}

func TestRunLintEditionsGoFeatures(t *testing.T) {
t.Parallel()
testLint(
t,
"editions_go_features",
bufanalysistesting.NewFileAnnotationNoLocation(t, "a.proto", "PACKAGE_DEFINED"),
)
}

func testLint(
t *testing.T,
relDirPath string,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
edition = "2023";

import "google/protobuf/go_features.proto";

option features.(pb.go).api_level = API_OPAQUE;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: v1
lint:
use:
- PACKAGE_DEFINED
2 changes: 1 addition & 1 deletion private/gen/data/datawkt/datawkt.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 37c005f

Please sign in to comment.