Skip to content

Conversation

@bruntib
Copy link
Contributor

@bruntib bruntib commented May 16, 2025

The analyzer_base.get_analyzer_config() and
analyzer_base.get_checker_config() functions returned a list of tuples. The tuple members were accessed by indexing. It was hard to understand what the tuple members represent and what are their possible values.

This commit introduces AnalyzerConfig and CheckerConfig types. The functions mentioned above return the list of these objects respectively.

cc-verbatim-args-file is a common analyzer option introduced by not the analyzers but CodeChecker. The parameter of this option must be an existing file path. The typed handling of analyzer options helps to emit an error when the provided path doesn't exist.

@bruntib bruntib added this to the release 6.26.0 milestone May 16, 2025
@bruntib bruntib requested a review from vodorok as a code owner May 16, 2025 13:28
@bruntib bruntib added analyzer 📈 Related to the analyze commands (analysis driver) refactoring 😡 ➡️ 🙂 Refactoring code. labels May 16, 2025
@bruntib bruntib force-pushed the analyzer_checker_config branch 6 times, most recently from 3e5179e to 9af4029 Compare May 17, 2025 08:20
@bruntib bruntib marked this pull request as draft May 17, 2025 08:31
The analyzer_base.get_analyzer_config() and
analyzer_base.get_checker_config() functions returned a list of tuples.
The tuple members were accessed by indexing. It was hard to understand
what the tuple members represent and what are their possible values.

This commit introduces AnalyzerConfig and CheckerConfig types. The
functions mentioned above return the list of these objects respectively.

cc-verbatim-args-file is a common analyzer option introduced by not the
analyzers but CodeChecker. The parameter of this option must be an
existing file path. The typed handling of analyzer options helps to emit
an error when the provided path doesn't exist.
@bruntib bruntib marked this pull request as ready for review May 21, 2025 10:41
@bruntib bruntib force-pushed the analyzer_checker_config branch from 9af4029 to 39666a7 Compare May 21, 2025 10:46
@gulyasgergely902 gulyasgergely902 merged commit 07e85c3 into Ericsson:master May 26, 2025
8 checks passed
@bruntib bruntib deleted the analyzer_checker_config branch May 26, 2025 13:43
if cfg.analyzer not in supported_analyzers:
wrong_configs.append((cfg.analyzer, None))
analyzer_configs = {
analyzer_name: analyzer_class.get_analyzer_config()
Copy link
Contributor

@elupus elupus Sep 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks when clangsa binaries are not existing: get_analyzer_config does not protect for missing binary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix here: #4660

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

analyzer 📈 Related to the analyze commands (analysis driver) refactoring 😡 ➡️ 🙂 Refactoring code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants