From 509d12e60a5c48b23a47f281ab3e650f119edda7 Mon Sep 17 00:00:00 2001 From: Sharpz7 Date: Fri, 26 Jan 2024 04:05:08 +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: I659e85270fa0024f69f57ffd6002c2eb20c3b1f4 --- setup.cfg | 5 +++++ tox.ini | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/setup.cfg b/setup.cfg index e9f42b0..bda4250 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,3 +30,8 @@ packages = oslo.messaging.notify.drivers = prometheus_exporter = ironic_prometheus_exporter.messaging:PrometheusFileDriver file_exporter = ironic_prometheus_exporter.messaging:SimpleFileDriver + +[codespell] +quiet-level = 4 +# Words to ignore: +; ignore-words-list = example diff --git a/tox.ini b/tox.ini index 1113a0e..ee9a8ba 100644 --- a/tox.ini +++ b/tox.ini @@ -72,3 +72,12 @@ application-import-names = ironic_prometheus_exporter exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build import-order-style = pep8 show-source = True + +[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