CI: filter all .[ch] files before doing typo checks

The filter only leaves comments and strings in all files using .c or .h
extensions.

It is important that the filter runs after all the other checks are done
on these files as this process destroys the files.

Fixes #22508
Closes #22509
This commit is contained in:
Daniel Stenberg 2026-08-06 22:52:45 +02:00
parent 3f1c033afe
commit 1ea07d6e0a
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 216 additions and 14 deletions

View file

@ -66,20 +66,6 @@ jobs:
source ~/venv/bin/activate
reuse lint
- name: 'codespell'
run: |
source ~/venv/bin/activate
codespell --version
.github/scripts/codespell.sh
- name: 'typos'
timeout-minutes: 2
run: |
/home/linuxbrew/.linuxbrew/bin/brew install typos-cli
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
typos --version
.github/scripts/typos.sh
- name: 'cmakelint'
run: |
source ~/venv/bin/activate
@ -96,6 +82,24 @@ jobs:
source ~/venv/bin/activate
scripts/pythonlint.sh
- name: filter off code from all C and H files
run: |
git ls-files -z '**.[ch]' | xargs -0 -r -n1 ./.github/scripts/c-strip
- name: 'codespell'
run: |
source ~/venv/bin/activate
codespell --version
.github/scripts/codespell.sh
- name: 'typos'
timeout-minutes: 2
run: |
/home/linuxbrew/.linuxbrew/bin/brew install typos-cli
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
typos --version
.github/scripts/typos.sh
pytype:
name: 'pytype'
runs-on: ubuntu-24.04-arm # pytype is discontinued and requires python 3.8-3.12