Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
875f41b
Replacing StringUtils.equalsIgnoreCase by Strings.CI.equals
AndreasIgel Oct 9, 2025
0aa4827
Solving possible nullpointer-exception from static code analysis
AndreasIgel Oct 9, 2025
8c5c4a9
Adding private constructor for utility-class
AndreasIgel Oct 9, 2025
7bbf600
Fixing codesmells
AndreasIgel Oct 9, 2025
376fc93
Adding configuration for sonar-server of project
AndreasIgel Oct 9, 2025
11831b2
Solving sonarQube issue
AndreasIgel Oct 9, 2025
0f84416
Replacing raw type by generic
AndreasIgel Oct 9, 2025
0b4a2b6
Replacing member variable by function parameters
AndreasIgel Oct 9, 2025
bd4900e
Do not return true for processing of annotations, which could not be …
AndreasIgel Oct 9, 2025
4cc62c1
Reducing complexity of extractParamJavaDoc
AndreasIgel Oct 9, 2025
663e5f9
Replacing deprecated StringUtils.removeStart by Strings.CI.removeStart
AndreasIgel Oct 9, 2025
9ad66a3
Replacing rawtype HashSet by diamond HashSet<>
AndreasIgel Oct 9, 2025
4caf95f
Fixing serialization issue in BuilderException
AndreasIgel Oct 9, 2025
c1ef825
Replacing repeated literals by constants
AndreasIgel Oct 9, 2025
23cbab9
Adding Badges from SonarQube
AndreasIgel Oct 9, 2025
37a6b9e
Using paramized Test instead multiple tests
AndreasIgel Oct 9, 2025
8cf3228
Removing protected accessor because this is done in junit jupiter dif…
AndreasIgel Oct 9, 2025
0fca016
Replacing optional by own wrapper type, because optional should be su…
AndreasIgel Oct 9, 2025
09b3a1f
Integration of messages to be used for logging
AndreasIgel Oct 9, 2025
94604af
Refactoring to enclose typeUtils and elementUtils in ProcessingContex…
AndreasIgel Oct 9, 2025
37e56dc
Moving logger into ProcessingContext too
AndreasIgel Oct 9, 2025
25410ad
Solving todos by adding missing loggins
AndreasIgel Oct 9, 2025
7bc9283
Fixing asserts to handle compile-errors and warnings now
AndreasIgel Oct 9, 2025
de5f670
Fixing handling of methods with one parameter to not be recognized to…
AndreasIgel Oct 9, 2025
436e25c
Moving java-util package name in a constant
AndreasIgel Oct 9, 2025
dad754f
Replacing deprecated Compiler.javac() by static import
AndreasIgel Oct 9, 2025
4dcc235
Replacing call to java() by helper-function
AndreasIgel Oct 9, 2025
1db578c
Suppress warning because there is no better solution there with possi…
AndreasIgel Oct 9, 2025
6e029fc
Adding sonar-project.properties so that configuration is correctly go…
AndreasIgel Oct 9, 2025
6d8fc37
Adding properties to pom file regarding sonar
AndreasIgel Oct 12, 2025
5066250
Refactoring workflows to include soa
AndreasIgel Oct 12, 2025
3978c8a
Merge branch 'main' into feature/sonarqube-integration
AndreasIgel Oct 12, 2025
2433ced
Adding sonar-version to plugin management
AndreasIgel Oct 12, 2025
9178cc4
Removing verify to not run tests twice
AndreasIgel Oct 12, 2025
9707fba
Definition of binary-paths
AndreasIgel Oct 12, 2025
3e387a5
Merge branch 'feature/sonarqube-integration' of https://github.com/ja…
AndreasIgel Oct 12, 2025
7989da4
Updating to latest sonar version
AndreasIgel Oct 12, 2025
8205b8b
Updating maven-pipeline to habe artefacts locally when running steps
AndreasIgel Oct 12, 2025
afbfecb
Using explicit maven plugin, to hide warning in pipeline
AndreasIgel Oct 12, 2025
0df6983
Fixing warnings in pipelines and fixing security hotspots
AndreasIgel Oct 12, 2025
a0fbe2a
Updating hashes of codecov-actions
AndreasIgel Oct 12, 2025
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
33 changes: 28 additions & 5 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
types: [opened, synchronize, reopened]

