From fd0d8171b7f18519ee79a167450e8c395bf373fc Mon Sep 17 00:00:00 2001 From: Sharpz7 Date: Thu, 25 Jan 2024 21:22:18 +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: I2e356fb4dea543d6e57614394d439a6767498f8d --- setup.cfg | 6 ++++++ tox.ini | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/setup.cfg b/setup.cfg index 5a3592650..e2d2d0ed7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -89,3 +89,9 @@ oslo.policy.enforcer = ironic_inspector = ironic_inspector.policy:get_oslo_policy_enforcer oslo.policy.policies = ironic_inspector.api = ironic_inspector.policy:list_policies + +[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 861bbd484..413687a1c 100644 --- a/tox.ini +++ b/tox.ini @@ -127,3 +127,11 @@ commands = bandit -r ironic_inspector -x test -n 5 -ll -c tools/bandit.yml 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