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

Raise issue about not returning non-zero codes after analysis #152

Closed
wants to merge 1 commit into from

Conversation

maks-rafalko
Copy link

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:

  • 3.5.0 - works correctly, returns non-zero exit code in case of Quality Gate issues
  • 4.0.0 - exit code is awlays 0 (bug)
  • 4.0.1 - exit code is awlays 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.

@maks-rafalko maks-rafalko deleted the patch-1 branch July 15, 2024 09:59
@maks-rafalko
Copy link
Author

See #153

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