Skip to content

Commit

Permalink
[fix] Fix stacktrace when gcc analyzer version getter flag is not sup…
Browse files Browse the repository at this point in the history
…ported.

The command "CodeChecker analyzers" fails when a too old gcc doesn't
support version getter flags.
  • Loading branch information
bruntib committed Oct 30, 2023
1 parent 869a8ad commit 2a6d113
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions analyzer/codechecker_analyzer/analyzers/gcc/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ def is_binary_version_incompatible(cls, environ):
"""
analyzer_version = cls.get_binary_version(environ)

if analyzer_version is None:
return "GCC binary is too old to support -dumpfullversion."

# The analyzer version should be above 13.0.0 because the
# '-fdiagnostics-format=sarif-file' argument was introduced in this
# release.
Expand Down

0 comments on commit 2a6d113

Please sign in to comment.