Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SonarAnalyzer.CSharp.Styling #9207

Merged
merged 1 commit into from Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion analyzers/Analyzers.targets
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- This file is included in all projects inside src and tests directories. -->
<Import Project="$(MSBuildThisFileDirectory)\StyleCopAnalyzers.targets" />
<Import Project="$(MSBuildThisFileDirectory)\StylingAnalyzers.targets" />
<Import Project="$(MSBuildThisFileDirectory)\Directory.Build.targets" />

<PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion analyzers/NuGet.Config
Expand Up @@ -36,7 +36,8 @@
<owners>protobuf-packages;Microsoft;sharwell;meirb;kzu;dotnetfoundation;castleproject;jonorossi;onovotny;fluentassertions;SteveGilham;jamesnk;commandlineparser;grpc-packages;Fody;</owners>
</repository>
<author name="SonarSource">
<certificate fingerprint="FC4D3F3F815C1B56A656F1A5D9456AF04B469267D945786057175049B15A62A0" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
<!-- Subject Name: CN=SonarSource SA, valid from 2023-10-17 -->
<certificate fingerprint="A943C46DBA193D99C1135FFE33D3337524E9B3F05B416B9314E168CD206EF427" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
</author>
</trustedSigners>
</configuration>
2 changes: 1 addition & 1 deletion analyzers/SonarAnalyzer.sln
Expand Up @@ -51,7 +51,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AnalysisConfig", "AnalysisConfig", "{E044950A-098B-4090-B4FB-8D6BD086828B}"
ProjectSection(SolutionItems) = preProject
stylecop.json = stylecop.json
StyleCopAnalyzers.targets = StyleCopAnalyzers.targets
StylingAnalyzers.targets = StylingAnalyzers.targets
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonarAnalyzer.SourceGenerators", "src\SonarAnalyzer.SourceGenerators\SonarAnalyzer.SourceGenerators.csproj", "{76D6EBB8-D2B0-41C1-8880-027EC78CB7FF}"
Expand Down
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemGroup>
<PackageReference Include="SonarAnalyzer.CSharp.Styling" Version="9.24.0.89429">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as for sonar-scanner-msbuild.
Could this be updated when running the set-version.ps1 script?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because set-version is setting the value of the next release, while this one is the latest finished release.

And I don't expect the need to update this every time, as we won't update the rules with every single release.

<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
6 changes: 6 additions & 0 deletions analyzers/src/ITs.JsonParser/packages.lock.json
Expand Up @@ -8,6 +8,12 @@
"resolved": "2.9.1",
"contentHash": "OE0sl1/sQ37bjVsPKKtwQlWDgqaxWgtme3xZz7JssWUzg5JpMIyHgCTY9MVMxOg48fJ1AgGT3tgdH5m/kQ5xhA=="
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down
6 changes: 6 additions & 0 deletions analyzers/src/RuleDescriptorGenerator/packages.lock.json
Expand Up @@ -22,6 +22,12 @@
"Microsoft.CodeAnalysis.Workspaces.Common": "[1.3.2]"
}
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down
6 changes: 6 additions & 0 deletions analyzers/src/SonarAnalyzer.CFG/packages.lock.json
Expand Up @@ -33,6 +33,12 @@
"Microsoft.NETCore.Platforms": "1.1.0"
}
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down
6 changes: 6 additions & 0 deletions analyzers/src/SonarAnalyzer.CSharp.Styling/packages.lock.json
Expand Up @@ -38,6 +38,12 @@
"Microsoft.NETCore.Platforms": "1.1.0"
}
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down
6 changes: 6 additions & 0 deletions analyzers/src/SonarAnalyzer.CSharp/packages.lock.json
Expand Up @@ -27,6 +27,12 @@
"Microsoft.NETCore.Platforms": "1.1.0"
}
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down
6 changes: 6 additions & 0 deletions analyzers/src/SonarAnalyzer.Common/packages.lock.json
Expand Up @@ -54,6 +54,12 @@
"Microsoft.NETCore.Platforms": "1.1.0"
}
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down
Expand Up @@ -20,6 +20,12 @@
"Microsoft.NETCore.Platforms": "1.1.0"
}
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down
Expand Up @@ -32,6 +32,12 @@
"resolved": "13.0.3",
"contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down
6 changes: 6 additions & 0 deletions analyzers/src/SonarAnalyzer.VisualBasic/packages.lock.json
Expand Up @@ -27,6 +27,12 @@
"Microsoft.NETCore.Platforms": "1.1.0"
}
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down
6 changes: 6 additions & 0 deletions analyzers/tests/ITs.JsonParser.Test/packages.lock.json
Expand Up @@ -45,6 +45,12 @@
"resolved": "3.1.1",
"contentHash": "3rjkGxciNHHmPW8cl1/QVIYjOpfptjmAH5JrLBw+dnMTYDoweg3I579N7OIbar3Zd3q9dfWFrCy2LEV/AmPn3A=="
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down
Expand Up @@ -30,6 +30,12 @@
"resolved": "3.1.1",
"contentHash": "3rjkGxciNHHmPW8cl1/QVIYjOpfptjmAH5JrLBw+dnMTYDoweg3I579N7OIbar3Zd3q9dfWFrCy2LEV/AmPn3A=="
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down
12 changes: 12 additions & 0 deletions analyzers/tests/SonarAnalyzer.Test/packages.lock.json
Expand Up @@ -39,6 +39,12 @@
"resolved": "3.1.1",
"contentHash": "3rjkGxciNHHmPW8cl1/QVIYjOpfptjmAH5JrLBw+dnMTYDoweg3I579N7OIbar3Zd3q9dfWFrCy2LEV/AmPn3A=="
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down Expand Up @@ -621,6 +627,12 @@
"resolved": "3.1.1",
"contentHash": "3rjkGxciNHHmPW8cl1/QVIYjOpfptjmAH5JrLBw+dnMTYDoweg3I579N7OIbar3Zd3q9dfWFrCy2LEV/AmPn3A=="
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down
Expand Up @@ -30,6 +30,12 @@
"resolved": "3.1.1",
"contentHash": "3rjkGxciNHHmPW8cl1/QVIYjOpfptjmAH5JrLBw+dnMTYDoweg3I579N7OIbar3Zd3q9dfWFrCy2LEV/AmPn3A=="
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down
12 changes: 12 additions & 0 deletions analyzers/tests/SonarAnalyzer.TestFramework/packages.lock.json
Expand Up @@ -102,6 +102,12 @@
"System.Text.Json": "7.0.3"
}
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down Expand Up @@ -637,6 +643,12 @@
"NuGet.Packaging": "6.9.1"
}
},
"SonarAnalyzer.CSharp.Styling": {
"type": "Direct",
"requested": "[9.24.0.89429, )",
"resolved": "9.24.0.89429",
"contentHash": "B4PG7b9UNPYYjHp/L3pOTW+8jLDEf+KSv5OD2BUY37PL7PKnfiM32oHNgjMrBcPCtQJxK5CsAxmP239id/66VQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
Expand Down