Skip to content

Commit

Permalink
[fix] Validate checkers ordered with "checker" prefix
Browse files Browse the repository at this point in the history
CC validates ordered checkers before analyzing, but didn't use to
validate the checkers ordered with the "checker:" prefix.
With this fix, all checkers will be validated.
Fixes Ericsson#4405
  • Loading branch information
Nora Zinaeddin committed Dec 15, 2024
1 parent 5d4530d commit 1e1a713
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions analyzer/codechecker_analyzer/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ def perform_analysis(args, skip_handlers, filter_handlers,
available_checkers.add(checker_name)

if 'ordered_checkers' in args:
missing_checkers = checkers.available(args.ordered_checkers,
ordered_checkers = [(checker[0].replace("checker:", ""), checker[1])
if checker[0].startswith("checker:") else checker
for checker in args.ordered_checkers]
missing_checkers = checkers.available(ordered_checkers,
available_checkers)
if missing_checkers:
diag_msg = "No checker(s) with these names was found:\n{}".format(
Expand All @@ -221,7 +224,7 @@ def perform_analysis(args, skip_handlers, filter_handlers,
LOG.warning(diag_msg)
else:
LOG.error(diag_msg)
LOG.info("Although it is not reccomended, if you want to "
LOG.info("Although it is not recommended, if you want to "
"suppress errors relating to unknown "
"checker names, consider using the option "
"'--no-missing-checker-error'")
Expand Down

0 comments on commit 1e1a713

Please sign in to comment.