Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
83866: bazel: in `check.sh`, restrict `grep` to `pkg` r=matthewtodd a=rickystewart

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

Co-authored-by: Ricky Stewart <[email protected]>
  • Loading branch information
craig[bot] and rickystewart committed Jul 6, 2022
2 parents 8b6e3c3 + 8a6bedb commit 7cfa5d4
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 7cfa5d4

Please sign in to comment.