Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeChecker checkes does not work when ccache is configured #4453

Open
dkrupp opened this issue Feb 11, 2025 · 0 comments
Open

CodeChecker checkes does not work when ccache is configured #4453

dkrupp opened this issue Feb 11, 2025 · 0 comments
Assignees

Comments

@dkrupp
Copy link
Member

dkrupp commented Feb 11, 2025

Describe the bug
When ccache is configured, the CodeChecker checkers command throws an error.

/workspace/codechecker]$ CodeChecker checkers
[WARNING 2025-02-11 15:16] - 'diagtool' can not be found next to the clang binary (/usr/bin/ccache)!
Traceback (most recent call last):
File "/workspace/codechecker/build/CodeChecker/lib/python3/codechecker_common/cli.py", line 208, in main
sys.exit(args.func(args))
File "/workspace/codechecker/build/CodeChecker/lib/python3/codechecker_analyzer/cmd/checkers.py", line 608, in main
__print_checkers(args, cl)
File "/workspace/codechecker/build/CodeChecker/lib/python3/codechecker_analyzer/cmd/checkers.py", line 475, in __print_checkers
checker_info = __get_detailed_checker_info(args, cl)
File "/workspace/codechecker/build/CodeChecker/lib/python3/codechecker_analyzer/cmd/checkers.py", line 228, in __get_detailed_checker_info
analyzer_config_map = analyzer_types.build_config_handlers(
File "/workspace/codechecker/build/CodeChecker/lib/python3/codechecker_analyzer/analyzers/analyzer_types.py", line 260, in build_config_handlers
config_handler = supported_analyzers[ea].construct_config_handler(args)
File "/workspace/codechecker/build/CodeChecker/lib/python3/codechecker_analyzer/analyzers/clangtidy/analyzer.py", line 712, in construct_config_handler
checkers = ClangTidy.get_analyzer_checkers()
File "/workspace/codechecker/build/CodeChecker/lib/python3/codechecker_analyzer/analyzers/clangtidy/analyzer.py", line 307, in get_analyzer_checkers
for warning in get_warnings())
File "/workspace/codechecker/build/CodeChecker/lib/python3/codechecker_analyzer/analyzers/clangtidy/analyzer.py", line 169, in get_warnings
environment = analyzer_context.get_context().get_env_for_bin(diagtool_bin)
File "/workspace/codechecker/build/CodeChecker/lib/python3/codechecker_analyzer/analyzer_context.py", line 220, in get_env_for_bin
bin_path = Path(binary).resolve()
File "/usr/lib/python3.8/pathlib.py", line 1042, in new
self = cls._from_parts(args, init=False)
File "/usr/lib/python3.8/pathlib.py", line 683, in _from_parts
drv, root, parts = self._parse_args(args)
File "/usr/lib/python3.8/pathlib.py", line 667, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

@dkrupp dkrupp added this to the release 6.25.0 milestone Feb 11, 2025
@dkrupp dkrupp modified the milestones: release 6.25.0, release 6.26.0 Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants