Skip to content
Snippets Groups Projects
Commit be7f079c authored by Grigoris Pavlakis's avatar Grigoris Pavlakis Committed by kongr45gpen
Browse files

Fix a bug caused by not converting number strings to numbers

parent 635b9000
No related branches found
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ class Summarizer(object): ...@@ -57,7 +57,7 @@ class Summarizer(object):
print(self.bold + self.red + "=================================================\n" + self.end) print(self.bold + self.red + "=================================================\n" + self.end)
print(self.bold + self.red + " Static analysis results: Error Summary \n" + self.end) print(self.bold + self.red + " Static analysis results: Error Summary \n" + self.end)
for file_name in errors: for file_name in errors:
for error in sorted(errors[file_name], key=lambda x: x[0]): for error in sorted(errors[file_name], key=lambda x: int(x[0])):
name_string = f"{self.bold}{self.red}File {self.yellow}{file_name}{self.red}" name_string = f"{self.bold}{self.red}File {self.yellow}{file_name}{self.red}"
rule_violated_string = f"violates rule {self.yellow}#{error[1]}{self.red} of the MISRA C 2012 standard" rule_violated_string = f"violates rule {self.yellow}#{error[1]}{self.red} of the MISRA C 2012 standard"
line_number_string = f"at line {self.yellow}{error[0]}{self.end}" line_number_string = f"at line {self.yellow}{error[0]}{self.end}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment