diff --git a/template/.typos.toml b/.config/typos.toml similarity index 53% rename from template/.typos.toml rename to .config/typos.toml index b169af3..9bfa88f 100644 --- a/template/.typos.toml +++ b/.config/typos.toml @@ -1,14 +1,10 @@ [files] extend-exclude = [ "*.html", - "*.json", "*.css", ".quarto/*", "_site/*", - "_extensions/*", - ".coverage-report/*", - "site_libs/", "*.svg", - # Since it has hashes + # Has commit hashes that trigger false positives "CHANGELOG.md", ] diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 8447cbb..c5f15ca 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -50,6 +50,8 @@ jobs: - name: Spell check repo uses: crate-ci/typos@bee27e3a4fd1ea2111cf90ab89cd076c870fce14 # v1.48.0 + with: + config: .config/typos.toml check-website-build: runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1ebbd33..561aa81 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,6 +27,7 @@ repos: rev: v1.47.2 hooks: - id: typos + args: [--config, .config/typos.toml, --force-exclude] - repo: https://github.com/rvben/rumdl-pre-commit rev: v0.2.26 diff --git a/.vscode/settings.json b/.vscode/settings.json index 744ecbb..ffd3128 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -26,6 +26,7 @@ "*.qmd.jinja": "jinja-md" }, "files.insertFinalNewline": true, + "typos.config": ".config/typos.toml", "conventionalCommits.emojiFormat": "emoji", "conventionalCommits.promptScopes": false } diff --git a/justfile b/justfile index 09aebb7..5e3a6fa 100644 --- a/justfile +++ b/justfile @@ -35,7 +35,7 @@ sync-template-files: # Check for spelling errors in files check-spelling: - uvx typos + uvx typos --config .config/typos.toml # Check that URLs work check-urls: diff --git a/.typos.toml b/template/.config/typos.toml similarity index 71% rename from .typos.toml rename to template/.config/typos.toml index b169af3..3c746c2 100644 --- a/.typos.toml +++ b/template/.config/typos.toml @@ -1,14 +1,12 @@ [files] extend-exclude = [ "*.html", - "*.json", "*.css", ".quarto/*", "_site/*", - "_extensions/*", - ".coverage-report/*", - "site_libs/", "*.svg", - # Since it has hashes + "*.json", + ".coverage-report/*", + # Has commit hashes that trigger false positives "CHANGELOG.md", ] diff --git a/template/.github/workflows/checks.yml b/template/.github/workflows/checks.yml index 7bd8009..ef9c0f6 100644 --- a/template/.github/workflows/checks.yml +++ b/template/.github/workflows/checks.yml @@ -82,6 +82,8 @@ jobs: - name: Spell check repo uses: crate-ci/typos@cf5f1c29a8ac336af8568821ec41919923b05a83 # v1.45.1 + with: + config: .config/typos.toml check-website-build: runs-on: ubuntu-latest diff --git a/template/.vscode/settings.json b/template/.vscode/settings.json index 50f0dc0..7b59d6d 100644 --- a/template/.vscode/settings.json +++ b/template/.vscode/settings.json @@ -37,5 +37,6 @@ "mypy.runUsingActiveInterpreter": true, "mypy.configFile": ".config/mypy.ini", "conventionalCommits.emojiFormat": "emoji", - "conventionalCommits.promptScopes": false + "conventionalCommits.promptScopes": false, + "typos.config": ".config/typos.toml", } diff --git a/template/justfile.jinja b/template/justfile.jinja index 2ab64a0..f9dc351 100644 --- a/template/justfile.jinja +++ b/template/justfile.jinja @@ -100,7 +100,7 @@ check-security: # Check for spelling errors in files check-spelling: - uvx typos + uvx typos --config .config/typos.toml # Install lychee from https://lychee.cli.rs/guides/getting-started/ # Check that URLs work