Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about --exclude-file in README and update the help text also #2052

Merged
merged 1 commit into from
Jan 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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