Configure sonarlint rules


I would like to know if it is possible to add rules to SonarLint. If yes, can you send me the information? I would like you to mark the properties that do not have references, to have a cleaner code.


Hi and welcome to our community,

I guess you are talking about Java properties file right? SonarLint is not able to analyze .properties as of today. You can open a feature request in the appropriate category.


No, I’m talking about C # properties that are not referenced in the code, but the public property is created. It would be like error S1144 (private properties not used), but for public properties

You can write you own rules using the Roslyn framework from Microsoft. There is a lot of documentation on the web on how to do this e.g. the official MS docs. FYI our C# and VB rules are written as Roslyn analyzers.

If you use the Scanner for MSBuild to analyze your code then issues reported by your custom analysis rule will be pushed to SonarQube/SonarCloud as described here