mirror of
https://github.com/iv-org/invidious.git
synced 2025-06-28 09:38:31 +00:00
Add CI job to check typos
This commit is contained in:
parent
df8839d1f0
commit
c528b0f866
@ -20,6 +20,10 @@ Lint/ShadowingOuterLocalVar:
|
|||||||
Excluded:
|
Excluded:
|
||||||
- src/invidious/helpers/tokens.cr
|
- src/invidious/helpers/tokens.cr
|
||||||
|
|
||||||
|
# CI has a separate job to check for typos
|
||||||
|
Lint/Typos:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
Lint/NotNil:
|
Lint/NotNil:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@ -165,3 +165,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Run Ameba linter
|
- name: Run Ameba linter
|
||||||
run: bin/ameba
|
run: bin/ameba
|
||||||
|
|
||||||
|
lint_spell:
|
||||||
|
name: Spell Check with Typos
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Actions Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Spell Check Repo
|
||||||
|
uses: crate-ci/typos@v1.33.1
|
||||||
|
30
.typos.toml
Normal file
30
.typos.toml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
[default]
|
||||||
|
extend-ignore-re = [
|
||||||
|
# Exclude various hard-coded YouTube IDs
|
||||||
|
"\\b[0-9A-z+/\\-_]{100,}((=|%3D){1,2})?\\b",
|
||||||
|
"\\b4qm.*(%3D{1,2})?\\b",
|
||||||
|
"UC[A-z0-9\\-]*\\b",
|
||||||
|
"EgI[A-z0-9\\-]{7}(%3D{1,2})",
|
||||||
|
|
||||||
|
# Ignore gsub regex
|
||||||
|
"gsub\\(?/.*/,?",
|
||||||
|
|
||||||
|
# TEST_IDs constant def
|
||||||
|
"TEST_IDS *= *\\{.*\\}",
|
||||||
|
|
||||||
|
# Ignore two-letter region strings
|
||||||
|
"(\\b|\")[a-zA-Z]{2}(\\b|\"),"
|
||||||
|
]
|
||||||
|
|
||||||
|
[default.extend-identifiers]
|
||||||
|
clen = "clen"
|
||||||
|
|
||||||
|
[files]
|
||||||
|
extend-exclude = [
|
||||||
|
"/assets/js/videojs-youtube-annotations.min.js",
|
||||||
|
"/assets/videojs/**/*",
|
||||||
|
"/assets/fonts/ionicons.svg",
|
||||||
|
"/mocks/**/*.json",
|
||||||
|
"locales/*.json",
|
||||||
|
"CHANGELOG_legacy.md",
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user