mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 17:15:44 +01:00
Factor record_issue into its own method
This commit is contained in:
parent
556d7d9e3b
commit
043980585c
@ -43,12 +43,15 @@ class IssueTracker(object):
|
|||||||
for i, line in enumerate(iter(f.readline, b"")):
|
for i, line in enumerate(iter(f.readline, b"")):
|
||||||
self.check_file_line(filepath, line, i + 1)
|
self.check_file_line(filepath, line, i + 1)
|
||||||
|
|
||||||
def check_file_line(self, filepath, line, line_number):
|
def record_issue(self, filepath, line_number):
|
||||||
if self.issue_with_line(line):
|
|
||||||
if filepath not in self.files_with_issues.keys():
|
if filepath not in self.files_with_issues.keys():
|
||||||
self.files_with_issues[filepath] = []
|
self.files_with_issues[filepath] = []
|
||||||
self.files_with_issues[filepath].append(line_number)
|
self.files_with_issues[filepath].append(line_number)
|
||||||
|
|
||||||
|
def check_file_line(self, filepath, line, line_number):
|
||||||
|
if self.issue_with_line(line):
|
||||||
|
self.record_issue(filepath, line_number)
|
||||||
|
|
||||||
def output_file_issues(self, logger):
|
def output_file_issues(self, logger):
|
||||||
if self.files_with_issues.values():
|
if self.files_with_issues.values():
|
||||||
logger.info(self.heading)
|
logger.info(self.heading)
|
||||||
|
Loading…
Reference in New Issue
Block a user