From d6a972834d258f0348b1a464e519e59e4ab38576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Mon, 16 Oct 2023 17:57:59 +0200 Subject: [PATCH] Soften the assert to a warning --- analyzer/codechecker_analyzer/cmd/analyzers.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/analyzer/codechecker_analyzer/cmd/analyzers.py b/analyzer/codechecker_analyzer/cmd/analyzers.py index d20dfc7afc..5d1f9cf7a0 100644 --- a/analyzer/codechecker_analyzer/cmd/analyzers.py +++ b/analyzer/codechecker_analyzer/cmd/analyzers.py @@ -162,8 +162,11 @@ def uglify(text): analyzer_class = analyzer_types.supported_analyzers[analyzer_name] configs = analyzer_class.get_analyzer_config() - assert configs and 'executable' in [key for key, _ in configs], \ - "Every analyzer must have at least the 'executable' config!" + if not configs: + LOG.warning(f"No analyzer configurations found for '{analyzer}'. " + "If you suspsect this shouldn't be the case, try to " + "update your analyzer or check whether CodeChecker " + "found the intended binary.") rows = [(':'.join((analyzer_name, c[0])), c[1]) if 'details' in args else (':'.join((analyzer_name, c[0])),) for c in configs]