Misra.py fix multiple file processing (#1332)
* MISRA addon: Support multiple files with argparse * MISRA addon fix exit code Fix to run all dump files then exit with error code if any error in any file found.
This commit is contained in:
parent
9e3b392ec6
commit
4e25da7b9d
|
@ -1836,7 +1836,7 @@ def parseDump(dumpfile):
|
|||
print("\nRule violations found: %d\n" % (len(VIOLATIONS)))
|
||||
exitCode = 1
|
||||
|
||||
sys.exit(exitCode)
|
||||
return exitCode
|
||||
|
||||
|
||||
RULE_TEXTS_HELP = '''Path to text file of MISRA rules
|
||||
|
@ -1900,5 +1900,9 @@ else:
|
|||
if args.no_summary:
|
||||
SHOW_SUMMARY = False
|
||||
if args.dumpfile:
|
||||
exitCode = 0
|
||||
for item in args.dumpfile:
|
||||
parseDump(item)
|
||||
checkCode = parseDump(item)
|
||||
if checkCode != 0:
|
||||
exitCode = checkCode
|
||||
sys.exit(exitCode)
|
||||
|
|
Loading…
Reference in New Issue