diff --git a/analyzer/codechecker_analyzer/analyzers/clangsa/result_handler.py b/analyzer/codechecker_analyzer/analyzers/clangsa/result_handler.py index 4585e7c09a..b3ad5c2ed3 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.update( + 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..a93bb164a4 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.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 586da0ba62..ad3a5939da 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.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 d0fd59877c..9e4cbaf9ac 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.update( + 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/analyzers/result_handler_base.py b/analyzer/codechecker_analyzer/analyzers/result_handler_base.py index 2e35ce3561..4186609617 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,10 @@ 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() + 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 c0fb770817..bf702f24de 100644 --- a/analyzer/codechecker_analyzer/cli/parse.py +++ b/analyzer/codechecker_analyzer/cli/parse.py @@ -14,7 +14,8 @@ import argparse import os import sys -from typing import Dict, Optional, Set +from typing import Dict, Optional, Set, List +import json import fnmatch from codechecker_report_converter.util import dump_json_output @@ -28,6 +29,8 @@ 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 from codechecker_common.review_status_handler import ReviewStatusHandler @@ -208,6 +211,21 @@ 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.") + + parser.add_argument('--detailed', + 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") group.add_argument('-i', '--ignore', '--skip', @@ -263,6 +281,176 @@ def get_metadata(dir_path: str) -> Optional[Dict]: return None +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, 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) + + 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) + + 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: + 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]) + + 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 + # }, + # "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(report_dir: str, + detailed_flag: bool, + files: Optional[List[str]], + export: Optional[str] = None, + output_path: Optional[str] = None): + 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/-e) was not specified.") + sys.exit(1) + + if not os.path.isdir(report_dir): + LOG.error("Input path '%s' is not a directory.", + report_dir) + sys.exit(1) + + compile_cmd_path = os.path.join(report_dir, "compile_cmd.json") + compile_commands = load_json(compile_cmd_path, []) + + if not compile_commands: + LOG.error("Failed to load compile commands JSON '%s'.", + compile_cmd_path) + sys.exit(1) + + 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)) + + 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) + + if not export and not output_path: + summary_map = { + "up-to-date": "Up-to-date analysis results", + "outdated": "Outdated analysis results", + "failed": "Failed to analyze", + "missing": "Missing analysis results" + } + + LOG.info("----==== Summary ====----") + for k, v in summary_map.items(): + LOG.info(v) + for analyzer in supported_analyzers: + count = status["analyzers"][analyzer]["summary"][k] + if count > 0: + 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"]) + 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", encoding="utf-8") as file: + json.dump(status, file, indent=2) + LOG.info("Status info was dumped to '%s'.", output_path) + + def main(args): """ Entry point for parsing some analysis results and printing them to the @@ -311,6 +499,14 @@ def main(args): if isinstance(args.input, str): args.input = [args.input] + if 'status' in args: + print_status(args.input[0], + 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 suppr_handler = None @@ -503,5 +699,12 @@ def get_output_file_path(default_file_name: str) -> Optional[str]: reports_helper.dump_changed_files(changed_files) + 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/codechecker_analyzer/util.py b/analyzer/codechecker_analyzer/util.py new file mode 100644 index 0000000000..56cbb263d7 --- /dev/null +++ b/analyzer/codechecker_analyzer/util.py @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------- +# +# 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() 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 +[] - ----=================---- 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"]) 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..947d997cc3 --- /dev/null +++ b/tools/report-converter/codechecker_report_converter/report/error_file.py @@ -0,0 +1,38 @@ +# ------------------------------------------------------------------------- +# +# 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 +# +# ------------------------------------------------------------------------- + +import os + +from codechecker_report_converter.report.parser import plist + + +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 + + parser = plist.Parser() + + data = { + 'analyzer_name': analyzer_info.name, + 'analyzer_cmd': analyzer_cmd, + 'return_code': return_code, + 'stdout': stdout, + 'stderr': stderr + } + + parser.write(data, plist_err_path)