misra.py: Reformatting output
This commit is contained in:
parent
6303437163
commit
051fb55e2c
|
@ -27,11 +27,11 @@ def reportError(location, num1, num2):
|
||||||
VERIFY_ACTUAL.append(str(location.linenr) + ':' + str(num1) + '.' + str(num2))
|
VERIFY_ACTUAL.append(str(location.linenr) + ':' + str(num1) + '.' + str(num2))
|
||||||
else:
|
else:
|
||||||
num = num1 * 100 + num2
|
num = num1 * 100 + num2
|
||||||
|
id = 'misra-c2012-' + str(num1) + '.' + str(num2)
|
||||||
if num in ruleTexts:
|
if num in ruleTexts:
|
||||||
errmsg = ruleTexts[num] + ' [misra-c2012-' + str(num1) + '.' + str(num2) + ']'
|
errmsg = ruleTexts[num] + ' [' + id + ']'
|
||||||
else:
|
else:
|
||||||
errmsg = 'misra rule ' + str(num1) + '.' + str(num2) +\
|
errmsg = 'misra violation (use --rule-texts=<file> to get proper output) [' + id + ']'
|
||||||
' violation (use --rule-texts=<file> to get proper output)'
|
|
||||||
sys.stderr.write('[' + location.file + ':' + str(location.linenr) + '] ' + errmsg + '\n')
|
sys.stderr.write('[' + location.file + ':' + str(location.linenr) + '] ' + errmsg + '\n')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue