VSCode SonarLint - Allow Rules To Be Enabled/Disabled In Project Settings

The SonarLint VSCode plugin only allows rules to be turned on/off on a per user basis. It would be really useful if the rules could be enabled/disabled in project settings so that each user doesn’t haven’t to enable/disable the rules themselves.

Hello @IanAshleyEckoh, welcome to the SonarSource community and thanks for sharing your expectations!
You are right, we don’t support rule settings at project / workspace level yet; to be transparent, it is not part of our short term roadmap. On the other hand, if you use SonarQube or SonarCloud to analyze your project, you can easily share the same quality profile (= enabled / disables rules) across all your project contributors, plus a few other settings, by using SonarLint in connected mode. Les us know whether this is an option for you :wink:

Thanks @Marco_Comi for the reply,

Alas, was have no intention of using SonarCube/Cloud.

Cheers,
Ian

Thanks for letting me know @IanAshleyEckoh, I take a note of your need for our next prioritisation decisions.

I get the following when attempting to add sonarlint.rules to my vscode workspace file.

Screenshot 2021-08-31 122140

One of my reasons for wanting to use this plugin was to help with consistency among the growing team especially among new members. Without the ability to modify rules on/off or customize parameters it gets painful to try to keep the team members vscode user settings in sync as those can’t be placed inside source control. If we were allowed to put sonarlint.rules in the workspace file we could add it to source control and keep the team in sync very easily.

Is this going to be a supported feature in the future? Or perhaps is there an alternative way to custom the rules that may fit my use case?

Hi @jarslanian, thanks for sharing your need - I moved it here as it is very similar to what requested already in this thread. As explained above, the currently supported way to share settings (quality profiles, analysis configuration, file exclusions etc) among team members is to use SonarLint connected to SonarQube or SonarCloud.

Thank you for replying and moving me here.

I see there exists a docker setup here: https://hub.docker.com/_/sonarqube

I will take a look and see if that is something we can use or not.