Skip to content

Commit

Permalink
test: Remove new grep warning
Browse files Browse the repository at this point in the history
With newer versions of grep, you now see:

	grep: warning: stray \ before "

This is because we had an erroneous backslash escaping a quote. Remove
it.
  • Loading branch information
purpleidea committed Dec 3, 2023
1 parent b7d8a76 commit c3f34db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test-govet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ function naked-error() {

# catch errors that start with a capital
function lowercase-errors() {
if grep -E 'errors\.New\(\"[A-Z]' "$1"; then
if grep -E 'errors\.New\("[A-Z]' "$1"; then
return 1
fi
if grep -E 't\.Errorf\(\"[A-Z]' "$1"; then # t.Errorf or fmt.Errorf
if grep -E 't\.Errorf\("[A-Z]' "$1"; then # t.Errorf or fmt.Errorf
return 1
fi
# TODO: add errwrap.Wrap* related matching
Expand Down

0 comments on commit c3f34db

Please sign in to comment.