implemented --do-not-use-default-exclude

This commit is contained in:
Klaus Zerwes 2022-08-08 20:56:47 +02:00
parent 94f081ad5d
commit 37fddb87f7

View File

@ -76,6 +76,13 @@ argparser.add_argument(
default=[], default=[],
help="path(s) to directories or files to skip.", help="path(s) to directories or files to skip.",
) )
argparser.add_argument(
'--do-not-use-default-exclude',
dest="no_general_exclude_paths",
action='store_true',
default=False,
help="do not use the default excludes",
)
argparser.add_argument( argparser.add_argument(
'-c', '--config', '-c', '--config',
dest="config", dest="config",
@ -178,12 +185,15 @@ for fqcn in copy.copy(fqcndict).values():
# build exclude_paths # build exclude_paths
exclude_paths = [] exclude_paths = []
for ep in args.exclude_paths + _general_exclude_paths: for ep in args.exclude_paths:
exclude_paths.append(ep) exclude_paths.append(ep)
if not args.no_general_exclude_paths:
for ep in _general_exclude_paths:
exclude_paths.append(ep)
exclude_paths.append(args.fqcnmapfile) exclude_paths.append(args.fqcnmapfile)
# update some args from optional config file # update some args from optional config file
config = False _config = False
if args.config: if args.config:
try: try:
with open(args.config) as ymlfile: with open(args.config) as ymlfile: