pylintrc_travis: Add check for bad-indentation, fix issues in misra.py (#2349)
This commit is contained in:
parent
02adb60f08
commit
1daf076d63
|
@ -2268,28 +2268,28 @@ class MisraChecker:
|
||||||
|
|
||||||
|
|
||||||
def showSuppressedRules(self):
|
def showSuppressedRules(self):
|
||||||
"""
|
"""
|
||||||
Print out rules in suppression list sorted by Rule Number
|
Print out rules in suppression list sorted by Rule Number
|
||||||
"""
|
"""
|
||||||
print("Suppressed Rules List:")
|
print("Suppressed Rules List:")
|
||||||
outlist = list()
|
outlist = list()
|
||||||
|
|
||||||
for ruleNum in self.suppressedRules:
|
for ruleNum in self.suppressedRules:
|
||||||
fileDict = self.suppressedRules[ruleNum]
|
fileDict = self.suppressedRules[ruleNum]
|
||||||
|
|
||||||
for fname in fileDict:
|
for fname in fileDict:
|
||||||
ruleItemList = fileDict[fname]
|
ruleItemList = fileDict[fname]
|
||||||
|
|
||||||
for item in ruleItemList:
|
for item in ruleItemList:
|
||||||
if item is None:
|
if item is None:
|
||||||
item_str = "None"
|
item_str = "None"
|
||||||
else:
|
else:
|
||||||
item_str = str(item[0])
|
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):
|
for line in sorted(outlist, reverse=True):
|
||||||
print(" %s" % line)
|
print(" %s" % line)
|
||||||
|
|
||||||
def setFilePrefix(self, prefix):
|
def setFilePrefix(self, prefix):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -12,7 +12,7 @@ enable=mixed-indentation,
|
||||||
deprecated-method,
|
deprecated-method,
|
||||||
anomalous-unicode-escape-in-string,
|
anomalous-unicode-escape-in-string,
|
||||||
anomalous-backslash-in-string,
|
anomalous-backslash-in-string,
|
||||||
#bad-indentation
|
bad-indentation
|
||||||
[REPORTS]
|
[REPORTS]
|
||||||
reports=no
|
reports=no
|
||||||
[TYPECHECK]
|
[TYPECHECK]
|
||||||
|
|
Loading…
Reference in New Issue