diff --git a/pyproject.toml b/pyproject.toml index b11fe94d4bed..cc179a75ce9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,8 +5,7 @@ line_length = 99 skip_gitignore = true [tool.codespell] -asdsf -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' diff --git a/utils/githooks/pre-commit.d/20-codespell.sh b/utils/githooks/pre-commit.d/20-codespell.sh index 1a7806fa4a9c..eece684244e0 100755 --- a/utils/githooks/pre-commit.d/20-codespell.sh +++ b/utils/githooks/pre-commit.d/20-codespell.sh @@ -20,6 +20,5 @@ then fi echo "Checking for spelling mistakes" -codespell --version -exit 0 -_git_diff_cached_files | 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