Skip to content

Commit

Permalink
bazel: in check.sh, restrict grep to pkg
Browse files Browse the repository at this point in the history
You can optionally configure `git grep` to recurse into submodules, in
which case this check returns false positives. Here we restrict the
search to the `pkg` directory which is all we care about.

Release note: None
  • Loading branch information
rickystewart committed Jul 5, 2022
1 parent f6d0d84 commit 8a6bedb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/bazelutil/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fi
# We exclude stringer and add-leaktest.sh -- the former is already all
# Bazelfied, and the latter can be safely ignored since we have a lint to check
# the same thing: https://github.com/cockroachdb/cockroach/issues/64440
git grep '//go:generate' -- './*.go' | grep -v stringer | grep -v 'add-leaktest\.sh' | while read LINE; do
git grep '//go:generate' 'pkg/**/*.go' | grep -v stringer | grep -v 'add-leaktest\.sh' | while read LINE; do
if [[ "$EXISTING_GO_GENERATE_COMMENTS" == *"$LINE"* ]]; then
# Grandfathered.
continue
Expand Down

0 comments on commit 8a6bedb

Please sign in to comment.