0

I am not using SonarQube local server, or SonarCloud, or SonarLint. I instead just reference the SonarAnalyzer.CSharp nuget package directly in each of my .NET Core projects and configure the rule severity using .editorconfig (more info)

How can I configure the license header format with this setup? By just setting the severity to 'error', the analyzer expects to see the default SQ license header.

Aaron Hoffman
  • 6,604
  • 8
  • 56
  • 61

2 Answers2

1

SonarAnalyzer.CSharp doesn't currently support setting custom rule parameters in the .editorconfig file.

You need to create a separate SonarLint.xml file in the correct format and reference it as an AdditionalFile. See this answer for more info.

duncanp
  • 1,572
  • 1
  • 10
  • 8
1

Check StyleCopAnalyzers for adding copyright and license headers when using .editorconfig

dotnet_diagnostic.SA1633.severity=warning

p__b_o
  • 41
  • 1
  • 7