@@ -137,7 +137,8 @@ class GnatcheckDriver(BaseDriver):
137137 output_formats = set (["brief" , "full" , "short" , "xml" ])
138138
139139 flag_line_pattern = re .compile (
140- rf"^({ BaseDriver .ada_file_pattern } ):(\d+):\d+: (rule violation|warning|error): .*$"
140+ rf"^({ BaseDriver .ada_file_pattern } ):(\d+):\d+: (rule violation|warning|error)"
141+ ": .*$"
141142 )
142143
143144 @classmethod
@@ -415,7 +416,7 @@ def run_one_test(test_data: dict[str, any]) -> None:
415416 exe = GnatcheckDriver .modes [test_data .get ("mode" , "gnatcheck" )]
416417 args = [exe , "-q" ]
417418 output_file_name = test_data .get ("output_file" )
418- if output_file_name is None or output_file_name == True :
419+ if output_file_name is None or output_file_name is True :
419420 output_file_name = self .working_dir (
420421 f"{ exe } .{ 'xml' if output_format == 'xml' else 'out' } "
421422 )
@@ -635,12 +636,13 @@ def run_one_test(test_data: dict[str, any]) -> None:
635636 # include in the test baseline.
636637 report_file_content = "" .join (f .readlines ()[9 :])
637638 has_output_file = True
638- except FileNotFoundError as _ :
639+ except FileNotFoundError :
639640 self .output += (
640641 "testsuite_driver: No output file generated by gnatcheck\n "
641642 )
642643
643- # Get the lines flagged by the test running and add it to all flagged lines
644+ # Get the lines flagged by the test running and add it to all flagged
645+ # lines.
644646 if self .flag_checking and (has_output_file or output_format == "brief" ):
645647 add_to_files_flagged_lines (
646648 self .parse_flagged_lines (
0 commit comments