From 741f9db6ddb40efc4d1a7db0883ce6d5f3211a1b Mon Sep 17 00:00:00 2001 From: dave3d <611581+dave3d@users.noreply.github.com> Date: Tue, 17 Nov 2026 18:30:48 +0000 Subject: [PATCH 1/2] Initial plan From dfabc3ffac7499898c8aec6f0d37c3074ed60436 Mon Sep 17 00:00:00 2001 From: dave3d <611581+dave3d@users.noreply.github.com> Date: Tue, 17 Nov 2026 18:32:26 +0000 Subject: [PATCH 2/2] docs: add package installation instructions Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0cce75f..936b70c 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,31 @@ The CommentSpellCheck (CSC) package provides a script that automatically spell checks the comments of a code base. It was originally developed to be run on the SimpleITK and ITK code bases. +## Installation + +Install the package from PyPI with: + + python -m pip install comment-spell-check + +This installs the `comment_spell_check` command, used in the example below. + +To use CommentSpellCheck as a pre-commit hook, add the following to your +`.pre-commit-config.yaml`, replacing `vX.Y.Z` with the release tag you want: + +```yaml +repos: +- repo: https://github.com/SimpleITK/CommentSpellCheck + rev: vX.Y.Z + hooks: + - id: comment-spell-check +``` + +Pre-commit installs this hook from the GitHub repository; a separate PyPI +installation is not needed for the hook. + Here is how it is typically run: - python comment_spell_check.py --exclude Ancillary $SIMPLEITK_SOURCE_DIR/Code + comment_spell_check --exclude Ancillary $SIMPLEITK_SOURCE_DIR/Code This command will recursively find all the \'.h\' files in a directory, extract the C/C++ comments from the code, and run a spell checker on them.