diff options
author | EuAndreh <eu@euandre.org> | 2021-08-22 13:08:53 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-08-22 13:08:53 -0300 |
commit | b8faea851ccb9545ea68d989d6a619c754fb8580 (patch) | |
tree | 5f81014bad612a42000b72796b0c052086842fe8 /tests | |
parent | tests/dev-integration.sh: Fix calls to executable and test (diff) | |
download | gistatic-b8faea851ccb9545ea68d989d6a619c754fb8580.tar.gz gistatic-b8faea851ccb9545ea68d989d6a619c754fb8580.tar.xz |
tests/c-lint.sh: Use grep exit status instead of empty string output
Diffstat (limited to '')
-rwxr-xr-x | tests/c-lint.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/c-lint.sh b/tests/c-lint.sh index 7c5516d..42d185c 100755 --- a/tests/c-lint.sh +++ b/tests/c-lint.sh @@ -1,8 +1,9 @@ #!/bin/sh -if [ -n "$(grep -En '[a-z]+\(\) {' "$@")" ]; then +RE='[a-z]+\(\) {' +if grep -Eq "$RE" "$@"; then echo 'Functions with no argument without explicit "void" parameter:' >&2 - grep -En '[a-z]+\(\) {' "$@" + grep -En "$RE" "$@" exit 1 fi |