From f1d47a9f48922f5ee38167cfa8f710a7284a78ad Mon Sep 17 00:00:00 2001 From: Sharpz7 Date: Thu, 25 Jan 2024 21:31:43 +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: I2db37013bdfa85055be9f1a620424ea50e993da0 --- setup.cfg | 7 +++++++ tox.ini | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/setup.cfg b/setup.cfg index 3c29faf46..66a9b7956 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,3 +28,10 @@ packages = console_scripts = bifrost_inventory.py = bifrost.inventory:main bifrost_inventory = bifrost.inventory:main + +[codespell] +quiet-level = 4 +# Words to ignore: +# - te: This is a file extension. +# - Buil: Surname (has to be lowercase in list) +ignore-words-list = te,buil \ No newline at end of file diff --git a/tox.ini b/tox.ini index e363409eb..3c5149c54 100644 --- a/tox.ini +++ b/tox.ini @@ -83,3 +83,12 @@ deps = ansible-lint>=6,<7 commands = bash tools/ansible-lint.sh + +[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