javaeclipsesonarqubesonarlintsonarlint-eclipse

Eclipse Sonar Lint default profile


I'm using Eclipse with sonar lint and a remote sonar server.

I have configured a custom quality profile which I have defined as Default in sonarqube.

In eclipse I only configured the sonar server, but no project binding.

The last months everything works fine and I had the correct rule set in eclipse.

But now I see, that it seems that sonar lint only retreived the sonar way profile. Not my own. Only If I add a specific project binding, my custom profile is used. Can me someone explain what changed here? Which profile does sonarline use when no project binding is configured? Maybe someone had updated the sonar server and the current version always returs the sonar way?

But currently my custom profile is the default profile in sonar.

For me it is not possible to define a project binding to all of my eclipse projects because I have lots of them and not all are configured in sonar. But I whant to have the local checks for all of them.


Solution

  • Projects in Eclipse that are not bound to SonarQube are using the default active rules defined as defined by the embedded analyzers. Whatever you did on SonarQube side, will not affect these projects in any way.

    Projects in Eclipse that are bound to some SonarQube project, will use the active rules configured in the SonarQube projects to which they are bound. The moment you unbind these projects, they switch back to the default active rules, as if they never bound.

    Although it's not the typical or intended use case, nothing prevents you from binding an Eclipse project to a completely unrelated project on SonarQube, to make it use the analyzers and quality profile of that project.