diff --git a/.github/workflows/test-analysis-failure.yml b/.github/workflows/test-analysis-failure.yml index 2264d26..9377c56 100644 --- a/.github/workflows/test-analysis-failure.yml +++ b/.github/workflows/test-analysis-failure.yml @@ -12,7 +12,7 @@ jobs: name: Test Analysis Failure - NuGet PackageReference uses: Lombiq/GitHub-Actions/.github/workflows/test-analysis-failure.yml@dev with: - machine-types: "['ubuntu-24.04', 'windows-2022']" + machine-types: '["ubuntu-24.04", "windows-2022"]' build-directory: TestSolutions/Lombiq.Analyzers.PackageReference timeout-minutes: 30 build-expected-code-analysis-errors: | @@ -25,7 +25,7 @@ jobs: name: Test Analysis Failure - Local ProjectReference uses: Lombiq/GitHub-Actions/.github/workflows/test-analysis-failure.yml@dev with: - machine-types: "['ubuntu-24.04', 'windows-2022']" + machine-types: '["ubuntu-24.04", "windows-2022"]' build-directory: TestSolutions/Lombiq.Analyzers.ProjectReference timeout-minutes: 30 build-expected-code-analysis-errors: | diff --git a/Lombiq.Analyzers.NetFx/Build.props b/Lombiq.Analyzers.NetFx/Build.props index 27bf9c3..63b2064 100644 --- a/Lombiq.Analyzers.NetFx/Build.props +++ b/Lombiq.Analyzers.NetFx/Build.props @@ -46,7 +46,7 @@ 'C:\Users\runneradmin\.nuget\packages\microsoft.codeanalysis.csharp.codestyle\4.7.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll' #spell-check-ignore-line references version '4.7.0.0' of the compiler, which is newer than the currently running version '4.6.0.0'." kind. --> - + all runtime; build; native; contentfiles; analyzers; diff --git a/Lombiq.Analyzers/AnalyzerPackages.props b/Lombiq.Analyzers/AnalyzerPackages.props index 11d3374..4bf21d2 100644 --- a/Lombiq.Analyzers/AnalyzerPackages.props +++ b/Lombiq.Analyzers/AnalyzerPackages.props @@ -6,10 +6,10 @@ - + - + diff --git a/Lombiq.Analyzers/Lombiq.Analyzers.globalconfig b/Lombiq.Analyzers/Lombiq.Analyzers.globalconfig index 05643f6..0a3a3a4 100644 --- a/Lombiq.Analyzers/Lombiq.Analyzers.globalconfig +++ b/Lombiq.Analyzers/Lombiq.Analyzers.globalconfig @@ -546,6 +546,8 @@ dotnet_diagnostic.MA0111.severity = none dotnet_diagnostic.MA0120.severity = warning dotnet_diagnostic.MA0121.severity = warning dotnet_diagnostic.MA0122.severity = warning +dotnet_diagnostic.MA0165.severity = silent + # SonarAnalyzer.CSharp rules dotnet_diagnostic.S100.severity = warning @@ -579,6 +581,8 @@ dotnet_diagnostic.S2148.severity = warning dotnet_diagnostic.S2197.severity = warning dotnet_diagnostic.S2278.severity = warning dotnet_diagnostic.S2302.severity = warning +# Covered by CA1822. +dotnet_diagnostic.S2325.severity = none dotnet_diagnostic.S2330.severity = warning dotnet_diagnostic.S2333.severity = warning dotnet_diagnostic.S2342.severity = warning diff --git a/TestSolutions/Lombiq.Analyzers.PackageReference/Lombiq.Analyzers.PackageReference.csproj b/TestSolutions/Lombiq.Analyzers.PackageReference/Lombiq.Analyzers.PackageReference.csproj index 9dc9242..c270d16 100644 --- a/TestSolutions/Lombiq.Analyzers.PackageReference/Lombiq.Analyzers.PackageReference.csproj +++ b/TestSolutions/Lombiq.Analyzers.PackageReference/Lombiq.Analyzers.PackageReference.csproj @@ -5,7 +5,7 @@ - + all diff --git a/renovate.json5 b/renovate.json5 index 3a02705..08944b4 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -10,14 +10,25 @@ // The capture group names are required as such. '' ], - 'datasourceTemplate': 'nuget', + 'datasourceTemplate': 'nuget', // #spell-check-ignore-line 'versioningTemplate': 'nuget' }, ], - 'packageRules': [ + packageRules: [ { - 'groupName': 'All packages', - 'matchUpdateTypes': ['*'], + // Microsoft.CodeAnalysis.CSharp.CodeStyle references Roslyn, and if its version is higher than that of the + // locally installed SDK, it'll emit a "CSC : error CS9057: The analyzer assembly + // '/home/runner/.nuget/packages/microsoft.codeanalysis.csharp.codestyle/4.11.0/analyzers/dotnet/cs/Microsoft.CodeAnalysis.CSharp.CodeStyle.dll' + // references version '4.31.0.0' of the compiler, which is newer than the currently running version + // '4.10.0.0'." error. So, we need to update it manually together with the SDK (and targeted .NET version). + matchPackageNames: [ + 'Microsoft.CodeAnalysis.CSharp.CodeStyle', + ], + enabled: false, + }, + { + groupName: 'All packages', + matchUpdateTypes: ['*'], }, ], }