Skip to content

Commit

Permalink
Fixing default includes of nogo (#4195)
Browse files Browse the repository at this point in the history
Currently, nogo will only run within rules_go, not the main repo, by
default. This PR also remove the setting of `includes` in tests by
default to expose issues in the default `includes` of `go_register_nogo`

Fixes #4194

---------

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
  • Loading branch information
linzhp and fmeum authored Dec 13, 2024
1 parent 6e4fdcf commit 54293b3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/basic-gazelle/.bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.4.1
2 changes: 1 addition & 1 deletion go/private/nogo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

DEFAULT_NOGO = "@io_bazel_rules_go//:default_nogo"
NOGO_DEFAULT_INCLUDES = [str(Label("//:__subpackages__"))]
NOGO_DEFAULT_INCLUDES = ["@@//:__subpackages__"]
NOGO_DEFAULT_EXCLUDES = []

# repr(Label(...)) does not emit a canonical label literal.
Expand Down
2 changes: 0 additions & 2 deletions go/tools/bazel_testing/bazel_testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,6 @@ go_register_nogo(
"{{ . }}",
{{ end }}
],
{{ else }}
includes = ["all"],
{{ end}}
{{ if .NogoExcludes }}
excludes = [
Expand Down

0 comments on commit 54293b3

Please sign in to comment.