[codespell] Add tox target and configuration for codespell
Continuing the work of @JayF in other repos. Adds a tox target for codespell, `tox -e codespell`. Can optionally be run as `tox -e codespell -- -w` to get automatic spelling fixes applied where appropriate. Adds small amounts of configuration to setup.cfg, including an ignore list of words. Related Bug: https://bugs.launchpad.net/ironic-python-agent/+bug/2047654 Change-Id: I284045ee9dfb51eee59a0442abda657c74abed05
This commit is contained in:
parent
7952b5d788
commit
5e1ca2a437
@ -47,3 +47,9 @@ json_rpc =
|
|||||||
keystoneauth1>=4.2.0 # Apache-2.0
|
keystoneauth1>=4.2.0 # Apache-2.0
|
||||||
os-service-types>=1.2.0 # Apache-2.0
|
os-service-types>=1.2.0 # Apache-2.0
|
||||||
oslo.service!=1.28.1,>=1.24.0 # Apache-2.0
|
oslo.service!=1.28.1,>=1.24.0 # Apache-2.0
|
||||||
|
|
||||||
|
[codespell]
|
||||||
|
quiet-level = 4
|
||||||
|
# Words to ignore:
|
||||||
|
# crypted: Valid in some contexts, e.g. "crypted password"
|
||||||
|
ignore-words-list = crypted
|
9
tox.ini
9
tox.ini
@ -73,3 +73,12 @@ allowlist_externals = make
|
|||||||
commands = sphinx-build -b latex doc/source doc/build/pdf
|
commands = sphinx-build -b latex doc/source doc/build/pdf
|
||||||
make -C doc/build/pdf
|
make -C doc/build/pdf
|
||||||
|
|
||||||
|
|
||||||
|
[testenv:codespell]
|
||||||
|
description =
|
||||||
|
Run codespell to check spelling
|
||||||
|
deps = codespell
|
||||||
|
# note(adamcarthur): {posargs} lets us run `tox -ecodespell -- -w` to get codespell
|
||||||
|
# to correct spelling issues in our code it's aware of.
|
||||||
|
commands =
|
||||||
|
codespell {posargs}
|
Loading…
Reference in New Issue
Block a user