diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-04-20 10:20:31 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-04-20 10:28:29 +0900 |
commit | ad4a160220abad330cb9ba41e5dcd5e46bb056f4 (patch) | |
tree | e2e9aa5760aa22d02874b83d977429f6a6977fdb /.github | |
parent | 2d301945f67edda6495224889f82251229661169 (diff) | |
download | ruby-ad4a160220abad330cb9ba41e5dcd5e46bb056f4.tar.gz |
Exit explicitly instead of !
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/check_misc.yml | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/.github/workflows/check_misc.yml b/.github/workflows/check_misc.yml index 26b892c0a5..80f17d34d5 100644 --- a/.github/workflows/check_misc.yml +++ b/.github/workflows/check_misc.yml @@ -17,19 +17,23 @@ jobs: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Check if C-sources are US-ASCII run: | - ! grep -r -n '[^ -~]' -- *.[chy] include internal win32/*.[ch] + grep -r -n '[^ -~]' -- *.[chy] include internal win32/*.[ch] && exit 1 || : - name: Check for trailing spaces run: | - ! git grep -n '[ ]$' -- '*.rb' '*.[chy]' '*.rs' - ! git grep -n '^[ ][ ]*$' -- '*.md' + git grep -n '[ ]$' -- '*.rb' '*.[chy]' '*.rs' && exit 1 || : + git grep -n '^[ ][ ]*$' -- '*.md' && exit 1 || : - name: Check for bash specific substitution in configure.ac run: | - ! git grep -n '\${[A-Za-z_0-9]*/' -- configure.ac + git grep -n '\${[A-Za-z_0-9]*/' -- configure.ac && exit 1 || : - name: Check for header macros run: | - ! for header in ruby/*.h; do \ - git grep -l -F -e $header -e HAVE_`echo $header | tr a-z./ A-Z__` -- . > /dev/null || echo $header - done | grep -F . + fail= + for header in ruby/*.h; do + git grep -l -F -e $header -e HAVE_`echo $header | tr a-z./ A-Z__` -- . > /dev/null && continue + fail=1 + echo $header + done + exit $fail working-directory: include - id: gems |