Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conf/release.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion doc/what-is-new.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"},
Expand Down
4 changes: 3 additions & 1 deletion sonar/util/project_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#

import math
from sonar import logging as log


def split_loc_filter(loc_filter: str) -> tuple[str, str]:
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion sonar/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@

"""

PACKAGE_VERSION = "3.16.1"
PACKAGE_VERSION = "3.16.2"
MIGRATION_TOOL_VERSION = "0.6-snapshot"