| 1 |
Files in this folder support use of codespell [1], a utility that looks |
| 2 |
for common misspellings in files. You can use it in the development |
| 3 |
environment (pip install codespell to a venv) or from the CI. Typical |
| 4 |
usage is: |
| 5 |
|
| 6 |
codespell --count --ignore-words-list="sur,statics" \ |
| 7 |
NEWS README.md README.txt LICENSE |
| 8 |
|
| 9 |
The --ignore-words-list option *removes* matching entries from the |
| 10 |
dictionary of misspellings codespell attempts to correct. |
| 11 |
|
| 12 |
When let loose on the code base, codespell finds a lot of the mistakes |
| 13 |
in our javadoc and comments. The false alarm rate is low, but on a |
| 14 |
large body of code, high enough to drown out the useful reports. It is |
| 15 |
always necessary to prepare it with a list of known exceptions for the |
| 16 |
sub-set of the code base being inspected, e.g.: |
| 17 |
|
| 18 |
codespell --count --ignore-words=Misc/codespell/Lib.ignore Lib |
| 19 |
codespell --count --ignore-words=Misc/codespell/src.ignore src |
| 20 |
|
| 21 |
The --ignore-words option *removes* matching entries from the |
| 22 |
dictionary used for correction: one word per line in the file named. |
| 23 |
The idea is to use a different one for each source set. |
| 24 |
|
| 25 |
File here named *.ignore are intended (for now) for use interactively |
| 26 |
when checking a specified subset of source. |
| 27 |
|
| 28 |
words.ignore : words in our text files |
| 29 |
Lib.ignore : identifiers etc. in our Python Lib |
| 30 |
src.ignore : identifiers etc. in our main Java source |
| 31 |
|
| 32 |
|
| 33 |
References: |
| 34 |
|
| 35 |
[1] https://pypi.org/project/codespell |