Skip to content

Commit

Permalink
build: run codespell on almost all files
Browse files Browse the repository at this point in the history
Ignore only license files and m4/ (which may contain third-party files).

And ignore more words to fix the following errors:

    $ make codespell
    codespell --ignore-regex 'UE|creat|doas|ether|isplay|shotcut' \
      -S COPYING,m4 .
    ./README:484: als ==> also
    ./README:646: Shotcut ==> Shortcut
    ./RELNOTES:516: als ==> also
    ./etc/inc/disable-common.inc:506: chage ==> change, charge
    ./etc/apparmor/firejail-default:35: readby ==> read, read by
    ./etc/apparmor/firejail-default:36: readby ==> read, read by
    ./etc/profile-a-l/als.profile:1: als ==> also
    ./etc/profile-a-l/als.profile:5: als ==> also
    make: *** [Makefile:371: codespell] Error 65
    $ codespell --version
    2.2.5
  • Loading branch information
kmk3 committed Aug 12, 2023
1 parent 7b33c7f commit 15965b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Codespell

on:
push:
paths:
- 'src/**'
- 'test/**'
paths-ignore:
- 'm4/**'
- COPYING
pull_request:
paths:
- 'src/**'
- 'test/**'
paths-ignore:
- 'm4/**'
- COPYING

permissions: # added using https://github.com/step-security/secure-workflows
contents: read
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,14 @@ cppcheck: clean
scan-build: clean
scan-build $(MAKE)

# TODO: Old codespell versions (such as v2.1.0 in CI) have issues with
# contrib/syscalls.sh
.PHONY: codespell
codespell:
codespell --ignore-regex "UE|creat|doas|ether|isplay|shotcut" src test

codespell --ignore-regex 'UE|als|chage|creat|doas|ether|isplay|readby|[Ss]hotcut' \
-S COPYING,m4 \
-S ./contrib/syscalls.sh \
.
.PHONY: print-env
print-env:
./ci/printenv.sh
Expand Down

0 comments on commit 15965b2

Please sign in to comment.