smallrye / smallrye-mutiny

An Intuitive Event-Driven Reactive Programming Library for Java
https://smallrye.io/smallrye-mutiny
Apache License 2.0
817 stars 128 forks source link

Drop Sonar integration #978

Closed jponge closed 2 years ago

jponge commented 2 years ago

Sonar has gradually become useless in our workflows:

I hereby propose to pull the plug. Thoughts?

/cc @cescoffier @heubeck

heubeck commented 2 years ago

didn't even recognize that it was there ;)

cescoffier commented 2 years ago

No problem from my side. We are not using it anymore.

m-g-sonar commented 2 years ago

Hey @jponge, I'm Michael, a java dev' at Sonar, part of the small team working on our in-house static analyzers. In particular, my little (sub-)team and I are working on the Java Analyzer itself.

Out of curiosity, I looked at your SonarCloud project page, and from what I can see, it seems that mainly two rules caused you a lot of pain.

I consequently have a few 2-3 questions for you, if you don't mind taking the time to answer!

Thanks for your time! The java analyzer is being shipped with 600+ rules, I feel it's sad to see you leave because of a few painful and noisy rules.

Cheers, Michael

jponge commented 2 years ago

Hi @m-g-sonar, and thanks for reaching out.

First of all and as mentioned here and in other places our decision is mainly driven by the adoption of codecov and revapi. Both tools provide the type of QA we need right now.

Sonar was certainly valuable before, but it gradually became useless in our workflows. I shall also mention that it significantly increased our time in CI, so removing it makes sense from a cloud resource consumption perspective.

The rule about unit test modifiers (...)

JUnit 5 has a stylistic preference for avoiding public declarations, but raising flags is quite questionable, and as you said it shall probably not be part of the default profile.

The rule about volatile fields (...)

From what I recall it was always about not-so-obvious cases for a static analysis tool (e.g., drain-loop patterns, threading assumptions the checker cannot know about, etc).

But basically what was always super annoying is that it would raise a flag "volatile access is not thread safe" (I grossly simplified) every time we'd use a volatile.

Of course, I'm not saying that you didn't face other FPs from other rules (...)

I get that and thanks again for reaching out.

On the other hand I'm not sure this codebase is the sweet spot for Sonar unless heavily tuned, and we've come down to relying on more narrow tools.

All the best!

-- Julien