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
17 changes: 9 additions & 8 deletions migration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ When sonar-migration complete successfully they return exit code 0. En case of f

- Robustness: Handle `connectionError` errors in project extract threads
- Added option `--skipIssues` to skip expensive issue count extraction task from the extract which may be necessary on large platforms extracts
- Added export of analysis history

## Version 0.2

Expand Down Expand Up @@ -140,18 +141,18 @@ When sonar-migration complete successfully they return exit code 0. En case of f
- Last background task scanner context and warnings
- Background Task history
- Issues:
- # of issue False positive
- # of issues Won’t fix
- # of issues Accepted
- # of issues generated by 3rd party rules (with breakdown per rule)
- Nbr of issue False positive
- Nbr of issues Won’t fix
- Nbr of issues Accepted
- Nbr of issues generated by 3rd party rules (with breakdown per rule)
- For each branch:
- Last analysis date
- Ncloc w/ breakdown by language
- Issues
- # of issue False positive
- # of issues Won’t fix
- # of issues Accepted
- # of issues generated by 3rd party rules (with breakdown per rule)
- Nbr of issue False positive
- Nbr of issues Won’t fix
- Nbr of issues Accepted
- Nbr of issues generated by 3rd party rules (with breakdown per rule)

# License

Expand Down
2 changes: 1 addition & 1 deletion migration/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ if [ "$release" = "1" ]; then
fi

if [ "$release_docker" = "1" ]; then
docker buildx build --push --platform linux/amd64,linux/arm64 -t olivierkorach/sonar-migration:0.2 -t olivierkorach/sonar-migration:latest -f migration/release.Dockerfile .
docker buildx build --push --platform linux/amd64,linux/arm64 -t olivierkorach/sonar-migration:0.3 -t olivierkorach/sonar-migration:latest -f migration/release.Dockerfile .
fi
2 changes: 1 addition & 1 deletion migration/release.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ COPY ./LICENSE .
COPY ./sonar/audit sonar/audit

RUN pip install --upgrade pip \
&& pip install sonar-migration==0.2 --force-reinstall
&& pip install sonar-migration==0.3 --force-reinstall

USER ${USERNAME}
WORKDIR /home/${USERNAME}
Expand Down
2 changes: 1 addition & 1 deletion migration/sonar_migration
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ sonar-migration version {version.PACKAGE_VERSION}

run: sonar-migration -u <SonarQubeURL> -t <SonarAdminUserToken>

See tools built-in -h help and https://github.com/okorach/sonar-tools/doc/README.sonar-migration.md for more documentation
See tools built-in -h help and https://github.com/okorach/sonar-tools/migration/README.md for more documentation
''')
2 changes: 1 addition & 1 deletion migration/what-is-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- Robustness: Handle `connectionError` errors in project extract threads
- Added option `--skipIssues` to skip expensive issue count extraction task from the extract which may be necessary on large platforms extracts

- Added export of analysis history

# Version 0.2

Expand Down
2 changes: 2 additions & 0 deletions sonar/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def migration_export(self, export_settings: types.ConfigSettings) -> dict[str, a
loc_distrib = {m.split("=")[0]: int(m.split("=")[1]) for m in lang_distrib.split(";")}
loc_distrib["total"] = self.loc()
json_data["ncloc"] = loc_distrib
json_data["analysisHistory"] = {r[0]: int(r[2]) for r in self.get_measures_history(["ncloc"])}
if export_settings["SKIP_ISSUES"]:
log.debug("Issues count extract skipped for %s`", str(self))
return json_data
Expand All @@ -198,6 +199,7 @@ def migration_export(self, export_settings: types.ConfigSettings) -> dict[str, a
"fixed": hotspot_count(self.endpoint, resolution=["FIXED"], **params),
}
log.debug("%s has these notable issues %s", str(self), str(json_data["issues"]))

return json_data

def get_measures(self, metrics_list: types.KeyList) -> dict[str, any]:
Expand Down