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

vet: fix option order when invoking grep #7421

Merged
merged 2 commits into from
Jul 17, 2024
Merged
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
2 changes: 1 addition & 1 deletion scripts/vet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ XXXXX PleaseIgnoreUnused'

# Ignore a false positive when operands have side affectes.
# TODO(https://github.com/dominikh/go-tools/issues/54): Remove this once the issue is fixed in staticcheck.
noret_grep "(SA4000)" "${SC_OUT}" | not grep -ev "crl.go:\d*:\d*: identical expressions on the left and right side of the '||' operator (SA4000)"
noret_grep "(SA4000)" "${SC_OUT}" | not grep -v -e "crl.go:[0-9]\+:[0-9]\+: identical expressions on the left and right side of the '||' operator (SA4000)"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting errors with \d because it didn't match the lines, I think this is because GNU grep doesn't support \d by default.

Copy link
Member

@dfawley dfawley Jul 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I pinged this bug in the TODO. It'd be nice to be able to just delete this stuff instead.

Maybe we can simplify this to just not grep -v "crl.go:" ? I don't think the rest of it helps.


# Only ignore the following deprecated types/fields/functions and exclude
# generated code.
Expand Down