diff --git a/conf/release.Dockerfile b/conf/release.Dockerfile index b9f75c73..21686738 100644 --- a/conf/release.Dockerfile +++ b/conf/release.Dockerfile @@ -28,7 +28,7 @@ COPY ./LICENSE . COPY ./sonar/audit sonar/audit RUN pip install --upgrade pip \ -&& pip install sonar-tools==3.16.1 +&& pip install sonar-tools==3.16.2 USER ${USERNAME} WORKDIR /home/${USERNAME} diff --git a/doc/what-is-new.md b/doc/what-is-new.md index fd68dc39..500b67b5 100644 --- a/doc/what-is-new.md +++ b/doc/what-is-new.md @@ -1,6 +1,6 @@ # Next version -# Version 3.16.1 +# Version 3.16.2 - Patch for [Issue #2039](https://github.com/okorach/sonar-tools/issues/2039) that may affect merely all the Sonar Tools diff --git a/pyproject.toml b/pyproject.toml index 727b16d8..fa9079ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "sonar-tools" -version = "3.16.1" +version = "3.16.2" description = "A collection of utility tools for the SonarQube ecosystem" authors = [ {name = "Olivier Korach", email = "olivier.korach@gmail.com"}, diff --git a/sonar/util/project_utils.py b/sonar/util/project_utils.py index deec9284..09aaa915 100644 --- a/sonar/util/project_utils.py +++ b/sonar/util/project_utils.py @@ -19,6 +19,7 @@ # import math +from sonar import logging as log def split_loc_filter(loc_filter: str) -> tuple[str, str]: @@ -49,7 +50,8 @@ def split_loc_filter(loc_filter: str) -> tuple[str, str]: pass else: new_filters.append(f) - loc_middle = int(math.exp((math.log2(loc_max) - math.log2(max(loc_min, 1))) / 2)) + loc_middle = int(2 ** ((math.log2(loc_max) + math.log2(max(loc_min, 1))) / 2)) + log.debug("LoC split: min=%d, middle=%d, max=%d", loc_min, loc_middle, loc_max) slice1 = __FILTER_AND.join(new_filters + [f"ncloc>={loc_min}", f"ncloc<={loc_middle}"]) slice2 = __FILTER_AND.join(new_filters + [f"ncloc>{loc_middle}", f"ncloc<={loc_max}"]) return slice1, slice2 diff --git a/sonar/version.py b/sonar/version.py index 15ac22f5..e55d14da 100644 --- a/sonar/version.py +++ b/sonar/version.py @@ -24,5 +24,5 @@ """ -PACKAGE_VERSION = "3.16.1" +PACKAGE_VERSION = "3.16.2" MIGRATION_TOOL_VERSION = "0.6-snapshot"