Handle FILE_EXCEPTIONS properly
The test for exceptions was testing the full path instead of just the file. Also, fix invocation of validate_all_files. Change-Id: Iecc48b40cbd19769b983017083b1427a057c1e0c
This commit is contained in:
parent
f18cdc1c43
commit
3da9ba776b
5
test.py
5
test.py
|
@ -364,7 +364,7 @@ def validate_individual_files(rootdir, exceptions, verbose,
|
||||||
for f in modified_files:
|
for f in modified_files:
|
||||||
base_f = os.path.basename(f)
|
base_f = os.path.basename(f)
|
||||||
if (base_f == "pom.xml" or
|
if (base_f == "pom.xml" or
|
||||||
f in exceptions):
|
base_f in exceptions):
|
||||||
continue
|
continue
|
||||||
any_failures = validate_one_file(
|
any_failures = validate_one_file(
|
||||||
schema, rootdir, f, verbose, any_failures,
|
schema, rootdir, f, verbose, any_failures,
|
||||||
|
@ -630,7 +630,8 @@ def main(args):
|
||||||
if args.check_syntax or args.check_niceness:
|
if args.check_syntax or args.check_niceness:
|
||||||
if args.force:
|
if args.force:
|
||||||
validate_all_files(args.path, FILE_EXCEPTIONS, args.verbose,
|
validate_all_files(args.path, FILE_EXCEPTIONS, args.verbose,
|
||||||
args.check_niceness, args.non_voting)
|
args.check_syntax, args.check_niceness,
|
||||||
|
args.non_voting)
|
||||||
else:
|
else:
|
||||||
validate_individual_files(args.path, FILE_EXCEPTIONS,
|
validate_individual_files(args.path, FILE_EXCEPTIONS,
|
||||||
args.verbose, args.check_syntax,
|
args.verbose, args.check_syntax,
|
||||||
|
|
Loading…
Reference in New Issue