Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration for running codespell locally #2151

Merged
merged 2 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .codespell/exclude-file.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
of scoped seem allright. I still think there is not enough need

da de dum, hmm, hmm, dum de dum.

output=`dmesg | grep hda`
p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE)

Error-de_DE=Wenn ist das Nunstück git und Slotermeyer?
Ja! Beiherhund das Oder die Virtualenvironment gersput!
DimitriPapadopoulos marked this conversation as resolved.
Show resolved Hide resolved
17 changes: 17 additions & 0 deletions .codespell/ignore-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
adaptee
ans
arithmetics
asend
ba
clos
complies
crate
extraversion
fo
iif
nd
ned
recuse
reenable
therefor
warmup
5 changes: 5 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
skip = ./.git
ignore-words = .codespell/ignore-words.txt
exclude-file = .codespell/exclude-file.txt
DimitriPapadopoulos marked this conversation as resolved.
Show resolved Hide resolved
uri-ignore-words-list = daa,ist,searchin,theses
13 changes: 10 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: mixed-line-ending
name: Normalize mixed line endings
args: [--fix=lf]
- id: mixed-line-ending
name: Normalize mixed line endings
args: [--fix=lf]

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.8.0
Expand All @@ -17,6 +17,13 @@ repos:
files: '^pep-\d+\.txt|\.rst$'
types: [text]

- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
name: Check for common misspellings in text files
stages: [manual]

- repo: local
hooks:
- id: check-required-fields
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ lint:
pre-commit --version > /dev/null || python3 -m pip install pre-commit
pre-commit run --all-files

spellcheck:
pre-commit --version > /dev/null || python3 -m pip install pre-commit
pre-commit run --all-files --hook-stage manual codespell

# New Sphinx targets:

SPHINX_JOBS=8
Expand Down