From 0411489c0b213a053844d27d6d68d62fcd9bd68e Mon Sep 17 00:00:00 2001 From: Mathieu Gamache Date: Tue, 17 Dec 2024 11:19:49 -0500 Subject: [PATCH 1/3] Update ci.yml --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbf94bc..77c9ca7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,11 @@ on: branches: - "renovate/**" +# Prevent duplicate runs if Renovate falls back to creating a PR +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + cancel-in-progress: true + jobs: main: runs-on: ubuntu-latest From 6f130efa00921a036b0cdb69c3f9cab872b9ed1a Mon Sep 17 00:00:00 2001 From: Mathieu Gamache Date: Tue, 17 Dec 2024 17:46:22 -0500 Subject: [PATCH 2/3] Fix build --- Build.ps1 | 2 +- ...crosoft.CodeAnalysis.CSharp.CodeStyle.editorconfig | 7 ++++++- .../ConfigurationFilesGenerator.csproj | 11 ++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Build.ps1 b/Build.ps1 index 23b4020..27802f2 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -37,7 +37,7 @@ Process { Exec { & dotnet test --configuration Release --logger "console;verbosity=detailed" } # Push to a NuGet feed if the environment variables are set - if (($null -ne $env:NUGET_SOURCE ) -and ($null -ne $env:NUGET_API_KEY)) { + if (($null -ne $env:NUGET_SOURCE) -and ($null -ne $env:NUGET_API_KEY)) { Exec { & dotnet nuget push "$nupkgsPath" -s $env:NUGET_SOURCE -k $env:NUGET_API_KEY --skip-duplicate } } } diff --git a/src/files/analyzers/Analyzer.Microsoft.CodeAnalysis.CSharp.CodeStyle.editorconfig b/src/files/analyzers/Analyzer.Microsoft.CodeAnalysis.CSharp.CodeStyle.editorconfig index c4990ab..aa3c270 100644 --- a/src/files/analyzers/Analyzer.Microsoft.CodeAnalysis.CSharp.CodeStyle.editorconfig +++ b/src/files/analyzers/Analyzer.Microsoft.CodeAnalysis.CSharp.CodeStyle.editorconfig @@ -510,6 +510,11 @@ dotnet_diagnostic.IDE0305.severity = suggestion # Enabled: True, Severity: silent dotnet_diagnostic.IDE0320.severity = silent +# IDE0330: Use 'System.Threading.Lock' +# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0330 +# Enabled: True, Severity: silent +dotnet_diagnostic.IDE0330.severity = suggestion + # IDE1005: Delegate invocation can be simplified. # Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide1005 # Enabled: True, Severity: silent @@ -555,7 +560,7 @@ dotnet_diagnostic.IDE2005.severity = warning # Enabled: True, Severity: silent dotnet_diagnostic.IDE2006.severity = warning -# RemoveUnnecessaryImportsFixable: +# RemoveUnnecessaryImportsFixable: # Enabled: True, Severity: silent dotnet_diagnostic.RemoveUnnecessaryImportsFixable.severity = silent diff --git a/tools/ConfigurationFilesGenerator/ConfigurationFilesGenerator.csproj b/tools/ConfigurationFilesGenerator/ConfigurationFilesGenerator.csproj index 177774c..21c0afe 100644 --- a/tools/ConfigurationFilesGenerator/ConfigurationFilesGenerator.csproj +++ b/tools/ConfigurationFilesGenerator/ConfigurationFilesGenerator.csproj @@ -2,17 +2,18 @@ Exe - net8.0 + net9.0 enable enable - - - - + + + + + From 6929764dff7f97cd2a65aba5736a1d4a23aead21 Mon Sep 17 00:00:00 2001 From: Mathieu Gamache Date: Tue, 17 Dec 2024 17:51:46 -0500 Subject: [PATCH 3/3] Trim title --- tools/ConfigurationFilesGenerator/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ConfigurationFilesGenerator/Program.cs b/tools/ConfigurationFilesGenerator/Program.cs index c922290..02d5174 100644 --- a/tools/ConfigurationFilesGenerator/Program.cs +++ b/tools/ConfigurationFilesGenerator/Program.cs @@ -73,7 +73,7 @@ await Parallel.ForEachAsync(packages, async (item, cancellationToken) => var currentRuleConfiguration = currentConfiguration.Rules.FirstOrDefault(r => r.Id == rule.Id); var severity = currentRuleConfiguration != null ? currentRuleConfiguration.Severity : rule.DefaultEffectiveSeverity; - sb.AppendLine($"# {rule.Id}: {rule.Title?.TrimEnd()}"); + sb.AppendLine($"# {rule.Id}: {rule.Title?.TrimEnd()}".TrimEnd()); if (!string.IsNullOrEmpty(rule.Url)) { sb.AppendLine($"# Help link: {rule.Url?.TrimEnd()}");