Autobind with enterprise server when user opens the project?

Please provide

  • Operating system: MAC
  • SonarLint plugin version:
  • Programming language you’re coding in: Java
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version): sonarQubee

And a thorough description of the problem / question:

Ii would like to know is there a way i can autobind my project with enterprise sonar qube using sonarlint. there is a way developer will have to open settings page and configure it. is there a way i can do it programmatically through intellij plugin i can configure iit automatically when user opens the project?

Hi @kanagarajp

There is no programmatic way to configure the binding, at least not using a SonarLint plugin API. What is maybe possible it to create/edit the IntelliJ project settings (.idea/sonarlint.xml) according to your needs. You can even save this file in your SCM so that all users will have the binding already configured.
But that won’t be enough, since a connection should also be defined, and credentials have to be saved as well if you really want a zero-conf provisioning.

What we have added in recent versions of SonarLint that may help you:

  • binding suggestions (just after defining a connection, SonarLint will try to guess the right binding for the currently open project)
  • automatic-binding when opening an issue in IDE from SonarQube (SonarLint will preconfigure a connection, and also try to guess the right binding)