]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA/badwords.yml: check source code wording
authorDaniel Stenberg <daniel@haxx.se>
Mon, 1 Jul 2024 13:53:54 +0000 (15:53 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 1 Jul 2024 20:59:19 +0000 (22:59 +0200)
Closes #14073

.github/scripts/badwords.txt
.github/workflows/badwords.yml

index 237503d62506c00ba7d959e21bf8e7604c43918c..5b65736c13948930468d0f9737da1c39d23d45c7 100644 (file)
@@ -25,7 +25,7 @@ you'd:you would
 you'll:you will
 you're:you are
 should've:should have
-don't:do not
+don't=do not
 could've:could have
 doesn't:does not
 isn't:is not
@@ -59,8 +59,8 @@ doesn't:does not
 won't:will not
 couldn't:could not
 \bwill\b:rewrite to present tense
-32bit=32-bit
-64bit=64-bit
+\b32bit=32-bit
+\b64bit=64-bit
 32 bit\b=32-bit
 64 bit\b=64-bit
 64-bits:64 bits or 64-bit
index 3c6bd961af3f1ea8bb0280536c0f36a646f6c4b2..467314e3bfb376a8488fdeded436d6eb9b9a0ce0 100644 (file)
@@ -18,12 +18,25 @@ on:
 permissions: {}
 
 jobs:
-  check:
+  docs:
 
     runs-on: ubuntu-latest
 
     steps:
-    - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
+      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
 
-    - name: check
-      run: ./.github/scripts/badwords.pl < .github/scripts/badwords.txt docs/*.md docs/libcurl/*.md docs/libcurl/opts/*.md docs/cmdline-opts/*.md docs/TODO docs/KNOWN_BUGS
+      - name: check
+        run: ./.github/scripts/badwords.pl < .github/scripts/badwords.txt docs/*.md docs/libcurl/*.md docs/libcurl/opts/*.md docs/cmdline-opts/*.md docs/TODO docs/KNOWN_BUGS
+
+  source:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
+
+      # we allow some extra in source code
+      - name: trim wordlist
+        run: grep -Ev '(\\bwill| url | dir )' .github/scripts/badwords.txt > .github/scripts/source.txt
+
+      - name: check
+        run: ./.github/scripts/badwords.pl < .github/scripts/source.txt `git ls-files -- src lib include`