Skip to content

Conversation

elupus
Copy link
Contributor

@elupus elupus commented Sep 12, 2025

When cli is validating analyzer configuration, it will call this method. This will fail with None error in file system functions since no binary is found.

This was introduced in 39666a7

When cli is validating analyzer configuration, it will call this method.
@elupus
Copy link
Contributor Author

elupus commented Sep 12, 2025

There seem to be another piece to the puzzel:

[WARNING 2025-09-13 00:07] - 'diagtool' can not be found next to the clang binary (/usr/lib/llvm-14/bin/clang)!
Traceback (most recent call last):
  File ".pyenv-python3/lib/python3.10/site-packages/codechecker_common/cli.py", line 230, in main
    sys.exit(args.func(args))
  File ".pyenv-python3/lib/python3.10/site-packages/codechecker_analyzer/cli/analyze.py", line 1401, in main
    analyzer.perform_analysis(args, skip_handlers, filter_handlers,
  File ".pyenv-python3/lib/python3.10/site-packages/codechecker_analyzer/analyzer.py", line 169, in perform_analysis
    config_map = analyzer_types.build_config_handlers(args, analyzers)
  File ".pyenv-python3/lib/python3.10/site-packages/codechecker_analyzer/analyzers/analyzer_types.py", line 260, in build_config_handlers
    config_handler = supported_analyzers[ea].construct_config_handler(args)
  File ".pyenv-python3/lib/python3.10/site-packages/codechecker_analyzer/analyzers/clangtidy/analyzer.py", line 719, in construct_config_handler
    checkers = ClangTidy.get_analyzer_checkers()
  File ".pyenv-python3/lib/python3.10/site-packages/codechecker_analyzer/analyzers/clangtidy/analyzer.py", line 332, in get_analyzer_checkers
    get_warnings())
  File ".pyenv-python3/lib/python3.10/site-packages/codechecker_analyzer/analyzers/clangtidy/analyzer.py", line 175, in get_warnings
    environment = analyzer_context.get_context().get_env_for_bin(diagtool_bin)
  File ".pyenv-python3/lib/python3.10/site-packages/codechecker_analyzer/analyzer_context.py", line 220, in get_env_for_bin
    bin_path = Path(binary).resolve()
  File "/usr/lib/python3.10/pathlib.py", line 960, in __new__
    self = cls._from_parts(args)
  File "/usr/lib/python3.10/pathlib.py", line 594, in _from_parts
    drv, root, parts = self._parse_args(args)
  File "/usr/lib/python3.10/pathlib.py", line 578, in _parse_args
    a = os.fspath(a)

This seem to mix up clang-tidy with clangsa and it's diagtool?

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

Successfully merging this pull request may close these issues.

1 participant