From 04495f32947a6aeffcd16edeadd9f2c4e53e438e Mon Sep 17 00:00:00 2001 From: Cristian Ambrosini <114916336+cristian-ambrosini-sonarsource@users.noreply.github.com> Date: Wed, 15 Mar 2023 11:49:48 +0100 Subject: [PATCH] Fix SL feature branch ITs (#6927) --- .../SonarLintExclusions--net7.0-S1451.json | 17 +++++++++++ .../sources/AnalyzeGenerated.CS/SonarLint.xml | 30 +++++++++++++++++++ .../sources/SkipGenerated.CS/SonarLint.xml | 30 +++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 analyzers/its/expected/SonarLintExclusions/SonarLintExclusions--net7.0-S1451.json create mode 100644 analyzers/its/sources/AnalyzeGenerated.CS/SonarLint.xml create mode 100644 analyzers/its/sources/SkipGenerated.CS/SonarLint.xml diff --git a/analyzers/its/expected/SonarLintExclusions/SonarLintExclusions--net7.0-S1451.json b/analyzers/its/expected/SonarLintExclusions/SonarLintExclusions--net7.0-S1451.json new file mode 100644 index 00000000000..d4028681cc7 --- /dev/null +++ b/analyzers/its/expected/SonarLintExclusions/SonarLintExclusions--net7.0-S1451.json @@ -0,0 +1,17 @@ +{ +"issues": [ +{ +"id": "S1451", +"message": "Add or update the header of this file.", +"location": { +"uri": "sources\SonarLintExclusions\SonarLintExclusions\Included\Included.cs", +"region": { +"startLine": 1, +"startColumn": 1, +"endLine": 1, +"endColumn": 1 +} +} +} +] +} diff --git a/analyzers/its/sources/AnalyzeGenerated.CS/SonarLint.xml b/analyzers/its/sources/AnalyzeGenerated.CS/SonarLint.xml new file mode 100644 index 00000000000..637fabc2996 --- /dev/null +++ b/analyzers/its/sources/AnalyzeGenerated.CS/SonarLint.xml @@ -0,0 +1,30 @@ + + + + + sonar.cs.ignoreHeaderComments + true + + + sonar.cs.analyzeGeneratedCode + true + + + sonar.cs.file.suffixes + .cs + + + + + S1067 + + + max + 1 + + + + + + + \ No newline at end of file diff --git a/analyzers/its/sources/SkipGenerated.CS/SonarLint.xml b/analyzers/its/sources/SkipGenerated.CS/SonarLint.xml new file mode 100644 index 00000000000..b11b39f3e3c --- /dev/null +++ b/analyzers/its/sources/SkipGenerated.CS/SonarLint.xml @@ -0,0 +1,30 @@ + + + + + sonar.cs.ignoreHeaderComments + true + + + sonar.cs.analyzeGeneratedCode + false + + + sonar.cs.file.suffixes + .cs + + + + + S1067 + + + max + 1 + + + + + + + \ No newline at end of file