How to configure rules like S138: Functions should not have too many lines of code in .editorconfig?

I’m using SonarAnalyzer.Csharp as a Nuget Package and I want to configure the rules that should apply to my team through an .editorconfig file.
It is easy to set the severity of the rules, but how can I change parameters, like the lines of code for S138?

Hi @wertzui,

this can be customized in SonarQube/SonarCloud but .editorconfig is not supported for now. We are considering doing this but, as of now, it is only an idea.

If using SonarQube is not possible you could try to use SonarLint.xml for configuring this:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.