Skip to content

Commit dfabc3f

Browse files
dave3dCopilot
andauthored
docs: add package installation instructions
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 741f9db commit dfabc3f

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,31 @@ The CommentSpellCheck (CSC) package provides a script that automatically
77
spell checks the comments of a code base. It was originally developed to
88
be run on the SimpleITK and ITK code bases.
99

10+
## Installation
11+
12+
Install the package from PyPI with:
13+
14+
python -m pip install comment-spell-check
15+
16+
This installs the `comment_spell_check` command, used in the example below.
17+
18+
To use CommentSpellCheck as a pre-commit hook, add the following to your
19+
`.pre-commit-config.yaml`, replacing `vX.Y.Z` with the release tag you want:
20+
21+
```yaml
22+
repos:
23+
- repo: https://github.com/SimpleITK/CommentSpellCheck
24+
rev: vX.Y.Z
25+
hooks:
26+
- id: comment-spell-check
27+
```
28+
29+
Pre-commit installs this hook from the GitHub repository; a separate PyPI
30+
installation is not needed for the hook.
31+
1032
Here is how it is typically run:
1133
12-
python comment_spell_check.py --exclude Ancillary $SIMPLEITK_SOURCE_DIR/Code
34+
comment_spell_check --exclude Ancillary $SIMPLEITK_SOURCE_DIR/Code
1335
1436
This command will recursively find all the \'.h\' files in a directory,
1537
extract the C/C++ comments from the code, and run a spell checker on them.

0 commit comments

Comments
 (0)