Skip to content

Commit ba21267

Browse files
committed
Revert "New-fix-for-2039-master (#2047)"
This reverts commit d00a252.
1 parent c81dea4 commit ba21267

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
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.2
31+
&& pip install sonar-tools==3.17
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.2
3+
# Version 3.16.1
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.2"
3+
version = "3.17"
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: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@
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-
21-
""" Project utility functions """
20+
"""Project utility functions"""
2221

2322
import math
24-
from sonar import logging as log
2523

2624

2725
def split_loc_filter(loc_filter: str) -> tuple[str, str]:
@@ -52,8 +50,7 @@ def split_loc_filter(loc_filter: str) -> tuple[str, str]:
5250
pass
5351
else:
5452
new_filters.append(f)
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)
53+
loc_middle = int(math.exp((math.log2(loc_max) - math.log2(max(loc_min, 1))) / 2))
5754
slice1 = __FILTER_AND.join(new_filters + [f"ncloc>={loc_min}", f"ncloc<={loc_middle}"])
5855
slice2 = __FILTER_AND.join(new_filters + [f"ncloc>{loc_middle}", f"ncloc<={loc_max}"])
5956
return slice1, slice2

0 commit comments

Comments
 (0)