Skip to content

Commit 4f4b380

Browse files
committed
[fix] semver.Version doesn't have strip()
The `get_binary_version()` now returns `semver.Version` instead of `str`. However, at two places the changes were not properly adatped, where we still assumed a string.
1 parent eda8dee commit 4f4b380

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

analyzer/codechecker_analyzer/analyzers/cppcheck/analyzer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def is_binary_version_incompatible(cls):
410410
return None
411411

412412
return "CppCheck binary found is too old at " \
413-
f"v{str(analyzer_version).strip()}; minimum version is 1.80"
413+
f"v{analyzer_version}; minimum version is 1.80"
414414

415415
def construct_result_handler(self, buildaction, report_output,
416416
skiplist_handler):

analyzer/codechecker_analyzer/analyzers/gcc/analyzer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def is_binary_version_incompatible(cls):
196196
if analyzer_version and analyzer_version >= Version(13, 0, 0):
197197
return None
198198

199-
return f"GCC binary found is too old at v{analyzer_version.strip()}; "\
199+
return f"GCC binary found is too old at v{analyzer_version}; "\
200200
"minimum version is 13.0.0."
201201

202202
def construct_result_handler(self, buildaction, report_output,

0 commit comments

Comments
 (0)