From c807a6cdd1cc88e1a7c75970c855b0b53d4521ac Mon Sep 17 00:00:00 2001 From: Brian Witt Date: Tue, 31 Aug 2021 21:46:44 -0700 Subject: [PATCH] Add note about --exclude-file in README and update help text --- README.rst | 4 ++++ codespell_lib/_codespell.py | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index dab29a8834..9a3f7c7425 100644 --- a/README.rst +++ b/README.rst @@ -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: diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py index 86cc2c07b1..7065e0b4d3 100644 --- a/codespell_lib/_codespell.py +++ b/codespell_lib/_codespell.py @@ -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,