Raise issue about not returning non-zero codes after analysis #152
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
this is actually a try to bring attention to a major issue (I think this is a bug) in 4.0.0/4.0.1.
Since I can't create an issue at this repository anymore, I've decided to describe it here.
See reported case https://community.sonarsource.com/t/sonarqube-scanner-4-0-0-doesnt-return-non-zero-exit-code-in-case-of-quality-gate-failure/118755
TL;DR: v3 returns non-zero code when Quality Gate fails. With
-Dsonar.qualitygate.wait="true"
this allows us to fail the build on Jenkins.But v4 of this package always returns 0 exit code, making it impossible to fail the build on our side.
I didn't find breaking change in the diff between 3.5.0 and 4.0.0, but from my tests:
0
(bug)0
(bug)And please note that while this package has 4.1.0 release,
npm
's latest version is 4.0.1 - so it seems like it was forgotten to publish a new version.