misra.py: Reformatting output

This commit is contained in:
Daniel Marjamäki 2017-08-15 20:34:44 +02:00
parent 6303437163
commit 051fb55e2c
1 changed files with 3 additions and 3 deletions

View File

@ -27,11 +27,11 @@ def reportError(location, num1, num2):
VERIFY_ACTUAL.append(str(location.linenr) + ':' + str(num1) + '.' + str(num2))
else:
num = num1 * 100 + num2
id = 'misra-c2012-' + str(num1) + '.' + str(num2)
if num in ruleTexts:
errmsg = ruleTexts[num] + ' [misra-c2012-' + str(num1) + '.' + str(num2) + ']'
errmsg = ruleTexts[num] + ' [' + id + ']'
else:
errmsg = 'misra rule ' + str(num1) + '.' + str(num2) +\
' violation (use --rule-texts=<file> to get proper output)'
errmsg = 'misra violation (use --rule-texts=<file> to get proper output) [' + id + ']'
sys.stderr.write('[' + location.file + ':' + str(location.linenr) + '] ' + errmsg + '\n')