I second this.
GWT also doesn’t have support for the entirety of the Java standard library, so some features simply can’t be used in client code. And if we were to write custom Sonar rules specifically for GWT, it would also be nice to only apply those to client code and not to server stuff (without having to hardcode such a lookup into the rules themselves).
Why don’t you execute 2 SonarQube analyses (frontend and backend) instead of one? So you could see 2 projects in SonarQube and associate different quality profiles.
If the frontend and the backend are in two different folders it should be easy, otherwise you can play with sonar.exclusions and sonar.inclusions see Narrowing the Focus.
actually, that’s a good suggestion, I think this would work at least from a Sonar / MAVEN perspective - Thanks!
But I am not sure if this will work with our bitbucket integration where we enforce quality gate before a merge is permitted for short- and long-lived branches. We’re using " Sonar for Bitbucket Server" plugin for that.
I’ve been thinking about your suggestion; I don’t think it will work in my environment, and here’s why:
As already indicated, we have bitbucket (on premise) with “Sonar for Bitbucket Server” plugin to enforce quality gates for Pull Requests. I can’t see how this will work with two analysis since the plugin will look at just one branch. This might be considered not a SQ issue, but would be a problem for us.