Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel: add stylecheck analyzers to nogo #73613

Merged
merged 2 commits into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
/pkg/cmd/generate-metadata-tables/ @cockroachdb/sql-experience
/pkg/cmd/generate-spatial-ref-sys/ @cockroachdb/geospatial
/pkg/cmd/generate-test-suites/ @cockroachdb/dev-inf
/pkg/cmd/generate-staticcheck/ @cockroachdb/dev-inf
/pkg/cmd/geoviz/ @cockroachdb/geospatial
/pkg/cmd/github-post/ @cockroachdb/test-eng
/pkg/cmd/github-pull-request-make/ @cockroachdb/dev-inf
Expand Down
3 changes: 2 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports_files([

load("@bazel_gazelle//:def.bzl", "gazelle")
load("@io_bazel_rules_go//go:def.bzl", "nogo")
load("//build/bazelutil/staticcheckanalyzers:def.bzl", "STATICCHECK_CHECKS")

# The following directives inform gazelle how to auto-generate BUILD.bazel
# files throughout the repo. By including them here, we can run gazelle using
Expand Down Expand Up @@ -250,6 +251,6 @@ nogo(
"//pkg/testutils/lint/passes/returnerrcheck",
"//pkg/testutils/lint/passes/timer",
"//pkg/testutils/lint/passes/unconvert",
],
] + STATICCHECK_CHECKS,
}),
)
1 change: 1 addition & 0 deletions build/bazelutil/bazel-generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set -euo pipefail

CONTENTS=$(bazel run //pkg/cmd/mirror)
echo "$CONTENTS" > DEPS.bzl
bazel run pkg/cmd/generate-staticcheck --run_under="cd $PWD && "
bazel run //:gazelle
CONTENTS=$(bazel run //pkg/cmd/generate-test-suites --run_under="cd $PWD && ")
echo "$CONTENTS" > pkg/BUILD.bazel
Loading