From d5f9b2ed0a14abf61614e0067ccc64ae98b3ff77 Mon Sep 17 00:00:00 2001 From: Sharpz7 Date: Mon, 29 Jan 2024 18:59:22 +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: I07e04a289871a1c547797ba9eb259571dc3b6767 --- setup.cfg | 5 +++++ tox.ini | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/setup.cfg b/setup.cfg index 5c9f4f3..f4836e4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -46,3 +46,8 @@ openstack.baremetal_introspection.v1 = [extras] cli = python-openstackclient>=3.12.0 # Apache-2.0 + +[codespell] +quiet-level = 4 +# Words to ignore: +ignore-words-list = example \ No newline at end of file diff --git a/tox.ini b/tox.ini index 9f68e72..18d7c0a 100644 --- a/tox.ini +++ b/tox.ini @@ -121,3 +121,12 @@ import_exceptions = ironic_inspector_client.common.i18n # separately, outside of the requirements files. deps = bindep commands = bindep test + +[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