Add own custum rules and change exiting rule in Sonarlint for Eclipse

Hi All,

I’m new in Sonarlint and currently exploring the feasibility to use it for my project, I have the following two basic queries:

  1. Can one change the existing rules? For example, rule S138 is “Method should not have too many lines”. Can I change the default threshold limit based on the project requirement?
  2. Can one add a custom rule in Sonarlint?

Please help.

Thanks in advance!


Both use cases are supported through connected mode with SonarQube or SonarCloud.

  1. You won’t be able to configure the threshold in SonarLint; however if you have a SonarQube instance, you can define a custom quality profile with a custom threshold (and share it with your team)
  2. You can develop custom rules in a SonarQube plugin, and benefit from it in connected mode