From 74f9c7ce8fb5c87ec5543c62509f9bf3b790932b Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Fri, 13 Aug 2021 23:13:21 +0300 Subject: [PATCH] Spelling. - Add the code-spell pre-commit hook. - Correct the spelling errors it found. --- .pre-commit-config.yaml | 5 +++++ README.rst | 4 ++-- tests/test_nagios.py | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e4b300e..c182dc4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,11 @@ repos: hooks: - id: detect-secrets + - repo: https://github.com/codespell-project/codespell.git + rev: v2.1.0 + hooks: + - id: codespell + - repo: https://github.com/adrienverge/yamllint rev: v1.26.1 hooks: diff --git a/README.rst b/README.rst index ce5192f..422ae22 100644 --- a/README.rst +++ b/README.rst @@ -10,7 +10,7 @@ It is intended for my personal use as the warning and critical alerts go to `my notification mechanism <https://git.shore.co.il/nimrod/nextcloud-notifier>`_. There is a small-ish binary that is created in the CI pipeline that doesn't have any external dependencies (like the Python VM or any 3rd party Python packages). -The latest binary is avaiable at +The latest binary is available at https://git.shore.co.il/shore/mnpw/-/jobs/artifacts/master/raw/dist/mnpw?job=build-executable and should work all Linux distro with glibc 2.17 or newer. @@ -73,7 +73,7 @@ To run all of the tests locally: All of those tests (and more) run in the `CI pipeline <https://git.shore.co.il/shore/mnpw/-/pipelines>`_ on each push. -To release a new verion: +To release a new version: .. code:: shell diff --git a/tests/test_nagios.py b/tests/test_nagios.py index 385961b..4e0598a 100644 --- a/tests/test_nagios.py +++ b/tests/test_nagios.py @@ -47,14 +47,14 @@ PERF_DATA = [ ], ) def test_check_exec(command, args, exit_code): - """Test the executation of checks.""" + """Test the execution of checks.""" check = nagios.Check(command, args) check.run() assert check.ExitCode == exit_code def test_check_command_not_found(): - """Test check with a nonexistant command.""" + """Test check with a nonexistent command.""" check = nagios.Check("/abcdef", []) with pytest.raises(RuntimeError): check.run() -- GitLab