Skip to content

fix: resolve SonarCloud open issues#95

Merged
MatthiasBurger-Coder merged 1 commit into
mainfrom
fix-sonarcloud-open-issues
May 9, 2026
Merged

fix: resolve SonarCloud open issues#95
MatthiasBurger-Coder merged 1 commit into
mainfrom
fix-sonarcloud-open-issues

Conversation

@MatthiasBurger-Coder
Copy link
Copy Markdown
Owner

Summary

  • resolve the refreshed SonarCloud OPEN findings for Joern semantic analysis code and tests
  • group BTM persistence inputs to avoid the long parameter list
  • remove duplicated Joern JSON field literals and simplify parser loop control
  • keep Gradle task constructors public with targeted java:S5993 suppressions because Gradle cannot instantiate these tasks with protected constructors in this project
  • reshape throwing assertions and AssertJ chains in semantic and Joern tests

Verification

  • ./gradlew.bat compileJava compileTestJava --console=plain --stacktrace
  • ./gradlew.bat test --tests de.burger.forensics.adapters.filesystem.AnalysisManifestWriterTest --tests de.burger.forensics.adapters.joern.JoernCliSemanticAnalysisAdapterTest --tests de.burger.forensics.adaptersupport.joern.JoernOutputParserTest --tests de.burger.forensics.application.service.AnalyzeSemanticsUseCaseTest --tests de.burger.forensics.domain.model.semantic.SemanticAnalysisModelTest --tests de.burger.forensics.plugin.btmgen.gradle.AnalyzeForensicsSemanticsTaskTest --tests de.burger.forensics.plugin.btmgen.gradle.GenerateBtmTaskTest --tests de.burger.forensics.plugin.btmgen.common.BtmGenerationAdapterValidationTest --console=plain --stacktrace
  • ./gradlew.bat clean test jacocoTestReport jacocoTestCoverageVerification checkPackageCoverage --console=plain --stacktrace
  • ./gradlew.bat validatePlugins --no-daemon --console=plain --stacktrace
  • wsl.exe bash -lc "cd /mnt/d/Projects/forensics_tracing && ./gradlew clean test jacocoTestReport jacocoTestCoverageVerification checkPackageCoverage --console=plain --stacktrace"

Reduce SonarCloud findings in Joern semantic analysis and related tests without changing public behavior.

How: extracted repeated Joern JSON field literals, rewrote parser loops with a single loop-control exit, grouped BTM persistence inputs, kept Gradle task constructors public with targeted S5993 suppressions because Gradle requires public @Inject task constructors here, and reshaped test assertions to satisfy AssertJ and throwing-lambda rules.

Affected components: Joern output parsing, BTM analysis persistence orchestration, Gradle semantic tasks, semantic model tests, Joern adapter tests, manifest tests, and semantic task tests.

Bugs fixed: Linux CI timeout stream handling was already merged in PR #94; this commit addresses the remaining SonarCloud OPEN findings from the refreshed main analysis.

Features introduced: none. Refactoring/structural changes: limited to Sonar-driven helper extraction and local parameter grouping. Breaking changes: none.

Verification executed: Windows targeted affected tests; Windows ./gradlew.bat clean test jacocoTestReport jacocoTestCoverageVerification checkPackageCoverage --console=plain --stacktrace; Windows ./gradlew.bat validatePlugins --no-daemon --console=plain --stacktrace; WSL ./gradlew clean test jacocoTestReport jacocoTestCoverageVerification checkPackageCoverage --console=plain --stacktrace.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 9, 2026

@MatthiasBurger-Coder MatthiasBurger-Coder merged commit e08e092 into main May 9, 2026
2 checks passed
@MatthiasBurger-Coder MatthiasBurger-Coder deleted the fix-sonarcloud-open-issues branch May 9, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant