misra.py: better handling of --get-rule-text
This commit is contained in:
parent
c17e2b9826
commit
e64e5811ab
|
@ -4063,8 +4063,9 @@ class MisraChecker:
|
||||||
errmsg = 'misra violation (use --rule-texts=<file> to get proper output)'
|
errmsg = 'misra violation (use --rule-texts=<file> to get proper output)'
|
||||||
if self.path_premium_addon:
|
if self.path_premium_addon:
|
||||||
for line in cppcheckdata.cmd_output([self.path_premium_addon, '--cli', '--get-rule-text=' + errorId]).split('\n'):
|
for line in cppcheckdata.cmd_output([self.path_premium_addon, '--cli', '--get-rule-text=' + errorId]).split('\n'):
|
||||||
if not line.startswith('{'):
|
if len(line) > 1 and not line.startswith('{'):
|
||||||
errmsg = line
|
errmsg = line
|
||||||
|
break
|
||||||
else:
|
else:
|
||||||
errmsg = 'misra violation %s with no text in the supplied rule-texts-file' % (ruleNum)
|
errmsg = 'misra violation %s with no text in the supplied rule-texts-file' % (ruleNum)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue