2020-12-19 02:09:54 -05:00
|
|
|
name: Miscellaneous checks
|
2020-08-10 06:39:58 -04:00
|
|
|
on: [push, pull_request]
|
|
|
|
|
2021-11-18 08:21:05 -05:00
|
|
|
concurrency:
|
2021-11-21 05:17:27 -05:00
|
|
|
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
|
|
|
|
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
|
2021-11-18 08:21:05 -05:00
|
|
|
|
2020-08-10 06:39:58 -04:00
|
|
|
jobs:
|
2020-12-19 02:09:54 -05:00
|
|
|
checks:
|
2020-08-10 06:39:58 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Check if C-sources are US-ASCII
|
|
|
|
run: |
|
|
|
|
! grep -r -n '[^ -~]' *.[chy] include internal win32/*.[ch]
|
2021-03-03 21:39:45 -05:00
|
|
|
- name: Check for trailing spaces
|
|
|
|
run: |
|
|
|
|
! git grep -n '[ ]$' '*.rb' '*.[chy]'
|
2020-12-19 02:10:57 -05:00
|
|
|
- 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 .
|
|
|
|
working-directory: include
|