From 89f3c18f38062378c3ae2a31b49a30f4907e39a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Domozi?= Date: Tue, 30 Sep 2025 11:18:03 +0200 Subject: [PATCH 1/9] Introduce plist.err and parse --status Currently, it is a problem to determine if the analysis was successful or failed during execution. With this patch, we will create plist.err files to indicate a failed analysis action. The parse --status command was also introduced to get the analysis summary of an existing report directory. --- .../analyzers/clangsa/result_handler.py | 7 ++- .../analyzers/clangtidy/result_handler.py | 7 ++- .../analyzers/cppcheck/result_handler.py | 7 ++- .../analyzers/infer/result_handler.py | 7 ++- analyzer/codechecker_analyzer/cli/parse.py | 60 +++++++++++++++++++ .../report/error_file.py | 27 +++++++++ 6 files changed, 111 insertions(+), 4 deletions(-) create mode 100644 tools/report-converter/codechecker_report_converter/report/error_file.py diff --git a/analyzer/codechecker_analyzer/analyzers/clangsa/result_handler.py b/analyzer/codechecker_analyzer/analyzers/clangsa/result_handler.py index 4585e7c09a..36c6880b94 100644 --- a/analyzer/codechecker_analyzer/analyzers/clangsa/result_handler.py +++ b/analyzer/codechecker_analyzer/analyzers/clangsa/result_handler.py @@ -14,7 +14,7 @@ from typing import Optional from codechecker_report_converter.report.parser.base import AnalyzerInfo -from codechecker_report_converter.report import report_file +from codechecker_report_converter.report import report_file, error_file from codechecker_report_converter.report.hash import get_report_hash, HashType from codechecker_common.logger import get_logger from codechecker_common.skiplist_handler import SkipListHandlers @@ -43,6 +43,11 @@ def postprocess_result( Generate analyzer result output file which can be parsed and stored into the database. """ + error_file.create( + self.analyzer_result_file, self.analyzer_returncode, + self.analyzer_info, self.analyzer_cmd, + self.analyzer_stdout, self.analyzer_stderr) + if os.path.exists(self.analyzer_result_file): reports = report_file.get_reports( self.analyzer_result_file, self.checker_labels, diff --git a/analyzer/codechecker_analyzer/analyzers/clangtidy/result_handler.py b/analyzer/codechecker_analyzer/analyzers/clangtidy/result_handler.py index 5bdb1dbc8c..83c5092325 100644 --- a/analyzer/codechecker_analyzer/analyzers/clangtidy/result_handler.py +++ b/analyzer/codechecker_analyzer/analyzers/clangtidy/result_handler.py @@ -15,7 +15,7 @@ AnalyzerResult from codechecker_report_converter.analyzers.clang_tidy.parser import Parser from codechecker_report_converter.report.parser.base import AnalyzerInfo -from codechecker_report_converter.report import report_file +from codechecker_report_converter.report import report_file, error_file from codechecker_report_converter.report.hash import get_report_hash, HashType from codechecker_common.logger import get_logger @@ -76,3 +76,8 @@ def postprocess_result( report_file.create( self.analyzer_result_file, reports, self.checker_labels, self.analyzer_info) + + error_file.create( + self.analyzer_result_file, self.analyzer_returncode, + self.analyzer_info, self.analyzer_cmd, + self.analyzer_stdout, self.analyzer_stderr) diff --git a/analyzer/codechecker_analyzer/analyzers/cppcheck/result_handler.py b/analyzer/codechecker_analyzer/analyzers/cppcheck/result_handler.py index 586da0ba62..029a01b00e 100644 --- a/analyzer/codechecker_analyzer/analyzers/cppcheck/result_handler.py +++ b/analyzer/codechecker_analyzer/analyzers/cppcheck/result_handler.py @@ -14,7 +14,7 @@ from codechecker_report_converter.analyzers.cppcheck.analyzer_result import \ AnalyzerResult from codechecker_report_converter.report import BugPathEvent, \ - Range, report_file + Range, report_file, error_file from codechecker_report_converter.report.hash import get_report_hash, HashType from codechecker_common.logger import get_logger @@ -95,3 +95,8 @@ def postprocess_result( report_file.create( self.analyzer_result_file, reports, self.checker_labels, self.analyzer_info) + + error_file.create( + self.analyzer_result_file, self.analyzer_returncode, + self.analyzer_info, self.analyzer_cmd, + self.analyzer_stdout, self.analyzer_stderr) diff --git a/analyzer/codechecker_analyzer/analyzers/infer/result_handler.py b/analyzer/codechecker_analyzer/analyzers/infer/result_handler.py index d0fd59877c..ae2a937a42 100644 --- a/analyzer/codechecker_analyzer/analyzers/infer/result_handler.py +++ b/analyzer/codechecker_analyzer/analyzers/infer/result_handler.py @@ -15,7 +15,7 @@ from codechecker_report_converter.report.parser.base import AnalyzerInfo from codechecker_report_converter.analyzers.infer.analyzer_result import \ AnalyzerResult -from codechecker_report_converter.report import report_file +from codechecker_report_converter.report import report_file, error_file from codechecker_report_converter.report.hash import get_report_hash, HashType from codechecker_common.logger import get_logger @@ -74,4 +74,9 @@ def postprocess_result( self.analyzer_result_file, reports, self.checker_labels, self.analyzer_info) + error_file.create( + self.analyzer_result_file, self.analyzer_returncode, + self.analyzer_info, self.analyzer_cmd, + self.analyzer_stdout, self.analyzer_stderr) + shutil.rmtree(Path(self.workspace, "infer", self.buildaction_hash)) diff --git a/analyzer/codechecker_analyzer/cli/parse.py b/analyzer/codechecker_analyzer/cli/parse.py index c0fb770817..c97c7aa428 100644 --- a/analyzer/codechecker_analyzer/cli/parse.py +++ b/analyzer/codechecker_analyzer/cli/parse.py @@ -14,6 +14,7 @@ import argparse import os import sys +import re from typing import Dict, Optional, Set import fnmatch @@ -28,6 +29,7 @@ from codechecker_analyzer import analyzer_context, suppress_handler +from codechecker_analyzer.analyzers.analyzer_types import supported_analyzers from codechecker_common import arg, logger, cmd_config from codechecker_common.review_status_handler import ReviewStatusHandler @@ -208,6 +210,14 @@ def add_arguments_to_parser(parser): help="Filter results by review statuses. Valid " f"values are: {', '.join(REVIEW_STATUS_VALUES)}") + parser.add_argument('--status', + dest="status", + action="store_true", + required=False, + default=argparse.SUPPRESS, + help="Print the number of successful and failed " + "analysis actions.") + group = parser.add_argument_group("file filter arguments") group.add_argument('-i', '--ignore', '--skip', @@ -263,6 +273,52 @@ def get_metadata(dir_path: str) -> Optional[Dict]: return None +def print_status(inputs): + if len(inputs) != 1: + LOG.error("Parse status can only be printed " + "for one directory.") + sys.exit(1) + + report_dir = inputs[0] + + if not os.path.isdir(report_dir): + LOG.error("Input path '%s' is not a directory.", + report_dir) + sys.exit(1) + + successful = {} + failed = {} + + report_dir_files = {os.fsdecode(e) for e in + os.listdir(os.fsencode(report_dir))} + + for analyzer in supported_analyzers: + plist_re = re.compile(fr'.*_{analyzer}_[0-9a-f]+\.plist$') + plist_err_re = re.compile(fr'.*_{analyzer}_[0-9a-f]+\.plist\.err$') + successful[analyzer] = 0 + failed[analyzer] = 0 + + for file in report_dir_files: + if (plist_re.match(file) and + f"{file}.err" not in report_dir_files): + successful[analyzer] += 1 + + if plist_err_re.match(file): + failed[analyzer] += 1 + + LOG.info("----==== Summary ====----") + LOG.info("Successfully analyzed") + for analyzer in supported_analyzers: + if successful[analyzer] > 0: + LOG.info(" %s: %s", analyzer, successful[analyzer]) + + LOG.info("Failed to analyze") + for analyzer in supported_analyzers: + if failed[analyzer] > 0: + LOG.info(" %s: %s", analyzer, failed[analyzer]) + LOG.info("----=================----") + + def main(args): """ Entry point for parsing some analysis results and printing them to the @@ -311,6 +367,10 @@ def main(args): if isinstance(args.input, str): args.input = [args.input] + if 'status' in args: + print_status(args.input) + return + src_comment_status_filter = args.review_status suppr_handler = None diff --git a/tools/report-converter/codechecker_report_converter/report/error_file.py b/tools/report-converter/codechecker_report_converter/report/error_file.py new file mode 100644 index 0000000000..d844a9b380 --- /dev/null +++ b/tools/report-converter/codechecker_report_converter/report/error_file.py @@ -0,0 +1,27 @@ +# ------------------------------------------------------------------------- +# +# Part of the CodeChecker project, under the Apache License v2.0 with +# LLVM Exceptions. See LICENSE for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# ------------------------------------------------------------------------- + +from codechecker_report_converter.report.parser import plist + + +def create(output_path, return_code, analyzer_info, + analyzer_cmd, stdout, stderr): + if return_code == 0: + return + + parser = plist.Parser() + + data = { + 'analyzer_name': analyzer_info.name, + 'analyzer_cmd': analyzer_cmd, + 'return_code': return_code, + 'stdout': stdout, + 'stderr': stderr + } + + parser.write(data, output_path + ".err") From 685d6b80b93a403f0553c5d7b28f2bd1e027a536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Domozi?= Date: Fri, 28 Nov 2025 09:36:23 +0000 Subject: [PATCH 2/9] Added export to JSON and detailed flag --- .../analyzers/result_handler_base.py | 43 +--- analyzer/codechecker_analyzer/cli/parse.py | 207 ++++++++++++++---- analyzer/codechecker_analyzer/util.py | 52 +++++ 3 files changed, 224 insertions(+), 78 deletions(-) create mode 100644 analyzer/codechecker_analyzer/util.py diff --git a/analyzer/codechecker_analyzer/analyzers/result_handler_base.py b/analyzer/codechecker_analyzer/analyzers/result_handler_base.py index 2e35ce3561..fb2508d2b1 100644 --- a/analyzer/codechecker_analyzer/analyzers/result_handler_base.py +++ b/analyzer/codechecker_analyzer/analyzers/result_handler_base.py @@ -9,14 +9,13 @@ Result handlers to manage the output of the static analyzers. """ -import hashlib import os -import shlex from abc import ABCMeta from typing import Optional from codechecker_analyzer import analyzer_context +from codechecker_analyzer.util import analyzer_action_hash from codechecker_common.logger import get_logger from codechecker_common.skiplist_handler import SkipListHandlers from codechecker_common.review_status_handler import ReviewStatusHandler @@ -99,43 +98,9 @@ def analyzer_action_str(self): """ analyzed_file_name = os.path.basename(self.analyzed_source_file) - source_file = os.path.normpath( - os.path.join(self.buildaction.directory, - self.analyzed_source_file)) - - # In case of "make 4.3" depending on compile-time options "make" tool - # can be built so a subprocess named cc1build will be logged by - # "CodeChecker log". - # See posix_spawn() option: - # https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html - # In this case the -o output argument of cc1build command is a randomly - # named temporary file. We can't afford dynamic parts in the original - # build command, because its hash is used for identification in the - # plist file name. - # - # The proper logging of this "make 4.3" version has been done in - # bf140d6, so it is unlikely happen that two build actions differ only - # in their "-o" flags. This workaround is still kept for any case. - # - # Note that some information loss occurs during the following algorithm - # because ' '.join(shlex.split(cmd)) is not necessarily equal to cmd: - # g++ -DVAR="hello world" main.cpp - - args = shlex.split(self.buildaction.original_command) - indices = [idx for idx, v in enumerate(args) if v.startswith('-o')] - - for idx in reversed(indices): - # Output can be given separate or joint: - # -o a.out vs. -oa.out - # In the first case we delete its argument too. - if args[idx] == '-o': - del args[idx] - del args[idx] - - build_info = source_file + '_' + ' '.join(args) - - self.buildaction_hash = \ - hashlib.md5(build_info.encode(errors='ignore')).hexdigest() + self.buildaction_hash = analyzer_action_hash(self.analyzed_source_file, + self.buildaction.directory, + self.buildaction.original_command) return analyzed_file_name + '_' + \ str(self.buildaction.analyzer_type) + '_' + \ diff --git a/analyzer/codechecker_analyzer/cli/parse.py b/analyzer/codechecker_analyzer/cli/parse.py index c97c7aa428..1b12b09a30 100644 --- a/analyzer/codechecker_analyzer/cli/parse.py +++ b/analyzer/codechecker_analyzer/cli/parse.py @@ -14,8 +14,8 @@ import argparse import os import sys -import re from typing import Dict, Optional, Set +import json import fnmatch from codechecker_report_converter.util import dump_json_output @@ -29,6 +29,7 @@ from codechecker_analyzer import analyzer_context, suppress_handler +from codechecker_analyzer.util import analyzer_action_hash from codechecker_analyzer.analyzers.analyzer_types import supported_analyzers from codechecker_common import arg, logger, cmd_config @@ -143,7 +144,6 @@ def add_arguments_to_parser(parser): output_opts.add_argument('-o', '--output', dest="output_path", - default=argparse.SUPPRESS, help="Store the output in the given file/folder. " "Note: baseline files must have extension " "'.baseline'.") @@ -214,10 +214,15 @@ def add_arguments_to_parser(parser): dest="status", action="store_true", required=False, - default=argparse.SUPPRESS, help="Print the number of successful and failed " "analysis actions.") + parser.add_argument('--detailed', + dest="detailed", + action="store_true", + required=False, + help="Enables detailed view for the status command.") + group = parser.add_argument_group("file filter arguments") group.add_argument('-i', '--ignore', '--skip', @@ -234,7 +239,6 @@ def add_arguments_to_parser(parser): dest="files", metavar='FILE', required=False, - default=argparse.SUPPRESS, help="Filter results by file path. " "The file path can contain multiple * " "quantifiers which matches any number of " @@ -273,12 +277,124 @@ def get_metadata(dir_path: str) -> Optional[Dict]: return None -def print_status(inputs): +def get_report_dir_status(compile_commands: list[dict[str, str]], + report_dir: str, + detailed_flag: bool): + + recent, old, failed, missing, analyzed_actions = {}, {}, {}, {}, {} + + for analyzer in supported_analyzers: + recent[analyzer] = {} + old[analyzer] = {} + failed[analyzer] = {} + missing[analyzer] = {} + + report_dir_files = {os.fsdecode(e) for e in + os.listdir(os.fsencode(report_dir))} + + for c in compile_commands: + for analyzer in supported_analyzers: + file, dir, cmd = c["file"], c["directory"], c["command"] + + filename = os.path.basename(file) + action_hash = analyzer_action_hash(file, dir, cmd) + + plist_file = f"{filename}_{analyzer}_{action_hash}.plist" + plist_err_file = plist_file + ".err" + + if plist_err_file in report_dir_files: + analyzed_actions[cmd] = 1 + failed[analyzer][file] = 1 + elif plist_file in report_dir_files: + analyzed_actions[cmd] = 1 + plist_path = os.path.join(report_dir, plist_file) + + if os.path.getmtime(plist_path) > os.path.getmtime(file): + recent[analyzer][file] = 1 + else: + old[analyzer][file] = 1 + else: + missing[analyzer][file] = 1 + + var_map = { + "up-to-date": recent, + "outdated": old, + "missing": missing, + "failed": failed + } + + out_analyzers = {} + for analyzer in supported_analyzers: + detailed, summary = {}, {} + + for k, v in var_map.items(): + detailed[k] = list(v[analyzer].keys()) + summary[k] = len(detailed[k]) + + summary["successful"] = summary["up-to-date"] + summary["outdated"] + + out_analyzers[analyzer] = { + "summary": summary + } + + if detailed_flag: + out_analyzers[analyzer].update(detailed) + + """ + Expected output format example + + { + "analyzers": { + "clangsa": { + "summary": { + "up-to-date": 2, + "outdated": 0, + "missing": 1, + "failed": 0, + "successful": 2 + }, + "up-to-date": [ + "/workspace/tmp/foo.cpp", + "/workspace/tmp/bar.cpp", + ], + "outdated": [], + "missing": [ + "/workspace/tmp/test.c" + ], + "failed": [] + }, + "clang-tidy": { ... }, + }, + "total_analyzed_compilation_commands": 2, + "total_available_compilation_commands": 3 + } + """ + + return { + "analyzers": out_analyzers, + "total_analyzed_compilation_commands": len(analyzed_actions.keys()), + "total_available_compilation_commands": len(compile_commands) + } + + +def print_status(inputs: list[str], + detailed_flag: bool, + files: list[str], + export: str, + output_path: str): if len(inputs) != 1: LOG.error("Parse status can only be printed " "for one directory.") sys.exit(1) + if export and export != "json": + LOG.error("Only JSON export format is supported.") + sys.exit(1) + + if output_path and not export: + LOG.error("Export format (--export) was not specified.") + sys.exit(1) + report_dir = inputs[0] if not os.path.isdir(report_dir): @@ -286,37 +402,49 @@ def print_status(inputs): report_dir) sys.exit(1) - successful = {} - failed = {} - - report_dir_files = {os.fsdecode(e) for e in - os.listdir(os.fsencode(report_dir))} - - for analyzer in supported_analyzers: - plist_re = re.compile(fr'.*_{analyzer}_[0-9a-f]+\.plist$') - plist_err_re = re.compile(fr'.*_{analyzer}_[0-9a-f]+\.plist\.err$') - successful[analyzer] = 0 - failed[analyzer] = 0 - - for file in report_dir_files: - if (plist_re.match(file) and - f"{file}.err" not in report_dir_files): - successful[analyzer] += 1 - - if plist_err_re.match(file): - failed[analyzer] += 1 + compile_cmd_path = os.path.join(report_dir, "compile_cmd.json") + compile_commands = load_json(compile_cmd_path, []) - LOG.info("----==== Summary ====----") - LOG.info("Successfully analyzed") - for analyzer in supported_analyzers: - if successful[analyzer] > 0: - LOG.info(" %s: %s", analyzer, successful[analyzer]) + if not compile_commands: + LOG.error("Failed to load compile commands JSON '%s'.", + compile_cmd_path) + sys.exit(1) - LOG.info("Failed to analyze") - for analyzer in supported_analyzers: - if failed[analyzer] > 0: - LOG.info(" %s: %s", analyzer, failed[analyzer]) - LOG.info("----=================----") + if files: + files_filter = [os.path.abspath(fp) for fp in files] + compile_commands = list(filter(lambda c : + c["file"] in files_filter, compile_commands)) + + status = get_report_dir_status(compile_commands, report_dir, detailed_flag) + + def get_summary(analyzer): + return status["analyzers"][analyzer]["summary"] + + if not export and not output_path: + LOG.info("----==== Summary ====----") + LOG.info("Successfully analyzed") + for analyzer in supported_analyzers: + successful_count = get_summary(analyzer)["successful"] + if successful_count > 0: + LOG.info(" %s: %s", analyzer, successful_count) + + LOG.info("Failed to analyze") + for analyzer in supported_analyzers: + failed_count = get_summary(analyzer)["failed"] + if failed_count > 0: + LOG.info(" %s: %s", analyzer, failed_count) + LOG.info("Total analyzed compilation commands: %s", + status["total_analyzed_compilation_commands"]) + LOG.info("Total available compilation commands: %s", + status["total_available_compilation_commands"]) + LOG.info("----=================----") + elif export and not output_path: + json.dump(status, sys.stdout, indent=2) + elif export and output_path: + output_path = os.path.abspath(output_path) + with open(output_path, "w") as file: + json.dump(status, file, indent=2) + LOG.info("Status info was dumped to '%s'.", output_path) def main(args): @@ -367,8 +495,9 @@ def main(args): if isinstance(args.input, str): args.input = [args.input] - if 'status' in args: - print_status(args.input) + if args.status: + print_status(args.input, args.detailed, + args.files, args.export, args.output_path) return src_comment_status_filter = args.review_status @@ -402,7 +531,7 @@ def main(args): output_dir_path = None output_file_path = None - if 'output_path' in args: + if args.output_path: output_path = os.path.abspath(args.output_path) if export == 'html': @@ -436,7 +565,7 @@ def get_output_file_path(default_file_name: str) -> Optional[str]: return None skip_handlers = SkipListHandlers() - if 'files' in args: + if args.files: items = [f"+{file_path}" for file_path in args.files] items.append("-*") skip_handlers.append(SkipListHandler("\n".join(items))) @@ -474,7 +603,7 @@ def get_output_file_path(default_file_name: str) -> Optional[str]: metadata = get_metadata(dir_path) - if metadata and 'files' in args: + if metadata and args.files: # Mapping plists when files are specified to speed up parsing # The specifed_file_paths variable would be an empty list # if metadata.json did not contain the specified file or diff --git a/analyzer/codechecker_analyzer/util.py b/analyzer/codechecker_analyzer/util.py new file mode 100644 index 0000000000..a198fbb501 --- /dev/null +++ b/analyzer/codechecker_analyzer/util.py @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------- +# +# Part of the CodeChecker project, under the Apache License v2.0 with +# LLVM Exceptions. See LICENSE for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# ------------------------------------------------------------------------- +""" +Utility functions for the CodeChecker analyzer. +""" + +import os +import shlex +import hashlib + +def analyzer_action_hash(analyzed_source_file, build_dir, build_command): + source_file = os.path.normpath( + os.path.join(build_dir, + analyzed_source_file)) + + # In case of "make 4.3" depending on compile-time options "make" tool + # can be built so a subprocess named cc1build will be logged by + # "CodeChecker log". + # See posix_spawn() option: + # https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html + # In this case the -o output argument of cc1build command is a randomly + # named temporary file. We can't afford dynamic parts in the original + # build command, because its hash is used for identification in the + # plist file name. + # + # The proper logging of this "make 4.3" version has been done in + # bf140d6, so it is unlikely happen that two build actions differ only + # in their "-o" flags. This workaround is still kept for any case. + # + # Note that some information loss occurs during the following algorithm + # because ' '.join(shlex.split(cmd)) is not necessarily equal to cmd: + # g++ -DVAR="hello world" main.cpp + + args = shlex.split(build_command) + indices = [idx for idx, v in enumerate(args) if v.startswith('-o')] + + for idx in reversed(indices): + # Output can be given separate or joint: + # -o a.out vs. -oa.out + # In the first case we delete its argument too. + if args[idx] == '-o': + del args[idx] + del args[idx] + + build_info = source_file + '_' + ' '.join(args) + + return hashlib.md5(build_info.encode(errors='ignore')).hexdigest() From 04ef9de22624b4858b58dddc54d5c6c1900dc24d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Domozi?= Date: Fri, 28 Nov 2025 09:45:24 +0000 Subject: [PATCH 3/9] Fix linter errors --- .../analyzers/result_handler_base.py | 7 +- analyzer/codechecker_analyzer/cli/parse.py | 99 ++++++++++--------- analyzer/codechecker_analyzer/util.py | 1 + 3 files changed, 57 insertions(+), 50 deletions(-) diff --git a/analyzer/codechecker_analyzer/analyzers/result_handler_base.py b/analyzer/codechecker_analyzer/analyzers/result_handler_base.py index fb2508d2b1..4186609617 100644 --- a/analyzer/codechecker_analyzer/analyzers/result_handler_base.py +++ b/analyzer/codechecker_analyzer/analyzers/result_handler_base.py @@ -98,9 +98,10 @@ def analyzer_action_str(self): """ analyzed_file_name = os.path.basename(self.analyzed_source_file) - self.buildaction_hash = analyzer_action_hash(self.analyzed_source_file, - self.buildaction.directory, - self.buildaction.original_command) + self.buildaction_hash = \ + analyzer_action_hash(self.analyzed_source_file, + self.buildaction.directory, + self.buildaction.original_command) return analyzed_file_name + '_' + \ str(self.buildaction.analyzer_type) + '_' + \ diff --git a/analyzer/codechecker_analyzer/cli/parse.py b/analyzer/codechecker_analyzer/cli/parse.py index 1b12b09a30..09642fd287 100644 --- a/analyzer/codechecker_analyzer/cli/parse.py +++ b/analyzer/codechecker_analyzer/cli/parse.py @@ -14,7 +14,7 @@ import argparse import os import sys -from typing import Dict, Optional, Set +from typing import Dict, Optional, Set, List import json import fnmatch @@ -144,6 +144,7 @@ def add_arguments_to_parser(parser): output_opts.add_argument('-o', '--output', dest="output_path", + default=argparse.SUPPRESS, help="Store the output in the given file/folder. " "Note: baseline files must have extension " "'.baseline'.") @@ -214,6 +215,7 @@ def add_arguments_to_parser(parser): dest="status", action="store_true", required=False, + default=argparse.SUPPRESS, help="Print the number of successful and failed " "analysis actions.") @@ -221,6 +223,7 @@ def add_arguments_to_parser(parser): dest="detailed", action="store_true", required=False, + default=argparse.SUPPRESS, help="Enables detailed view for the status command.") group = parser.add_argument_group("file filter arguments") @@ -239,6 +242,7 @@ def add_arguments_to_parser(parser): dest="files", metavar='FILE', required=False, + default=argparse.SUPPRESS, help="Filter results by file path. " "The file path can contain multiple * " "quantifiers which matches any number of " @@ -277,7 +281,7 @@ def get_metadata(dir_path: str) -> Optional[Dict]: return None -def get_report_dir_status(compile_commands: list[dict[str, str]], +def get_report_dir_status(compile_commands: List[dict[str, str]], report_dir: str, detailed_flag: bool): @@ -294,10 +298,10 @@ def get_report_dir_status(compile_commands: list[dict[str, str]], for c in compile_commands: for analyzer in supported_analyzers: - file, dir, cmd = c["file"], c["directory"], c["command"] + file, directory, cmd = c["file"], c["directory"], c["command"] filename = os.path.basename(file) - action_hash = analyzer_action_hash(file, dir, cmd) + action_hash = analyzer_action_hash(file, directory, cmd) plist_file = f"{filename}_{analyzer}_{action_hash}.plist" plist_err_file = plist_file + ".err" @@ -340,35 +344,33 @@ def get_report_dir_status(compile_commands: list[dict[str, str]], if detailed_flag: out_analyzers[analyzer].update(detailed) - """ - Expected output format example - - { - "analyzers": { - "clangsa": { - "summary": { - "up-to-date": 2, - "outdated": 0, - "missing": 1, - "failed": 0, - "successful": 2 - }, - "up-to-date": [ - "/workspace/tmp/foo.cpp", - "/workspace/tmp/bar.cpp", - ], - "outdated": [], - "missing": [ - "/workspace/tmp/test.c" - ], - "failed": [] - }, - "clang-tidy": { ... }, - }, - "total_analyzed_compilation_commands": 2, - "total_available_compilation_commands": 3 - } - """ + # Expected output format example + # + # { + # "analyzers": { + # "clangsa": { + # "summary": { + # "up-to-date": 2, + # "outdated": 0, + # "missing": 1, + # "failed": 0, + # "successful": 2 + # }, + # "up-to-date": [ + # "/workspace/tmp/foo.cpp", + # "/workspace/tmp/bar.cpp", + # ], + # "outdated": [], + # "missing": [ + # "/workspace/tmp/test.c" + # ], + # "failed": [] + # }, + # "clang-tidy": { ... }, + # }, + # "total_analyzed_compilation_commands": 2, + # "total_available_compilation_commands": 3 + # } return { "analyzers": out_analyzers, @@ -377,11 +379,11 @@ def get_report_dir_status(compile_commands: list[dict[str, str]], } -def print_status(inputs: list[str], +def print_status(inputs: List[str], detailed_flag: bool, - files: list[str], - export: str, - output_path: str): + files: Optional[List[str]], + export: Optional[str], + output_path: Optional[str]): if len(inputs) != 1: LOG.error("Parse status can only be printed " "for one directory.") @@ -392,7 +394,7 @@ def print_status(inputs: list[str], sys.exit(1) if output_path and not export: - LOG.error("Export format (--export) was not specified.") + LOG.error("Export format (--export/-e) was not specified.") sys.exit(1) report_dir = inputs[0] @@ -412,8 +414,8 @@ def print_status(inputs: list[str], if files: files_filter = [os.path.abspath(fp) for fp in files] - compile_commands = list(filter(lambda c : - c["file"] in files_filter, compile_commands)) + compile_commands = list( + filter(lambda c: c["file"] in files_filter, compile_commands)) status = get_report_dir_status(compile_commands, report_dir, detailed_flag) @@ -442,7 +444,7 @@ def get_summary(analyzer): json.dump(status, sys.stdout, indent=2) elif export and output_path: output_path = os.path.abspath(output_path) - with open(output_path, "w") as file: + with open(output_path, "w", encoding="utf-8") as file: json.dump(status, file, indent=2) LOG.info("Status info was dumped to '%s'.", output_path) @@ -495,9 +497,12 @@ def main(args): if isinstance(args.input, str): args.input = [args.input] - if args.status: - print_status(args.input, args.detailed, - args.files, args.export, args.output_path) + if 'status' in args: + print_status(args.input, + getattr(args, 'detailed', False), + getattr(args, 'files', None), + getattr(args, 'export', None), + getattr(args, 'output_path', None)) return src_comment_status_filter = args.review_status @@ -531,7 +536,7 @@ def main(args): output_dir_path = None output_file_path = None - if args.output_path: + if 'output_path' in args: output_path = os.path.abspath(args.output_path) if export == 'html': @@ -565,7 +570,7 @@ def get_output_file_path(default_file_name: str) -> Optional[str]: return None skip_handlers = SkipListHandlers() - if args.files: + if 'files' in args: items = [f"+{file_path}" for file_path in args.files] items.append("-*") skip_handlers.append(SkipListHandler("\n".join(items))) @@ -603,7 +608,7 @@ def get_output_file_path(default_file_name: str) -> Optional[str]: metadata = get_metadata(dir_path) - if metadata and args.files: + if metadata and 'files' in args: # Mapping plists when files are specified to speed up parsing # The specifed_file_paths variable would be an empty list # if metadata.json did not contain the specified file or diff --git a/analyzer/codechecker_analyzer/util.py b/analyzer/codechecker_analyzer/util.py index a198fbb501..56cbb263d7 100644 --- a/analyzer/codechecker_analyzer/util.py +++ b/analyzer/codechecker_analyzer/util.py @@ -13,6 +13,7 @@ import shlex import hashlib + def analyzer_action_hash(analyzed_source_file, build_dir, build_command): source_file = os.path.normpath( os.path.join(build_dir, From 568388df793015982264fec2adc2a9b46b01634e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Domozi?= Date: Mon, 1 Dec 2025 12:12:33 +0000 Subject: [PATCH 4/9] Extend analysis summary message --- analyzer/codechecker_analyzer/cli/parse.py | 31 +++++++++++++--------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/analyzer/codechecker_analyzer/cli/parse.py b/analyzer/codechecker_analyzer/cli/parse.py index 09642fd287..457eba911e 100644 --- a/analyzer/codechecker_analyzer/cli/parse.py +++ b/analyzer/codechecker_analyzer/cli/parse.py @@ -417,24 +417,29 @@ def print_status(inputs: List[str], compile_commands = list( filter(lambda c: c["file"] in files_filter, compile_commands)) - status = get_report_dir_status(compile_commands, report_dir, detailed_flag) + if not compile_commands: + LOG.error("File not found in the compilation database!") + sys.exit(1) - def get_summary(analyzer): - return status["analyzers"][analyzer]["summary"] + status = get_report_dir_status(compile_commands, report_dir, detailed_flag) if not export and not output_path: + summary_map = { + "successful": "Successfully analyzed", + "failed": "Failed to analyze", + "up-to-date": "Up-to-date analysis results", + "outdated": "Outdated analysis results", + "missing": "Missing analysis results" + } + LOG.info("----==== Summary ====----") - LOG.info("Successfully analyzed") - for analyzer in supported_analyzers: - successful_count = get_summary(analyzer)["successful"] - if successful_count > 0: - LOG.info(" %s: %s", analyzer, successful_count) + for k, v in summary_map.items(): + LOG.info(v) + for analyzer in supported_analyzers: + count = status["analyzers"][analyzer]["summary"][k] + if count > 0: + LOG.info(" %s: %s", analyzer, count) - LOG.info("Failed to analyze") - for analyzer in supported_analyzers: - failed_count = get_summary(analyzer)["failed"] - if failed_count > 0: - LOG.info(" %s: %s", analyzer, failed_count) LOG.info("Total analyzed compilation commands: %s", status["total_analyzed_compilation_commands"]) LOG.info("Total available compilation commands: %s", From a502e03a5d1ae0bd1c697f7354d994e7c76b8710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Domozi?= Date: Mon, 1 Dec 2025 20:15:40 +0100 Subject: [PATCH 5/9] Added detailed option to summary info --- analyzer/codechecker_analyzer/cli/parse.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/analyzer/codechecker_analyzer/cli/parse.py b/analyzer/codechecker_analyzer/cli/parse.py index 457eba911e..82f6ddf745 100644 --- a/analyzer/codechecker_analyzer/cli/parse.py +++ b/analyzer/codechecker_analyzer/cli/parse.py @@ -335,8 +335,6 @@ def get_report_dir_status(compile_commands: List[dict[str, str]], detailed[k] = list(v[analyzer].keys()) summary[k] = len(detailed[k]) - summary["successful"] = summary["up-to-date"] + summary["outdated"] - out_analyzers[analyzer] = { "summary": summary } @@ -353,8 +351,7 @@ def get_report_dir_status(compile_commands: List[dict[str, str]], # "up-to-date": 2, # "outdated": 0, # "missing": 1, - # "failed": 0, - # "successful": 2 + # "failed": 0 # }, # "up-to-date": [ # "/workspace/tmp/foo.cpp", @@ -425,10 +422,9 @@ def print_status(inputs: List[str], if not export and not output_path: summary_map = { - "successful": "Successfully analyzed", - "failed": "Failed to analyze", "up-to-date": "Up-to-date analysis results", "outdated": "Outdated analysis results", + "failed": "Failed to analyze", "missing": "Missing analysis results" } @@ -438,7 +434,11 @@ def print_status(inputs: List[str], for analyzer in supported_analyzers: count = status["analyzers"][analyzer]["summary"][k] if count > 0: - LOG.info(" %s: %s", analyzer, count) + if detailed_flag: + files = status["analyzers"][analyzer][k] + LOG.info(" %s: %s (%s)", analyzer, files, count) + else: + LOG.info(" %s: %s", analyzer, count) LOG.info("Total analyzed compilation commands: %s", status["total_analyzed_compilation_commands"]) From a997bc23eeb02d3d66e4252beef14b9d44335c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Domozi?= Date: Mon, 1 Dec 2025 20:24:38 +0100 Subject: [PATCH 6/9] Automatically print status after CodeChecker parse --- analyzer/codechecker_analyzer/cli/parse.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/analyzer/codechecker_analyzer/cli/parse.py b/analyzer/codechecker_analyzer/cli/parse.py index 82f6ddf745..5147cf7d3c 100644 --- a/analyzer/codechecker_analyzer/cli/parse.py +++ b/analyzer/codechecker_analyzer/cli/parse.py @@ -313,10 +313,14 @@ def get_report_dir_status(compile_commands: List[dict[str, str]], analyzed_actions[cmd] = 1 plist_path = os.path.join(report_dir, plist_file) - if os.path.getmtime(plist_path) > os.path.getmtime(file): + try: + if os.path.getmtime(plist_path) > os.path.getmtime(file): + recent[analyzer][file] = 1 + else: + old[analyzer][file] = 1 + except Exception: recent[analyzer][file] = 1 - else: - old[analyzer][file] = 1 + else: missing[analyzer][file] = 1 @@ -379,8 +383,8 @@ def get_report_dir_status(compile_commands: List[dict[str, str]], def print_status(inputs: List[str], detailed_flag: bool, files: Optional[List[str]], - export: Optional[str], - output_path: Optional[str]): + export: Optional[str] = None, + output_path: Optional[str] = None): if len(inputs) != 1: LOG.error("Parse status can only be printed " "for one directory.") @@ -702,5 +706,9 @@ def get_output_file_path(default_file_name: str) -> Optional[str]: reports_helper.dump_changed_files(changed_files) + print_status(args.input, + False, + getattr(args, 'files', None)) + if statistics.num_of_reports: sys.exit(2) From d3594d836e873c750676049576f2f655a3047aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Domozi?= Date: Wed, 3 Dec 2025 16:41:26 +0100 Subject: [PATCH 7/9] Fix analyze_and_parse tests --- analyzer/codechecker_analyzer/cli/parse.py | 23 +++++++--------- ...ers_off_except_return_stack_address.output | 13 ++++++++++ .../test_files/compiler_error.output | 13 ++++++++++ .../test_files/compiler_error_disabled.output | 13 ++++++++++ ...er_warning_default_checker_priority.output | 13 ++++++++++ .../test_files/compiler_warning_simple.output | 13 ++++++++++ .../compiler_warning_wno_group.output | 13 ++++++++++ .../compiler_warning_wno_simple1.output | 13 ++++++++++ .../compiler_warning_wno_simple2.output | 13 ++++++++++ .../compiler_warning_wunused.output | 13 ++++++++++ .../context_free_hash_clang_tidy.output | 13 ++++++++++ .../context_free_hash_clangsa.output | 13 ++++++++++ .../context_free_hash_v2_clang_tidy.output | 13 ++++++++++ .../context_free_hash_v2_clangsa.output | 13 ++++++++++ .../context_sensitive_hash_clang.output | 13 ++++++++++ .../context_sensitive_hash_clang_tidy.output | 13 ++++++++++ .../test_files/cppcheck_args.noforward.output | 13 ++++++++++ .../test_files/cppcheck_args.output | 13 ++++++++++ .../test_files/cppcheck_include.output | 13 ++++++++++ .../test_files/cppcheck_multiple_error.output | 13 ++++++++++ .../cppcheck_multiple_warning.output | 13 ++++++++++ .../test_files/cppcheck_undef_include.output | 13 ++++++++++ .../diagnostic_message_hash_clang_tidy.output | 13 ++++++++++ .../diagnostic_message_hash_clangsa.output | 13 ++++++++++ .../test_files/gcc_simple.output | 13 ++++++++++ .../gcc_simple_checker_disable.output | 13 ++++++++++ .../test_files/infer_simple.output | 13 ++++++++++ .../test_files/multi_error.en1.output | 13 ++++++++++ .../test_files/multi_error.en2.output | 13 ++++++++++ .../test_files/multi_error.en3.output | 13 ++++++++++ .../test_files/multi_error.output | 13 ++++++++++ .../test_files/multi_error.steps.output | 13 ++++++++++ .../test_files/multi_error_skipped.output | 14 ++++++++++ .../multi_error_skipped_in_cmd.output | 14 ++++++++++ .../test_files/multi_error_suppress.output | 13 ++++++++++ .../multi_error_suppress_cstyle.output | 13 ++++++++++ .../multi_error_suppress_typo.output | 13 ++++++++++ .../test_files/nofail.output | 13 ++++++++++ .../test_files/nofail.steps.output | 13 ++++++++++ .../saargs_forward.noforward.output | 13 ++++++++++ .../test_files/saargs_forward.output | 13 ++++++++++ .../test_files/simple1.deduplication.output | 13 ++++++++++ .../test_files/simple1.output | 13 ++++++++++ .../test_files/simple1.steps.output | 13 ++++++++++ .../simple1_review_status_file.output | 26 +++++++++++++++++++ .../simple1_review_status_file_glob.output | 26 +++++++++++++++++++ .../simple1_review_status_file_hash.output | 26 +++++++++++++++++++ .../test_files/simple2.output | 13 ++++++++++ .../test_files/simple2.steps.output | 13 ++++++++++ .../test_files/source_code_comments.output | 13 ++++++++++ .../source_code_comments_all.output | 13 ++++++++++ ...urce_code_comments_all_empty_filter.output | 13 ++++++++++ .../source_code_comments_confirmed.output | 13 ++++++++++ ...source_code_comments_false_positive.output | 13 ++++++++++ .../test_files/tidy_alias.output | 13 ++++++++++ .../test_files/tidy_check.output | 13 ++++++++++ 56 files changed, 765 insertions(+), 14 deletions(-) diff --git a/analyzer/codechecker_analyzer/cli/parse.py b/analyzer/codechecker_analyzer/cli/parse.py index 5147cf7d3c..224c3080ef 100644 --- a/analyzer/codechecker_analyzer/cli/parse.py +++ b/analyzer/codechecker_analyzer/cli/parse.py @@ -380,16 +380,11 @@ def get_report_dir_status(compile_commands: List[dict[str, str]], } -def print_status(inputs: List[str], +def print_status(report_dir: str, detailed_flag: bool, files: Optional[List[str]], export: Optional[str] = None, output_path: Optional[str] = None): - if len(inputs) != 1: - LOG.error("Parse status can only be printed " - "for one directory.") - sys.exit(1) - if export and export != "json": LOG.error("Only JSON export format is supported.") sys.exit(1) @@ -398,8 +393,6 @@ def print_status(inputs: List[str], LOG.error("Export format (--export/-e) was not specified.") sys.exit(1) - report_dir = inputs[0] - if not os.path.isdir(report_dir): LOG.error("Input path '%s' is not a directory.", report_dir) @@ -419,8 +412,7 @@ def print_status(inputs: List[str], filter(lambda c: c["file"] in files_filter, compile_commands)) if not compile_commands: - LOG.error("File not found in the compilation database!") - sys.exit(1) + LOG.warning("File not found in the compilation database!") status = get_report_dir_status(compile_commands, report_dir, detailed_flag) @@ -507,7 +499,7 @@ def main(args): args.input = [args.input] if 'status' in args: - print_status(args.input, + print_status(args.input[0], getattr(args, 'detailed', False), getattr(args, 'files', None), getattr(args, 'export', None), @@ -706,9 +698,12 @@ def get_output_file_path(default_file_name: str) -> Optional[str]: reports_helper.dump_changed_files(changed_files) - print_status(args.input, - False, - getattr(args, 'files', None)) + input_dir = args.input[0] + compile_cmd_json = os.path.join(input_dir, "compile_cmd.json") + if os.path.isdir(input_dir) and os.path.isfile(compile_cmd_json): + print_status(input_dir, + False, + getattr(args, 'files', None)) if statistics.num_of_reports: sys.exit(2) diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/all_checkers_off_except_return_stack_address.output b/analyzer/tests/functional/analyze_and_parse/test_files/all_checkers_off_except_return_stack_address.output index d88099d700..36eca3fd28 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/all_checkers_off_except_return_stack_address.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/all_checkers_off_except_return_stack_address.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_error.output b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_error.output index f67d26c070..6d6f179a1e 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_error.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_error.output @@ -54,3 +54,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - Outdated analysis results +[] - Failed to analyze +[] - clang-tidy: 1 +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_error_disabled.output b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_error_disabled.output index a7a42dfc3c..b70e633430 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_error_disabled.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_error_disabled.output @@ -24,3 +24,16 @@ Number of processed analyzer result files | 0 Number of analyzer reports | 0 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 0 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_default_checker_priority.output b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_default_checker_priority.output index e164c3131b..44fd937895 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_default_checker_priority.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_default_checker_priority.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_simple.output b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_simple.output index f329fffada..28e11ace8e 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_simple.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_simple.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wno_group.output b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wno_group.output index f08ce4d96e..c99c20144f 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wno_group.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wno_group.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wno_simple1.output b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wno_simple1.output index abfdef0876..9a0c8a59ed 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wno_simple1.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wno_simple1.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wno_simple2.output b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wno_simple2.output index d659feafbe..762482f113 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wno_simple2.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wno_simple2.output @@ -26,3 +26,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 0 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wunused.output b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wunused.output index d659feafbe..762482f113 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wunused.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/compiler_warning_wunused.output @@ -26,3 +26,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 0 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_clang_tidy.output b/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_clang_tidy.output index 99c5d26c6e..c878bc6be0 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_clang_tidy.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_clang_tidy.output @@ -72,3 +72,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 3 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_clangsa.output b/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_clangsa.output index 8530451386..766005270d 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_clangsa.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_clangsa.output @@ -72,3 +72,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 3 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_v2_clang_tidy.output b/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_v2_clang_tidy.output index 5b37f05be1..b51d720414 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_v2_clang_tidy.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_v2_clang_tidy.output @@ -72,3 +72,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 3 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_v2_clangsa.output b/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_v2_clangsa.output index 66d2cc847a..3e790d278c 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_v2_clangsa.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/context_free_hash_v2_clangsa.output @@ -72,3 +72,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 3 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/context_sensitive_hash_clang.output b/analyzer/tests/functional/analyze_and_parse/test_files/context_sensitive_hash_clang.output index 843aef81fd..97888dadf0 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/context_sensitive_hash_clang.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/context_sensitive_hash_clang.output @@ -72,3 +72,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 3 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/context_sensitive_hash_clang_tidy.output b/analyzer/tests/functional/analyze_and_parse/test_files/context_sensitive_hash_clang_tidy.output index fc5d256791..e7cb4f4a29 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/context_sensitive_hash_clang_tidy.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/context_sensitive_hash_clang_tidy.output @@ -72,3 +72,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 3 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_args.noforward.output b/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_args.noforward.output index 2e31eb4fa7..17678998e3 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_args.noforward.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_args.noforward.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - cppcheck: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - clang-tidy: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_args.output b/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_args.output index 46c2a8d717..7766ff3423 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_args.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_args.output @@ -26,3 +26,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 0 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - cppcheck: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - clang-tidy: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_include.output b/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_include.output index cf9d2f3dbd..7e5dde40ed 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_include.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_include.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - cppcheck: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - clang-tidy: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_multiple_error.output b/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_multiple_error.output index 046cbc1a78..d7e5a4d930 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_multiple_error.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_multiple_error.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - cppcheck: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - clang-tidy: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_multiple_warning.output b/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_multiple_warning.output index 38d2728f0e..da719f8d50 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_multiple_warning.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_multiple_warning.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - cppcheck: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - clang-tidy: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_undef_include.output b/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_undef_include.output index 51373363cc..90dbf71a20 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_undef_include.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/cppcheck_undef_include.output @@ -26,3 +26,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 0 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - cppcheck: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - clang-tidy: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/diagnostic_message_hash_clang_tidy.output b/analyzer/tests/functional/analyze_and_parse/test_files/diagnostic_message_hash_clang_tidy.output index 5783da06fd..9be1298050 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/diagnostic_message_hash_clang_tidy.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/diagnostic_message_hash_clang_tidy.output @@ -72,3 +72,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 3 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/diagnostic_message_hash_clangsa.output b/analyzer/tests/functional/analyze_and_parse/test_files/diagnostic_message_hash_clangsa.output index 0a4411a74c..136c34fa36 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/diagnostic_message_hash_clangsa.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/diagnostic_message_hash_clangsa.output @@ -72,3 +72,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 3 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/gcc_simple.output b/analyzer/tests/functional/analyze_and_parse/test_files/gcc_simple.output index ad25514b56..23e071460b 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/gcc_simple.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/gcc_simple.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - gcc: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/gcc_simple_checker_disable.output b/analyzer/tests/functional/analyze_and_parse/test_files/gcc_simple_checker_disable.output index 3e30c5b5db..b1651d30a6 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/gcc_simple_checker_disable.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/gcc_simple_checker_disable.output @@ -26,3 +26,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 0 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - gcc: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/infer_simple.output b/analyzer/tests/functional/analyze_and_parse/test_files/infer_simple.output index 8475611d25..1661e85720 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/infer_simple.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/infer_simple.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - infer: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.en1.output b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.en1.output index b3fef62dac..ef2bfa4a45 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.en1.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.en1.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.en2.output b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.en2.output index 78cd2a28d4..293422d8d2 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.en2.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.en2.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.en3.output b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.en3.output index 6ecf70d4db..e9a64b80c3 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.en3.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.en3.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.output b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.output index bde371b2f2..c3d0f425a3 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.output @@ -61,3 +61,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 2 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.steps.output b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.steps.output index 63eddffaa8..5365d8e429 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.steps.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error.steps.output @@ -69,3 +69,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 2 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_skipped.output b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_skipped.output index 315bab0cae..03e16e6088 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_skipped.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_skipped.output @@ -56,3 +56,17 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - clang-tidy: 2 +[] - cppcheck: 2 +[] - gcc: 2 +[] - infer: 2 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 2 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_skipped_in_cmd.output b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_skipped_in_cmd.output index e615d49c38..c506337922 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_skipped_in_cmd.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_skipped_in_cmd.output @@ -70,3 +70,17 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 3 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 2 +[] - clang-tidy: 1 +[] - cppcheck: 2 +[] - gcc: 2 +[] - infer: 2 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 2 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_suppress.output b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_suppress.output index 9d16821bae..5650b02482 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_suppress.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_suppress.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_suppress_cstyle.output b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_suppress_cstyle.output index 876c024239..45bc0b1ce0 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_suppress_cstyle.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_suppress_cstyle.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_suppress_typo.output b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_suppress_typo.output index 8536e1bf4e..6670a5422a 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_suppress_typo.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/multi_error_suppress_typo.output @@ -62,3 +62,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 2 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/nofail.output b/analyzer/tests/functional/analyze_and_parse/test_files/nofail.output index 0b1a19998d..002b886b5a 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/nofail.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/nofail.output @@ -26,3 +26,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 0 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/nofail.steps.output b/analyzer/tests/functional/analyze_and_parse/test_files/nofail.steps.output index 42cc146e86..4e395f8808 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/nofail.steps.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/nofail.steps.output @@ -26,3 +26,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 0 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/saargs_forward.noforward.output b/analyzer/tests/functional/analyze_and_parse/test_files/saargs_forward.noforward.output index 61382a5f3a..826a7dc333 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/saargs_forward.noforward.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/saargs_forward.noforward.output @@ -26,3 +26,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 0 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/saargs_forward.output b/analyzer/tests/functional/analyze_and_parse/test_files/saargs_forward.output index 26556287e6..5ab9940ef7 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/saargs_forward.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/saargs_forward.output @@ -56,3 +56,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/simple1.deduplication.output b/analyzer/tests/functional/analyze_and_parse/test_files/simple1.deduplication.output index 334b00951d..29b2acc686 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/simple1.deduplication.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/simple1.deduplication.output @@ -56,3 +56,16 @@ Number of processed analyzer result files | 2 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 2 +[] - Total available compilation commands: 2 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/simple1.output b/analyzer/tests/functional/analyze_and_parse/test_files/simple1.output index e6b05c695a..ecea4d42a2 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/simple1.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/simple1.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/simple1.steps.output b/analyzer/tests/functional/analyze_and_parse/test_files/simple1.steps.output index 8e855a72b1..1e229b9077 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/simple1.steps.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/simple1.steps.output @@ -64,3 +64,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/simple1_review_status_file.output b/analyzer/tests/functional/analyze_and_parse/test_files/simple1_review_status_file.output index e97c6aab0e..a4340ad2d1 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/simple1_review_status_file.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/simple1_review_status_file.output @@ -30,6 +30,19 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 0 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- [HIGH] simple1.cpp:18:15: Division by zero [core.DivideZero] [False positive] return 2015 / x; ^ @@ -67,3 +80,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/simple1_review_status_file_glob.output b/analyzer/tests/functional/analyze_and_parse/test_files/simple1_review_status_file_glob.output index 0e656801e3..bbf7d3e1fa 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/simple1_review_status_file_glob.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/simple1_review_status_file_glob.output @@ -30,6 +30,19 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 0 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- [HIGH] simple1.cpp:18:15: Division by zero [core.DivideZero] [False positive] return 2015 / x; ^ @@ -67,3 +80,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/simple1_review_status_file_hash.output b/analyzer/tests/functional/analyze_and_parse/test_files/simple1_review_status_file_hash.output index 36cd058d26..7428fd1ed2 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/simple1_review_status_file_hash.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/simple1_review_status_file_hash.output @@ -30,6 +30,19 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 0 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- [HIGH] simple1.cpp:18:15: Division by zero [core.DivideZero] [False positive] return 2015 / x; ^ @@ -67,3 +80,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/simple2.output b/analyzer/tests/functional/analyze_and_parse/test_files/simple2.output index 5c2a69ed2c..d0ecb948e4 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/simple2.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/simple2.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/simple2.steps.output b/analyzer/tests/functional/analyze_and_parse/test_files/simple2.steps.output index 1409b3c165..5beb074cf3 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/simple2.steps.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/simple2.steps.output @@ -64,3 +64,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments.output b/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments.output index c2eab67c72..8deb863155 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments.output @@ -60,3 +60,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 2 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_all.output b/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_all.output index 43569a331d..2c9ef353d7 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_all.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_all.output @@ -75,3 +75,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 5 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_all_empty_filter.output b/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_all_empty_filter.output index 5ca646de8a..9e306c40a6 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_all_empty_filter.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_all_empty_filter.output @@ -75,3 +75,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 5 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_confirmed.output b/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_confirmed.output index 5a51aa8dd7..f76325773d 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_confirmed.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_confirmed.output @@ -56,3 +56,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_false_positive.output b/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_false_positive.output index 398c9adba8..8dc9173077 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_false_positive.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/source_code_comments_false_positive.output @@ -61,3 +61,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 2 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/tidy_alias.output b/analyzer/tests/functional/analyze_and_parse/test_files/tidy_alias.output index d5dfceabfd..a85a022bb8 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/tidy_alias.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/tidy_alias.output @@ -60,3 +60,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 2 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- diff --git a/analyzer/tests/functional/analyze_and_parse/test_files/tidy_check.output b/analyzer/tests/functional/analyze_and_parse/test_files/tidy_check.output index b53f281bff..70002f8b9c 100644 --- a/analyzer/tests/functional/analyze_and_parse/test_files/tidy_check.output +++ b/analyzer/tests/functional/analyze_and_parse/test_files/tidy_check.output @@ -55,3 +55,16 @@ Number of processed analyzer result files | 1 Number of analyzer reports | 1 --------------------------------------------- ----=================---- +[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clang-tidy: 1 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clangsa: 1 +[] - cppcheck: 1 +[] - gcc: 1 +[] - infer: 1 +[] - Total analyzed compilation commands: 1 +[] - Total available compilation commands: 1 +[] - ----=================---- From d7446d6894f12102608d0211fcc858e2f10daa91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Domozi?= Date: Wed, 3 Dec 2025 18:53:54 +0100 Subject: [PATCH 8/9] Added parse --status test cases --- analyzer/codechecker_analyzer/cli/parse.py | 3 +- .../tests/functional/parse_status/__init__.py | 11 ++ .../parse_status/test_files/Makefile | 10 ++ .../functional/parse_status/test_files/a.cpp | 5 + .../functional/parse_status/test_files/b.cpp | 5 + .../functional/parse_status/test_files/lib.h | 10 ++ .../parse_status/test_parse_status.py | 169 ++++++++++++++++++ 7 files changed, 212 insertions(+), 1 deletion(-) create mode 100644 analyzer/tests/functional/parse_status/__init__.py create mode 100644 analyzer/tests/functional/parse_status/test_files/Makefile create mode 100644 analyzer/tests/functional/parse_status/test_files/a.cpp create mode 100644 analyzer/tests/functional/parse_status/test_files/b.cpp create mode 100644 analyzer/tests/functional/parse_status/test_files/lib.h create mode 100644 analyzer/tests/functional/parse_status/test_parse_status.py diff --git a/analyzer/codechecker_analyzer/cli/parse.py b/analyzer/codechecker_analyzer/cli/parse.py index 224c3080ef..bf702f24de 100644 --- a/analyzer/codechecker_analyzer/cli/parse.py +++ b/analyzer/codechecker_analyzer/cli/parse.py @@ -299,6 +299,7 @@ def get_report_dir_status(compile_commands: List[dict[str, str]], for c in compile_commands: for analyzer in supported_analyzers: file, directory, cmd = c["file"], c["directory"], c["command"] + file = os.path.abspath(file) filename = os.path.basename(file) action_hash = analyzer_action_hash(file, directory, cmd) @@ -411,7 +412,7 @@ def print_status(report_dir: str, compile_commands = list( filter(lambda c: c["file"] in files_filter, compile_commands)) - if not compile_commands: + if not compile_commands and not export: LOG.warning("File not found in the compilation database!") status = get_report_dir_status(compile_commands, report_dir, detailed_flag) diff --git a/analyzer/tests/functional/parse_status/__init__.py b/analyzer/tests/functional/parse_status/__init__.py new file mode 100644 index 0000000000..0b0114f7e4 --- /dev/null +++ b/analyzer/tests/functional/parse_status/__init__.py @@ -0,0 +1,11 @@ +# coding=utf-8 +# ------------------------------------------------------------------------- +# +# Part of the CodeChecker project, under the Apache License v2.0 with +# LLVM Exceptions. See LICENSE for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# ------------------------------------------------------------------------- + +# This file is empty, and is only present so that this directory will form a +# package. diff --git a/analyzer/tests/functional/parse_status/test_files/Makefile b/analyzer/tests/functional/parse_status/test_files/Makefile new file mode 100644 index 0000000000..ade701f25d --- /dev/null +++ b/analyzer/tests/functional/parse_status/test_files/Makefile @@ -0,0 +1,10 @@ +default: a.o b.o + +a.o: a.cpp + $(CXX) -c a.cpp -o /dev/null + +b.o: b.cpp + $(CXX) -c b.cpp -o /dev/null + +clean: + rm -f a.o b.o diff --git a/analyzer/tests/functional/parse_status/test_files/a.cpp b/analyzer/tests/functional/parse_status/test_files/a.cpp new file mode 100644 index 0000000000..668862f2dd --- /dev/null +++ b/analyzer/tests/functional/parse_status/test_files/a.cpp @@ -0,0 +1,5 @@ +#include "lib.h" + +void foo() { + myDiv(1); +} diff --git a/analyzer/tests/functional/parse_status/test_files/b.cpp b/analyzer/tests/functional/parse_status/test_files/b.cpp new file mode 100644 index 0000000000..4265dba9b9 --- /dev/null +++ b/analyzer/tests/functional/parse_status/test_files/b.cpp @@ -0,0 +1,5 @@ +#include "lib.h" + +void bar() { + myDiv(2); +} diff --git a/analyzer/tests/functional/parse_status/test_files/lib.h b/analyzer/tests/functional/parse_status/test_files/lib.h new file mode 100644 index 0000000000..0c9436d1cd --- /dev/null +++ b/analyzer/tests/functional/parse_status/test_files/lib.h @@ -0,0 +1,10 @@ +#ifndef LIB_H +#define LIB_H + +int myDiv(int x) +{ + return x / 0; +} + + +#endif diff --git a/analyzer/tests/functional/parse_status/test_parse_status.py b/analyzer/tests/functional/parse_status/test_parse_status.py new file mode 100644 index 0000000000..d51018e33b --- /dev/null +++ b/analyzer/tests/functional/parse_status/test_parse_status.py @@ -0,0 +1,169 @@ +# +# ------------------------------------------------------------------------- +# +# Part of the CodeChecker project, under the Apache License v2.0 with +# LLVM Exceptions. See LICENSE for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# ------------------------------------------------------------------------- + +""" +Test parse --status command. +""" + +import os +import re +import json +import shutil +import subprocess +import unittest + +from libtest import env + + +class TestParseStatus(unittest.TestCase): + _ccClient = None + + def setup_class(self): + """Setup the environment for the tests.""" + + global TEST_WORKSPACE + TEST_WORKSPACE = env.get_workspace('skip') + + report_dir = os.path.join(TEST_WORKSPACE, 'reports') + os.makedirs(report_dir) + + os.environ['TEST_WORKSPACE'] = TEST_WORKSPACE + + def teardown_class(self): + """Delete the workspace associated with this test""" + + # TODO: If environment variable is set keep the workspace + # and print out the path. + global TEST_WORKSPACE + + print("Removing: " + TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE) + + def setup_method(self, _): + + # TEST_WORKSPACE is automatically set by test package __init__.py . + self.test_workspace = os.environ['TEST_WORKSPACE'] + + test_class = self.__class__.__name__ + print('Running ' + test_class + ' tests in ' + self.test_workspace) + + # Get the CodeChecker cmd if needed for the tests. + self._codechecker_cmd = env.codechecker_cmd() + self._tu_collector_cmd = env.tu_collector_cmd() + self.report_dir = os.path.join(self.test_workspace, "reports") + self.test_dir = os.path.join(os.path.dirname(__file__), 'test_files') + + def __run_cmd(self, cmd): + process = subprocess.Popen( + cmd, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + cwd=self.test_dir, + encoding="utf-8", + errors="ignore") + out, err = process.communicate() + + print(out) + print(err) + + output = out.splitlines(True) + processed_output = [] + for line in output: + # replace timestamps + line = re.sub(r'\[\w+ \d{4}-\d{2}-\d{2} \d{2}:\d{2}\]', + '[]', line) + processed_output.append(line) + + return ''.join(processed_output) + + def __log_and_analyze(self): + """ Log and analyze the test project. """ + build_json = os.path.join(self.test_workspace, "build.json") + + clean_cmd = ["make", "clean"] + out = subprocess.check_output(clean_cmd, + cwd=self.test_dir, + encoding="utf-8", errors="ignore") + print(out) + + # Create and run log command. + log_cmd = [self._codechecker_cmd, "log", "-b", "make", + "-o", build_json] + out = subprocess.check_output(log_cmd, + cwd=self.test_dir, + encoding="utf-8", errors="ignore") + print(out) + + # Create and run analyze command. + analyze_cmd = [ + self._codechecker_cmd, "analyze", "-c", build_json, + "--analyzers", "clangsa", "-o", self.report_dir] + + self.__run_cmd(analyze_cmd) + + def test_parse_status_summary(self): + self.__log_and_analyze() + + parse_status_cmd = [self._codechecker_cmd, "parse", + "--status", self.report_dir] + out = self.__run_cmd(parse_status_cmd) + + expected_output = """[] - ----==== Summary ====---- +[] - Up-to-date analysis results +[] - clangsa: 2 +[] - Outdated analysis results +[] - Failed to analyze +[] - Missing analysis results +[] - clang-tidy: 2 +[] - cppcheck: 2 +[] - gcc: 2 +[] - infer: 2 +[] - Total analyzed compilation commands: 2 +[] - Total available compilation commands: 2 +[] - ----=================---- +""" + self.assertEqual(out, expected_output) + + def test_parse_status_summary_json(self): + self.__log_and_analyze() + + parse_status_cmd = [self._codechecker_cmd, "parse", + "--status", "-e", "json", self.report_dir] + out = self.__run_cmd(parse_status_cmd) + + parsed_json = json.loads(out) + + def get_summary_count(analyzer, summary_type): + return parsed_json["analyzers"][analyzer]["summary"][summary_type] + + self.assertEqual(get_summary_count("clangsa", "up-to-date"), 2) + self.assertEqual(get_summary_count("clang-tidy", "up-to-date"), 0) + self.assertEqual(get_summary_count("clang-tidy", "missing"), 2) + + def test_parse_status_detailed_json(self): + self.__log_and_analyze() + + parse_status_cmd = [self._codechecker_cmd, "parse", + "--status", "-e", "json", "--detailed", + self.report_dir] + out = self.__run_cmd(parse_status_cmd) + + parsed_json = json.loads(out) + + def get_file_list(analyzer, list_type): + return list(map( + os.path.basename, + parsed_json["analyzers"][analyzer][list_type])) + + self.assertListEqual(get_file_list("clangsa", "up-to-date"), + ["a.cpp", "b.cpp"]) + self.assertListEqual(get_file_list("clang-tidy", "up-to-date"), + []) + self.assertListEqual(get_file_list("clang-tidy", "missing"), + ["a.cpp", "b.cpp"]) From efbe92071c720cd2c7746c46d9ee547e5286f9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Domozi?= Date: Thu, 4 Dec 2025 16:18:17 +0100 Subject: [PATCH 9/9] Remove existing plist.err files --- .../analyzers/clangsa/result_handler.py | 2 +- .../analyzers/clangtidy/result_handler.py | 2 +- .../analyzers/cppcheck/result_handler.py | 2 +- .../analyzers/gcc/result_handler.py | 7 ++++++- .../analyzers/infer/result_handler.py | 2 +- .../report/error_file.py | 15 +++++++++++++-- 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/analyzer/codechecker_analyzer/analyzers/clangsa/result_handler.py b/analyzer/codechecker_analyzer/analyzers/clangsa/result_handler.py index 36c6880b94..b3ad5c2ed3 100644 --- a/analyzer/codechecker_analyzer/analyzers/clangsa/result_handler.py +++ b/analyzer/codechecker_analyzer/analyzers/clangsa/result_handler.py @@ -43,7 +43,7 @@ def postprocess_result( Generate analyzer result output file which can be parsed and stored into the database. """ - error_file.create( + error_file.update( self.analyzer_result_file, self.analyzer_returncode, self.analyzer_info, self.analyzer_cmd, self.analyzer_stdout, self.analyzer_stderr) diff --git a/analyzer/codechecker_analyzer/analyzers/clangtidy/result_handler.py b/analyzer/codechecker_analyzer/analyzers/clangtidy/result_handler.py index 83c5092325..a93bb164a4 100644 --- a/analyzer/codechecker_analyzer/analyzers/clangtidy/result_handler.py +++ b/analyzer/codechecker_analyzer/analyzers/clangtidy/result_handler.py @@ -77,7 +77,7 @@ def postprocess_result( self.analyzer_result_file, reports, self.checker_labels, self.analyzer_info) - error_file.create( + error_file.update( self.analyzer_result_file, self.analyzer_returncode, self.analyzer_info, self.analyzer_cmd, self.analyzer_stdout, self.analyzer_stderr) diff --git a/analyzer/codechecker_analyzer/analyzers/cppcheck/result_handler.py b/analyzer/codechecker_analyzer/analyzers/cppcheck/result_handler.py index 029a01b00e..ad3a5939da 100644 --- a/analyzer/codechecker_analyzer/analyzers/cppcheck/result_handler.py +++ b/analyzer/codechecker_analyzer/analyzers/cppcheck/result_handler.py @@ -96,7 +96,7 @@ def postprocess_result( self.analyzer_result_file, reports, self.checker_labels, self.analyzer_info) - error_file.create( + error_file.update( self.analyzer_result_file, self.analyzer_returncode, self.analyzer_info, self.analyzer_cmd, self.analyzer_stdout, self.analyzer_stderr) diff --git a/analyzer/codechecker_analyzer/analyzers/gcc/result_handler.py b/analyzer/codechecker_analyzer/analyzers/gcc/result_handler.py index 525caea52b..bbe2f2781c 100644 --- a/analyzer/codechecker_analyzer/analyzers/gcc/result_handler.py +++ b/analyzer/codechecker_analyzer/analyzers/gcc/result_handler.py @@ -16,7 +16,7 @@ from codechecker_report_converter.report.parser.base import AnalyzerInfo from codechecker_report_converter.analyzers.gcc.analyzer_result import \ AnalyzerResult -from codechecker_report_converter.report import report_file +from codechecker_report_converter.report import report_file, error_file from codechecker_report_converter.report.hash import get_report_hash, HashType from codechecker_common.logger import get_logger @@ -118,3 +118,8 @@ def postprocess_result( report_file.create( self.analyzer_result_file, reports, self.checker_labels, self.analyzer_info) + + error_file.update( + self.analyzer_result_file, self.analyzer_returncode, + self.analyzer_info, self.analyzer_cmd, + self.analyzer_stdout, self.analyzer_stderr) diff --git a/analyzer/codechecker_analyzer/analyzers/infer/result_handler.py b/analyzer/codechecker_analyzer/analyzers/infer/result_handler.py index ae2a937a42..9e4cbaf9ac 100644 --- a/analyzer/codechecker_analyzer/analyzers/infer/result_handler.py +++ b/analyzer/codechecker_analyzer/analyzers/infer/result_handler.py @@ -74,7 +74,7 @@ def postprocess_result( self.analyzer_result_file, reports, self.checker_labels, self.analyzer_info) - error_file.create( + error_file.update( self.analyzer_result_file, self.analyzer_returncode, self.analyzer_info, self.analyzer_cmd, self.analyzer_stdout, self.analyzer_stderr) diff --git a/tools/report-converter/codechecker_report_converter/report/error_file.py b/tools/report-converter/codechecker_report_converter/report/error_file.py index d844a9b380..947d997cc3 100644 --- a/tools/report-converter/codechecker_report_converter/report/error_file.py +++ b/tools/report-converter/codechecker_report_converter/report/error_file.py @@ -6,11 +6,22 @@ # # ------------------------------------------------------------------------- +import os + from codechecker_report_converter.report.parser import plist -def create(output_path, return_code, analyzer_info, +def update(output_path, return_code, analyzer_info, analyzer_cmd, stdout, stderr): + + plist_err_path = output_path + ".err" + + # Remove existing plist.err file + try: + os.remove(plist_err_path) + except OSError: + pass + if return_code == 0: return @@ -24,4 +35,4 @@ def create(output_path, return_code, analyzer_info, 'stderr': stderr } - parser.write(data, output_path + ".err") + parser.write(data, plist_err_path)