jobs:
build:
Expand All @@ -25,14 +26,37 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for better SonarCloud analysis

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
distribution: 'zulu'
cache: maven

- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build with Maven
run: mvn -B verify -Pmetrics --file pom.xml
run: mvn -B install -Pmetrics --file pom.xml

- name: SonarCloud Analysis
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar --file pom.xml

- name: Upload JaCoCo HTML report (processor)
if: always()
Expand All @@ -52,19 +76,18 @@ jobs:

- name: Upload test results to Codecov (processor)
if: always()
uses: codecov/test-results-action@v1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: |
processor/target/surefire-reports/*.xml
processor/target/failsafe-reports/*.xml
if-no-files-found: warn
fail_ci_if_error: true
verbose: false

- name: Upload coverage to Codecov (processor)
if: always()
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
with:
fail_ci_if_error: true
files: processor/target/site/jacoco/jacoco.xml
Expand Down
19 changes: 19 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>${java.version}</maven.compiler.release>

<!-- SonarCloud Properties -->
<sonar.projectKey>java-helpers_simple-builders</sonar.projectKey>
<sonar.organization>java-helpers</sonar.organization>
<sonar.projectName>Simple Builders</sonar.projectName>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.java.binaries>${project.basedir}/core/target/classes,${project.basedir}/processor/target/classes</sonar.java.binaries>
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/processor/target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
<sonar.exclusions>**/example/**</sonar.exclusions>
<!-- Coverage exclusion needs to match jacoco configuration in processor module -->
<sonar.coverage.exclusions>**/*Mapper*.java,**/processor/dtos/**,**/generated/**</sonar.coverage.exclusions>

<!-- Plugin Versions -->
<plugin.maven.compiler.version>3.13.0</plugin.maven.compiler.version>
<plugin.maven.deploy.version>3.1.1</plugin.maven.deploy.version>
Expand All @@ -76,6 +87,7 @@
<plugin.maven.gpg.version>3.2.7</plugin.maven.gpg.version>
<plugin.central.publishing.version>0.8.0</plugin.central.publishing.version>
<plugin.code-format.version>2.25</plugin.code-format.version>
<plugin.sonar.version>5.2.0.4988</plugin.sonar.version>
</properties>

<build>
Expand Down Expand Up @@ -106,6 +118,13 @@
<artifactId>fmt-maven-plugin</artifactId>
<version>${plugin.code-format.version}</version>
</plugin>

<!-- SonarCloud -->
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${plugin.sonar.version}</version>
</plugin>
</plugins>
</pluginManagement>

Expand Down
5 changes: 0 additions & 5 deletions processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,6 @@
<!-- Only cover main sources of this module -->
<dataFile>${project.build.directory}/jacoco.exec</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
<reports>
<report>html</report>
<report>xml</report>
<report>csv</report>
</reports>
<excludes>
<!-- exclude any generated sources or test utilities if they ever get packaged under main -->
<exclude>**/generated/**</exclude>
Expand Down
23 changes: 23 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SonarCloud Configuration
sonar.projectKey=java-helpers_simple-builders
sonar.organization=java-helpers

# Project Information
sonar.projectName=Simple Builders
sonar.projectVersion=0.2.0

# Source and Test Directories
sonar.sources=core/src/main/java,processor/src/main/java
sonar.tests=processor/src/test/java
sonar.java.binaries=core/target/classes,processor/target/classes
sonar.java.test.binaries=processor/target/test-classes

# Coverage
sonar.coverage.jacoco.xmlReportPaths=processor/target/site/jacoco/jacoco.xml

# Exclusions
sonar.exclusions=**/generated/**,example/**
sonar.coverage.exclusions=**/*Mapper*.java,**/processor/dtos/**,**/generated/**,example/**

# Java Version
sonar.java.source=17
Loading