mirror of
https://github.com/codespell-project/codespell.git
synced 2025-08-06 09:40:56 +08:00
Allow to use --skip multiple times (#1351)
Make it possible to add custom system-wide ignored directories with an alias in shell rc script, e.g.: alias codespell="codespell --skip=".git,node_modules" and allow to extend this list by executing codespell alias with extra --skip argument.
This commit is contained in:

committed by
Eric Larson

parent
c3ac74d92b
commit
233d76c21b
@ -58,7 +58,8 @@ class QuietLevels(object):
|
||||
class GlobMatch(object):
|
||||
def __init__(self, pattern):
|
||||
if pattern:
|
||||
self.pattern_list = pattern.split(',')
|
||||
# Pattern might be a list of comma-delimited strings
|
||||
self.pattern_list = ','.join(pattern).split(',')
|
||||
else:
|
||||
self.pattern_list = None
|
||||
|
||||
@ -243,6 +244,7 @@ def parse_options(args):
|
||||
help='print summary of fixes')
|
||||
|
||||
parser.add_argument('-S', '--skip',
|
||||
action='append',
|
||||
help='Comma-separated list of files to skip. It '
|
||||
'accepts globs as well. E.g.: if you want '
|
||||
'codespell to skip .eps and .txt files, '
|
||||
|
Reference in New Issue
Block a user