mirror of
https://codeberg.org/forgejo/docs.git
synced 2025-02-12 04:44:48 -05:00
ci: pr: check for typos
Uses typos [0] to check for any spelling mistakes. A few custom rules are needed to ignore some specific words, as one might expect. This will now cause the `pr` workflow to error out if any typos are found. [0] https://github.com/crate-ci/typos Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
a23914b548
commit
de0817a722
2 changed files with 26 additions and 0 deletions
|
@ -19,6 +19,12 @@ jobs:
|
||||||
pnpm run lint:remark
|
pnpm run lint:remark
|
||||||
pnpm run format:prettier
|
pnpm run format:prettier
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
|
- name: run typos
|
||||||
|
uses: https://github.com/crate-ci/typos@v1.29.4
|
||||||
|
with:
|
||||||
|
write_changes: true
|
||||||
|
- name: check typos result
|
||||||
|
run: git diff --exit-code
|
||||||
- name: scripts/cli-docs.sh
|
- name: scripts/cli-docs.sh
|
||||||
run: |
|
run: |
|
||||||
scripts/cli-docs.sh run ${{ env.GITHUB_BASE_REF }} > docs/admin/command-line.md
|
scripts/cli-docs.sh run ${{ env.GITHUB_BASE_REF }} > docs/admin/command-line.md
|
||||||
|
|
20
.typos.toml
Normal file
20
.typos.toml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# https://github.com/crate-ci/typos/blob/master/docs/reference.md
|
||||||
|
|
||||||
|
# mask some false positives
|
||||||
|
[default.extend-words]
|
||||||
|
# ./docs/admin/recommendations.md
|
||||||
|
Redict = "Redict"
|
||||||
|
# ./docs/admin/command-line.md
|
||||||
|
HELO = "HELO"
|
||||||
|
TABL = "TABL" # weird false-positive
|
||||||
|
# ./docs/admin/config-cheat-sheet.md
|
||||||
|
odf = "odf"
|
||||||
|
# ./docs/contributor/adr/adr-activity-for-like.md
|
||||||
|
edn = "edn"
|
||||||
|
|
||||||
|
[default]
|
||||||
|
extend-ignore-identifiers-re = [
|
||||||
|
# ./docs/admin/config-cheat-sheet.md
|
||||||
|
"\\b(ecdhe_)?rsa_with_.*\\b",
|
||||||
|
]
|
||||||
|
|
Loading…
Add table
Reference in a new issue