badwords: move into ./scripts, speed up

- 'badwords' is now a target in Makefile.am

- change badwords.txt to specify plain "words" instead of regexes so the
  script can build single regexes when scanning, which makes the script
  perform much faster (~6 times faster)

Closes #20869
This commit is contained in:
Daniel Stenberg 2026-03-09 13:32:14 +01:00
parent 248dd9e55f
commit 713287188e
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 123 additions and 78 deletions

View file

@ -124,7 +124,7 @@ jobs:
persist-credentials: false
- name: 'badwords'
run: .github/scripts/badwords.pl -w .github/scripts/badwords.ok '**.md' projects/OS400/README.OS400 < .github/scripts/badwords.txt
run: ./scripts/badwords -w ./scripts/badwords.ok '**.md' projects/OS400/README.OS400 < ./scripts/badwords.txt
- name: 'verify synopsis'
run: .github/scripts/verify-synopsis.pl docs/libcurl/curl*.md

View file

@ -181,4 +181,4 @@ jobs:
- name: 'badwords'
run: |
# we allow some extra in source code
grep -Ev '(\\bwill| But: | So : )' .github/scripts/badwords.txt | .github/scripts/badwords.pl -a src lib include docs/examples
grep -Ev '^(will:|But=|So=|And=| url=)' ./scripts/badwords.txt | ./scripts/badwords -a src lib include docs/examples