pylintrc_travis: Add check for bad-indentation, fix issues in misra.py (#2349)

This commit is contained in:
Sebastian 2019-11-11 13:53:19 +01:00 committed by GitHub
parent 02adb60f08
commit 1daf076d63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 18 deletions

View File

@ -2268,28 +2268,28 @@ class MisraChecker:
def showSuppressedRules(self):
"""
Print out rules in suppression list sorted by Rule Number
"""
print("Suppressed Rules List:")
outlist = list()
"""
Print out rules in suppression list sorted by Rule Number
"""
print("Suppressed Rules List:")
outlist = list()
for ruleNum in self.suppressedRules:
fileDict = self.suppressedRules[ruleNum]
for ruleNum in self.suppressedRules:
fileDict = self.suppressedRules[ruleNum]
for fname in fileDict:
ruleItemList = fileDict[fname]
for fname in fileDict:
ruleItemList = fileDict[fname]
for item in ruleItemList:
if item is None:
item_str = "None"
else:
item_str = str(item[0])
for item in ruleItemList:
if item is None:
item_str = "None"
else:
item_str = str(item[0])
outlist.append("%s: %s: %s (%d locations suppressed)" % (float(ruleNum)/100,fname,item_str, self.suppressionStats.get(ruleNum, 0)))
outlist.append("%s: %s: %s (%d locations suppressed)" % (float(ruleNum)/100,fname,item_str, self.suppressionStats.get(ruleNum, 0)))
for line in sorted(outlist, reverse=True):
print(" %s" % line)
for line in sorted(outlist, reverse=True):
print(" %s" % line)
def setFilePrefix(self, prefix):
"""

View File

@ -12,7 +12,7 @@ enable=mixed-indentation,
deprecated-method,
anomalous-unicode-escape-in-string,
anomalous-backslash-in-string,
#bad-indentation
bad-indentation
[REPORTS]
reports=no
[TYPECHECK]