From ad4a160220abad330cb9ba41e5dcd5e46bb056f4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 20 Apr 2023 10:20:31 +0900 Subject: Exit explicitly instead of ! --- .github/workflows/check_misc.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to '.github') 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 -- cgit v1.2.1