Skip to content

Commit 1e1f02d

Browse files
author
Gérald Barré
committed
Add linter on CI
1 parent 73d1af6 commit 1e1f02d

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ jobs:
2525
env:
2626
NUGET_SOURCE: ${{ secrets.NUGET_GSOFTDEV_FEED_URL }}
2727
NUGET_API_KEY: ${{ secrets.GSOFT_NUGET_API_KEY }}
28+
29+
lint_config:
30+
runs-on: windows-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Setup .NET
34+
uses: actions/setup-dotnet@v4
35+
- run: dotnet run --project=tools/ConfigurationFilesGenerator/ConfigurationFilesGenerator.csproj

src/files/analyzers/Analyzer.Microsoft.CodeAnalysis.CSharp.CodeStyle.editorconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,12 @@ dotnet_diagnostic.IDE0071.severity = warning
305305
# Enabled: True, Severity: silent
306306
dotnet_diagnostic.IDE0072.severity = silent
307307

308-
# IDE0073: The file header is missing or not located at the top of the file
308+
# IDE0073: The file header does not match the required text
309309
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0073
310310
# Enabled: True, Severity: silent
311311
dotnet_diagnostic.IDE0073.severity = silent
312312

313-
# IDE0073: The file header does not match the required text
313+
# IDE0073: The file header is missing or not located at the top of the file
314314
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0073
315315
# Enabled: True, Severity: silent
316316
dotnet_diagnostic.IDE0073.severity = silent
@@ -550,7 +550,7 @@ dotnet_diagnostic.IDE2005.severity = warning
550550
# Enabled: True, Severity: silent
551551
dotnet_diagnostic.IDE2006.severity = warning
552552

553-
# RemoveUnnecessaryImportsFixable:
553+
# RemoveUnnecessaryImportsFixable:
554554
# Enabled: True, Severity: silent
555555
dotnet_diagnostic.RemoveUnnecessaryImportsFixable.severity = silent
556556

tools/ConfigurationFilesGenerator/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ await Parallel.ForEachAsync(packages, async (item, cancellationToken) =>
6767
sb.AppendLine();
6868
}
6969

70-
foreach (var rule in rules.OrderBy(rule => rule.Id))
70+
foreach (var rule in rules.OrderBy(rule => rule.Id).ThenBy(rule => rule.Title))
7171
{
7272
var currentRuleConfiguration = currentConfiguration.Rules.FirstOrDefault(r => r.Id == rule.Id);
7373
var severity = currentRuleConfiguration != null ? currentRuleConfiguration.Severity : rule.DefaultEffectiveSeverity;

0 commit comments

Comments
 (0)