From da3fccba481af10f0675a4e7719aaccd8f5d9bbd Mon Sep 17 00:00:00 2001 From: Sharpz7 Date: Fri, 26 Jan 2024 04:11: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: Ie6d9f79138c39a530daeb471b2cf4a9bf19b5a98 --- setup.cfg | 5 +++++ tox.ini | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/setup.cfg b/setup.cfg index cdc116d..17245b2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,3 +23,8 @@ packages = # TODO(dtantsur): figure out a sane way to distribute tinyipa scripts data_files = share/ironic-python-agent-builder/dib = dib/* + +[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 07d825d..3957460 100644 --- a/tox.ini +++ b/tox.ini @@ -52,3 +52,13 @@ application-import-names = ironic_python_agent_builder # [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls # [H904] Delay string interpolations at logging calls. enable-extensions=H106,H203,H204,H205,H210,H904 + + +[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