Skip to content

Commit

Permalink
fix codespell skip handling
Browse files Browse the repository at this point in the history
Required-githooks: true

Signed-off-by: Dalton Bohning <[email protected]>
  • Loading branch information
daltonbohning committed Dec 19, 2024
1 parent ceca71b commit d264919
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ line_length = 99
skip_gitignore = true

[tool.codespell]
skip = './src/control/vendor,./src/control/go.sum,./.git,./src/rdb/raft,./build,./install,./venv,./src/control/vendor/,./src/control/security/testdata/certs/source.txt'
skip = './src/control/vendor/*,./src/control/go.sum,./.git/*,./src/rdb/raft/*,./build/*,./install/*,./venv/*,./src/control/security/testdata/certs/source.txt'
quiet-level = 3
ignore-words = 'ci/codespell.ignores'
builtin = 'clear,rare,informal,names,en-GB_to_en-US'
3 changes: 2 additions & 1 deletion utils/githooks/pre-commit.d/20-codespell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ then
fi

echo "Checking for spelling mistakes"
_git_diff_cached_files | grep -v "src/control/vendor" | xargs codespell
# Convert file names to relative path format that codespell expects. I.e. "./path"
_git_diff_cached_files | xargs -r -n 1 -I% echo "./%" | xargs -r codespell

0 comments on commit d264919

Please sign in to comment.