Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3855efb
first implementation
xb058t Mar 19, 2026
a10e03e
Fixed errors
xb058t Mar 23, 2026
0122d55
Comment out Old-getRunResults tree and logic
xb058t Mar 23, 2026
6f0f712
keeping only neccesary code
xb058t Mar 23, 2026
7284e0c
adding tables into tree view
xb058t Mar 26, 2026
4e9c279
added severity and tickbox
xb058t Mar 26, 2026
0938fa4
introduce new thrift call
xb058t Mar 30, 2026
5e01fc9
new tables in tree view
xb058t Mar 30, 2026
1811e89
on tree click
xb058t Mar 30, 2026
d2be37c
api version uplift
xb058t Apr 1, 2026
4e87e11
clear file path when clicking tree view
xb058t Apr 2, 2026
58559f6
implemented switch buttons, toggle buttons clear FilePathFilter
xb058t Apr 2, 2026
7d744ea
tree view in file path
xb058t Mar 26, 2026
29b4302
minor errors fix
xb058t Mar 26, 2026
301bfd9
severity icons and checkboxes
xb058t Mar 26, 2026
bc67e6a
removing severities and adding buttons
xb058t Apr 1, 2026
e65ccdf
added tests for the getFileCountsSummary
xb058t Apr 2, 2026
2d5e780
Adding GUI tests
xb058t Apr 26, 2026
cc6df59
Fix product status check during startup
barnabasdomozi Apr 1, 2026
616cdf5
Reduce BrokenPipe error messages
barnabasdomozi Apr 1, 2026
75c6214
Fix CLI parse status filter
barnabasdomozi Feb 19, 2026
7b5b284
Integrate mypy into CI
barnabasdomozi Mar 10, 2026
2a410db
Updated Python version to 3.10 for all CI jobs
barnabasdomozi Apr 7, 2026
a53bc64
[doc] Extend task management docs
bruntib Apr 8, 2026
f479d70
Additional logic for handling missing auth sessions
Discookie Apr 20, 2026
93b74af
Review fixes
Discookie Apr 20, 2026
45a73b9
Add missing VIEW permission check
Discookie Apr 21, 2026
2806160
Fix tests
Discookie Apr 22, 2026
2795ee8
Fix trailing whitespace in report_server.py
barnabasdomozi Apr 23, 2026
9f6578a
[fix] Fix crash when analyzer_command is null (#4823)
bruntib Apr 23, 2026
ea3be0b
Collect analysis config files to report_dir/conf/
barnabasdomozi Apr 23, 2026
bf29e39
[server] Extend SEI Cert guideline mapping for cppcheck and gcc analy…
gulyasgergely902 Mar 18, 2026
eb3dfbf
Associating some cppcheck checkers with different SEI Cert rules
dkrupp Apr 24, 2026
df03319
Severity reclassification of cppcheck checkers
dkrupp Apr 24, 2026
9856d1b
Adding gcc static analyzer checker to sei cert rule mapping
dkrupp Apr 24, 2026
fb85189
Updating the severity categorization of the gcc analyzer checkers
dkrupp Apr 24, 2026
6b111c6
Removing gcc warnings from the gcc.json label file and adding some ne…
dkrupp Apr 24, 2026
7b6c79c
added sorting
xb058t May 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codechecker_master_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'
- name: Install dependencies
run: |
pip install $(grep -iE "pylint|pycodestyle" analyzer/requirements_py/dev/requirements.txt)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codechecker_pr_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'
- name: Install dependencies
run: |
pip install $(grep -iE "pylint|pycodestyle" analyzer/requirements_py/dev/requirements.txt)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/config_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'
- name: "Install dependencies"
run: |
# Some packages, e.g. build-essential and curl are available
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'
- uses: actions/setup-node@v1
with:
node-version: '16.x'
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- uses: actions/download-artifact@master
with:
Expand Down
46 changes: 22 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,30 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'
- name: Install dependencies
run: |
pip install $(grep -iE "pylint|pycodestyle" analyzer/requirements_py/dev/requirements.txt)
- name: Run pycodestyle & pylint
run: make -k pycodestyle pylint

type-checker:
name: Type checker (mypy)

runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Create venv-dev
run: |
make venv_dev
- name: Run mypy
run: |
make mypy

tools:
name: Tools (report-converter, etc.)
runs-on: ubuntu-24.04
Expand All @@ -35,7 +52,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'
- name: Setup Bazel
uses: abhinavsingh/setup-bazel@v3
with:
Expand Down Expand Up @@ -91,7 +108,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- name: Install dependencies
run: sh .github/workflows/install-deps.sh
Expand All @@ -109,25 +126,6 @@ jobs:
working-directory: analyzer
run: make test_unit_cov

common:
name: Common libraries
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install requirements
working-directory: codechecker_common
run: |
pip install -r requirements_py/dev/requirements.txt

- name: Run mypy tests
working-directory: codechecker_common/tests
run: make mypy

web:
name: Web
runs-on: ubuntu-24.04
Expand All @@ -153,7 +151,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- name: Install dependencies
run: sh .github/workflows/install-deps.sh
Expand Down Expand Up @@ -198,7 +196,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'
- uses: actions/setup-node@v1
with:
node-version: '16.x'
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ pycodestyle:
pycodestyle_in_env:
$(ACTIVATE_DEV_VENV) && $(PYCODE_CMD)

mypy:
$(ACTIVATE_DEV_VENV) && mypy --config-file pyproject.toml

test: test_analyzer test_web

test_in_env: test_analyzer_in_env test_web_in_env
Expand Down
42 changes: 42 additions & 0 deletions analyzer/codechecker_analyzer/cli/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,47 @@ def __update_review_status_config(args):
os.symlink(args.review_status_config, rs_config_to_send)


def __update_analysis_config_files(args):
"""
Copy analysis related configuration files
(e.g. skipfile, review_status_config) to report_dir/conf/.
"""
conf_dir = os.path.join(args.output_path, "conf")

# Remove any config files used during previous analysis
if os.path.isdir(conf_dir):
shutil.rmtree(conf_dir)

# Create a new conf directory
os.makedirs(conf_dir)

def add_file_to_conf_dir(file_path: str):
if not os.path.isfile(file_path):
return

file_path = os.path.abspath(file_path)
filename = os.path.basename(file_path)
shutil.copyfile(file_path, os.path.join(conf_dir, filename))

# Add analysis config files e.g., skipfile, review_status_config, etc.
if getattr(args, "skipfile", None):
add_file_to_conf_dir(args.skipfile)

if getattr(args, "review_status_config", None):
add_file_to_conf_dir(args.review_status_config)

if getattr(args, "config_file", None):
add_file_to_conf_dir(args.config_file)

# Add cc-verbatim-args-file
#
# Example: --saargs <filepath>, --tidyargs <filepath>,
# --analyzer-config clangsa:cc-verbatim-args-file=<filepath>, etc.
for a_conf in args.analyzer_config:
if a_conf.option == "cc-verbatim-args-file":
add_file_to_conf_dir(a_conf.value)


def __cleanup_metadata(metadata_prev, metadata):
""" Cleanup metadata.

Expand Down Expand Up @@ -1455,6 +1496,7 @@ def main(args):

__update_skip_file(args)
__update_review_status_config(args)
__update_analysis_config_files(args)

LOG.debug("Cleanup metadata file started.")
__cleanup_metadata(metadata_prev, metadata)
Expand Down
22 changes: 18 additions & 4 deletions analyzer/codechecker_analyzer/cli/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ 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)
Expand Down Expand Up @@ -407,10 +406,25 @@ def print_status(report_dir: str,
compile_cmd_path)
sys.exit(1)

# Convert all relative compile_cmd.json file paths to absolute
for c in compile_commands:
if not os.path.isabs(c["file"]):
c["file"] = os.path.abspath(
os.path.join(c["directory"], c["file"]))

if files:
files_filter = [os.path.abspath(fp) for fp in files]
file_filter = [os.path.abspath(fp) for fp in files]

invalid_file_filter = [fp for fp in file_filter
if not os.path.isfile(fp)]

if invalid_file_filter:
LOG.error("File filter (--file) contains nonexistent files:")
LOG.error(invalid_file_filter)
sys.exit(1)

compile_commands = list(
filter(lambda c: c["file"] in files_filter, compile_commands))
filter(lambda c: c["file"] in file_filter, compile_commands))

if not compile_commands and not export:
LOG.warning("File not found in the compilation database!")
Expand Down Expand Up @@ -704,7 +718,7 @@ def get_output_file_path(default_file_name: str) -> Optional[str]:
if os.path.isdir(input_dir) and os.path.isfile(compile_cmd_json):
print_status(input_dir,
False,
getattr(args, 'files', None))
None)

if statistics.num_of_reports:
sys.exit(2)
4 changes: 3 additions & 1 deletion analyzer/tests/functional/cmdline/test_cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ def test_checkers_guideline(self):
'Malloc',
'MallocSizeof',
'clang-diagnostic-format-overflow',
'overflow-non-kprintf']))
'overflow-non-kprintf',
'gcc-allocation-size',
'gcc-out-of-bounds']))

checkers_cmd = [env.codechecker_cmd(), 'checkers', '--guideline']
_, out, _ = run_cmd(checkers_cmd)
Expand Down
78 changes: 70 additions & 8 deletions analyzer/tests/functional/parse_status/test_parse_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ def __run_cmd(self, cmd):
print(out)
print(err)

if process.returncode != 0:
return err

output = out.splitlines(True)
processed_output = []
for line in output:
Expand Down Expand Up @@ -107,6 +110,10 @@ def __log_and_analyze(self):

self.__run_cmd(analyze_cmd)

def __get_file_list(self, parsed_json, analyzer, list_type):
return list(map(os.path.basename,
parsed_json["analyzers"][analyzer][list_type]))

def test_parse_status_summary(self):
self.__log_and_analyze()

Expand Down Expand Up @@ -156,14 +163,69 @@ def test_parse_status_detailed_json(self):

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"),
self.assertListEqual(self.__get_file_list(parsed_json,
"clangsa", "up-to-date"),
["a.cpp", "b.cpp"])
self.assertListEqual(get_file_list("clang-tidy", "up-to-date"),
self.assertListEqual(self.__get_file_list(parsed_json,
"clang-tidy", "up-to-date"),
[])
self.assertListEqual(get_file_list("clang-tidy", "missing"),
self.assertListEqual(self.__get_file_list(parsed_json,
"clang-tidy", "missing"),
["a.cpp", "b.cpp"])

def test_parse_status_filter(self):
self.__log_and_analyze()

file_filter = str(os.path.abspath(
os.path.join(self.test_dir, "a.cpp")))

parse_status_cmd = [self._codechecker_cmd, "parse",
"--status", "-e", "json", "--detailed",
self.report_dir, "--file", file_filter]
out = self.__run_cmd(parse_status_cmd)

parsed_json = json.loads(out)

self.assertListEqual(self.__get_file_list(parsed_json,
"clangsa", "up-to-date"),
["a.cpp"])
self.assertListEqual(self.__get_file_list(parsed_json,
"clang-tidy", "up-to-date"),
[])
self.assertListEqual(self.__get_file_list(parsed_json,
"clang-tidy", "missing"),
["a.cpp"])

def test_parse_status_relative_filter(self):
self.__log_and_analyze()

file_filter = "a.cpp"

parse_status_cmd = [self._codechecker_cmd, "parse",
"--status", "-e", "json", "--detailed",
self.report_dir, "--file", file_filter]
out = self.__run_cmd(parse_status_cmd)

parsed_json = json.loads(out)

self.assertListEqual(self.__get_file_list(parsed_json,
"clangsa", "up-to-date"),
["a.cpp"])
self.assertListEqual(self.__get_file_list(parsed_json,
"clang-tidy", "up-to-date"),
[])
self.assertListEqual(self.__get_file_list(parsed_json,
"clang-tidy", "missing"),
["a.cpp"])

def test_parse_status_invalid_filter(self):
self.__log_and_analyze()

file_filter = "nonexistent_file.cpp"

parse_status_cmd = [self._codechecker_cmd, "parse",
"--status", "-e", "json", "--detailed",
self.report_dir, "--file", file_filter]
out = self.__run_cmd(parse_status_cmd)

self.assertIn("File filter (--file) contains nonexistent files", out)
22 changes: 12 additions & 10 deletions codechecker_common/compatibility/multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@
# pylint: disable=no-name-in-module
# pylint: disable=unused-import
if sys.platform in ["darwin", "win32"]:
from multiprocess import \
Pipe, Pool, Process, \
Queue, \
Value, \
from multiprocess import ( # type: ignore
Pipe, Pool, Process,
Queue,
Value,
cpu_count
from multiprocess.managers import SyncManager
)
from multiprocess.managers import SyncManager # type: ignore
else:
from concurrent.futures import ProcessPoolExecutor as Pool
from multiprocessing import \
Pipe, \
Process, \
Queue, \
Value, \
from multiprocessing import (
Pipe,
Process,
Queue,
Value,
cpu_count
)
from multiprocessing.managers import SyncManager
2 changes: 1 addition & 1 deletion codechecker_common/requirements_py/dev/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
portalocker~=3.0
coverage<=5.5.0
mypy<=1.7.1
mypy~=1.19.0
PyYAML~=6.0
types-PyYAML~=6.0
setuptools~=80.0
Loading