[Java] Avoid bitwise operators

Hi Nicolas!

Yes, indeed. I could argue with some details of the points you raised, but your overall conclusion would still be reasonable and justified. Thanks for explaining the rationale in more detail!

Unfortunately, unless I’m mistaken, one does not have that option on SonarCloud.

Being a rather small company, we have a very strong preference to rely on cloud services instead of maintaining our own servers wherever possible. I would not want us to move to a self-hosted SonarQube instance unless there is a truly huge advantage. And as much as I would like to activate an “avoid bitwise operators” rule in my company, that is not at all important enough to warrant a move and the subsequent maintenance burden.

That said, since adopting SonarCloud, we have encountered quite a few cases where closed-source code had specific mistakes and undesired code patterns, but was too specific to the respective company/team to become a SonarCloud rule. So we would definitively appreciate being able to “inject/upload/connect/webhook/sandbox” a custom rule to SonarCloud in some way. Of course, I have no idea if that would even be possible or whether there are (enough) other SonarCloud subscribers interested in this. Also, I have to admit that I would consider most of my various other feature suggestions to be more important. (Sorry, I couldn’t resist advertising them here :wink: ).

1 Like