Skip to content

Commit

Permalink
Support setup.cfg for configuration of codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
yarikoptic committed Jan 26, 2024
1 parent 3f75c54 commit f3541a2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions codespellit
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ check-hidden = true
${ignore_regex_prefix}ignore-regex = '$ignore_regex'
# ignore-words-list = ''
EOF
elif [ -e setup.cfg ]; then
config="setup.cfg"
# Then config file as the "last" commit we can amend if needed
cat >> setup.cfg <<EOF
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = $skips
check-hidden = true
${ignore_regex_prefix}ignore-regex = $ignore_regex
# ignore-words-list =
EOF
else
config=".codespellrc"
skips+=",$config" # for check-hidden
Expand Down

0 comments on commit f3541a2

Please sign in to comment.