Skip to content

Commit d00a252

Browse files
authored
New-fix-for-2039-master (#2047)
* Fix-2039 (#2043) * Bump version * Fixes #2039 * Merge branch 'branch-3.16.x' into fix-2039 * Update doc about release 3.16.1 * Adjust to 3.16.1 * Bump version * Bump version * Fixes #2039 * Bump version to 3.16.2 * Remove reference to 3.16.1 * Merge branch 'master' into new-fix-for-2039 * Quality pass
1 parent 5068727 commit d00a252

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

conf/release.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ COPY ./LICENSE .
2828
COPY ./sonar/audit sonar/audit
2929

3030
RUN pip install --upgrade pip \
31-
&& pip install sonar-tools==3.17
31+
&& pip install sonar-tools==3.16.2
3232

3333
USER ${USERNAME}
3434
WORKDIR /home/${USERNAME}

doc/what-is-new.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Next version
22

3-
# Version 3.16.1
3+
# Version 3.16.2
44

55
- Patch for [Issue #2039](https://github.com/okorach/sonar-tools/issues/2039) that may affect merely all the Sonar Tools
66

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "sonar-tools"
3-
version = "3.17"
3+
version = "3.16.2"
44
description = "A collection of utility tools for the SonarQube ecosystem"
55
authors = [
66
{name = "Olivier Korach", email = "[email protected]"},

sonar/util/project_utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
# along with this program; if not, write to the Free Software Foundation,
1818
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
#
20-
"""Project utility functions"""
20+
21+
""" Project utility functions """
2122

2223
import math
24+
from sonar import logging as log
2325

2426

2527
def split_loc_filter(loc_filter: str) -> tuple[str, str]:
@@ -50,7 +52,8 @@ def split_loc_filter(loc_filter: str) -> tuple[str, str]:
5052
pass
5153
else:
5254
new_filters.append(f)
53-
loc_middle = int(math.exp((math.log2(loc_max) - math.log2(max(loc_min, 1))) / 2))
55+
loc_middle = int(2 ** ((math.log2(loc_max) + math.log2(max(loc_min, 1))) / 2))
56+
log.debug("LoC split: min=%d, middle=%d, max=%d", loc_min, loc_middle, loc_max)
5457
slice1 = __FILTER_AND.join(new_filters + [f"ncloc>={loc_min}", f"ncloc<={loc_middle}"])
5558
slice2 = __FILTER_AND.join(new_filters + [f"ncloc>{loc_middle}", f"ncloc<={loc_max}"])
5659
return slice1, slice2

0 commit comments

Comments
 (0)