Skip to content

Commit

Permalink
Add note about --exclude-file in README and update help text
Browse files Browse the repository at this point in the history
  • Loading branch information
bwitt committed Jan 3, 2022
1 parent 702e948 commit c807a6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ The ``-I`` flag can be used for a list of certain words to allow that are in the

The ``-L`` flag can be used to allow certain words that are comma-separated placed immediately after it. **Important note:** The list passed to ``-L`` is case-sensitive based on how it is listed in the codespell dictionaries. ::

codespell -x FILE, --exclude-file=FILE

Ignore whole lines that match those in ``FILE``. The lines in ``FILE`` should match the to-be-excluded lines exactly.

codespell -S, --skip=

Comma-separated list of files to skip. It accepts globs as well. Examples:
Expand Down
5 changes: 3 additions & 2 deletions codespell_lib/_codespell.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,9 @@ def parse_options(args):
'you\'d give "*.eps,*.txt" to this option.')

parser.add_argument('-x', '--exclude-file', type=str, metavar='FILE',
help='FILE with lines that should not be checked for '
'errors or changed')
help='ignore whole lines that match those '
'in the file FILE. The lines in FILE '
'should match the to-be-excluded lines exactly')

parser.add_argument('-i', '--interactive',
action='store', type=int, default=0,
Expand Down

0 comments on commit c807a6c

Please sign in to comment.