From f0ba81492367569880abec845dad1cb47b577b12 Mon Sep 17 00:00:00 2001 From: Sharpz7 Date: Fri, 26 Jan 2024 05:18:23 +0000 Subject: [PATCH] [codespell] Adding Tox Target for Codespell Second in a series of commits to add Codespell to Ironic Repos. This one adds the command that was used to fix the spelling errors. Future Commits will add CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame. Change-Id: I90886dbb7ad7adf5520f8cc436012fa63c89ca78 --- setup.cfg | 6 ++++++ tox.ini | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/setup.cfg b/setup.cfg index d2d0a9b..c6e5e94 100644 --- a/setup.cfg +++ b/setup.cfg @@ -37,3 +37,9 @@ virtualbmc = stop = virtualbmc.cmd.vbmc:StopCommand list = virtualbmc.cmd.vbmc:ListCommand show = virtualbmc.cmd.vbmc:ShowCommand + +[codespell] +quiet-level = 4 +# Words to ignore: +# cna: Intel CNA card +ignore-words-list = cna \ No newline at end of file diff --git a/tox.ini b/tox.ini index 54c6298..5c66365 100644 --- a/tox.ini +++ b/tox.ini @@ -76,3 +76,12 @@ import-order-style = pep8 application-import-names = virtualbmc exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build max-complexity=17 + +[testenv:codespell] +description = + Run codespell to check spelling +deps = codespell +# note(JayF): {posargs} lets us run `tox -ecodespell -- -w` to get codespell +# to correct spelling issues in our code it's aware of. +commands = + codespell {posargs} \ No newline at end of file