Intellij Plugin should provide project level setting for automatic triggering

Currently there is an application-level checkbox Automatically Trigger analysis but it is not enought.
I have some projects where this should be enabled and some project where it shouldn’t.
I can’t enable it by default, because plugin pollutes .idea directory with some sonarlint files and i can’t modify .gitignore for this.
This setting should have per project tuning or just be moved to some project settings.

Hello @hurricup,

Thanks for opening this feature request, let’s see if people would be interested to have this.

Out of curiosity, why do you want to disable it for some projects ? Is it because you are facing issues with the plugin ?

As I mentioned:

I can’t enable it by default, because plugin pollutes .idea directory with some sonarlint files and i can’t modify .gitignore for this.

And uncommitted files distracting me from my work.

Also, such option would be consistent with other inspection switches, which are project-level.

Interesting, a few more questions:

  • is it a company policy to not be allowed to modify the .gitignore ? And do you know why ?
  • I suppose it means that the .idea/ folder itself is checked out in Git and not ignored ?

As you may know, SonarLint stores project settings in this folder (.idea/sonarlint.xml), so it means if you have an option to deactivate analysis at project level, it will be shared with your colleagues (since you can’t gitignore it). I don’t think it’s the right move.

The .idea/sonarlint.xml is user-specific, and .idea/sonarlint/ is a cache folder, so our recommendation is to put them in the .gitignore. Some people also gitignore the whole .idea/ folder.

I think having this option could make sense as a temporary workaround, e.g. performance problems on a project, but I don’t think that’s the right solution in your case.

  • yes and no. But it’s a pretty common practice to keep in vcs only things needed by everyone, not some specific dev or devs
  • yes. Some files are in there, like code style.

Ye, this may be tricky. From one side - you could keep this setting in the workspace file, which is just a pile of project-related volatile stuff not sure it ever being under vcs. And this way every user may configure this without sharing. From other side - you won’t be able easily to enforce sharing if you need to.