Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonarcloud ci #5

Merged
merged 1 commit into from
Feb 7, 2024
Merged

Sonarcloud ci #5

merged 1 commit into from
Feb 7, 2024

Conversation

kappsegla
Copy link
Contributor

@kappsegla kappsegla commented Feb 1, 2024

Closes #4

Add more automatic checking of PR. The following changes are made:

maven.yml
Update maven.yml to detect java version from pom.xml setting maven.compiler.release instead of hard coding.
Check out more than top commit for better code analyzing. (fetch-depth: 0)
Add caching of downloaded sonar artifacts for faster runs in the future.
Add SonarCloud scanning of the code by adding sonar plugin to mvn and reports will be available in PR.

pom.xml
Add properties with settings for sonar.
Add code coverage report with jacoco plugin to pom.xml.

@kappsegla kappsegla force-pushed the sonarcloud-ci-based branch 8 times, most recently from 71a3e0d to 1493894 Compare February 1, 2024 20:14
@fungover fungover deleted a comment from sonarcloud bot Feb 1, 2024
@kappsegla kappsegla closed this Feb 1, 2024
@kappsegla kappsegla reopened this Feb 1, 2024
@kappsegla kappsegla marked this pull request as draft February 1, 2024 20:26
@kappsegla kappsegla marked this pull request as ready for review February 1, 2024 20:29
@kappsegla kappsegla force-pushed the sonarcloud-ci-based branch 4 times, most recently from e7762a4 to a585888 Compare February 1, 2024 21:07
@fungover fungover deleted a comment from sonarcloud bot Feb 1, 2024
@kappsegla kappsegla marked this pull request as draft February 2, 2024 12:37
@kappsegla kappsegla self-assigned this Feb 2, 2024
@kappsegla kappsegla force-pushed the sonarcloud-ci-based branch 6 times, most recently from 7c8c7e1 to 79c6f54 Compare February 5, 2024 14:15
PRs will be analyzed using SonarCloud with a CI based approach.
Adds code coverage reporting using maven jacoco plugin.
Updates maven.yaml to use java version based on pom.xml config.
Copy link

sonarcloud bot commented Feb 5, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@kappsegla kappsegla marked this pull request as ready for review February 5, 2024 16:20
@Emmelie83 Emmelie83 self-requested a review February 6, 2024 08:51
Copy link
Contributor

@Emmelie83 Emmelie83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me (with a little help from Chat GPT to understand what you have done) :-)

@kappsegla
Copy link
Contributor Author

Looks good to me (with a little help from Chat GPT to understand what you have done) :-)

I also tried to specify what changes and why in the first comment of the pullrequest.

@Emmelie83
Copy link
Contributor

I also tried to specify what changes and why in the first comment of the pullrequest.

Yes, I know. :-) But I needed ChatGPT to understand lines like this: Java_Version=$(mvn help:evaluate "-Dexpression=maven.compiler.release" -q -DforceStdout | sed -e 's/^1./1.0./') :-)

Copy link

@cmatlak cmatlak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the update with autodetection instead of hardcoding which version should be used,
Also good with fetch.depth 0 for full history analysis

i see no problems with this, good work

@kappsegla kappsegla added this pull request to the merge queue Feb 7, 2024
Merged via the queue into main with commit ba27952 Feb 7, 2024
2 checks passed
@kappsegla kappsegla deleted the sonarcloud-ci-based branch February 7, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code coverage
3 participants