Skip to content

Commit 6482b1c

Browse files
authored
New-fix-for-2039 (#2046)
* Fixes #2039 * Bump version to 3.16.2 * Remove reference to 3.16.1
1 parent 959ba9c commit 6482b1c

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-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.16.1
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.16.1"
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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#
2020

2121
import math
22+
from sonar import logging as log
2223

2324

2425
def split_loc_filter(loc_filter: str) -> tuple[str, str]:
@@ -49,7 +50,8 @@ def split_loc_filter(loc_filter: str) -> tuple[str, str]:
4950
pass
5051
else:
5152
new_filters.append(f)
52-
loc_middle = int(math.exp((math.log2(loc_max) - math.log2(max(loc_min, 1))) / 2))
53+
loc_middle = int(2 ** ((math.log2(loc_max) + math.log2(max(loc_min, 1))) / 2))
54+
log.debug("LoC split: min=%d, middle=%d, max=%d", loc_min, loc_middle, loc_max)
5355
slice1 = __FILTER_AND.join(new_filters + [f"ncloc>={loc_min}", f"ncloc<={loc_middle}"])
5456
slice2 = __FILTER_AND.join(new_filters + [f"ncloc>{loc_middle}", f"ncloc<={loc_max}"])
5557
return slice1, slice2

sonar/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
2525
"""
2626

27-
PACKAGE_VERSION = "3.16.1"
27+
PACKAGE_VERSION = "3.16.2"
2828
MIGRATION_TOOL_VERSION = "0.6-snapshot"

0 commit comments

Comments
 (0)