Skip to content

Commit

Permalink
Add linter on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
meziantou committed Apr 19, 2024
1 parent 73d1af6 commit 1e1f02d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ jobs:
env:
NUGET_SOURCE: ${{ secrets.NUGET_GSOFTDEV_FEED_URL }}
NUGET_API_KEY: ${{ secrets.GSOFT_NUGET_API_KEY }}

lint_config:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
- run: dotnet run --project=tools/ConfigurationFilesGenerator/ConfigurationFilesGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,12 @@ dotnet_diagnostic.IDE0071.severity = warning
# Enabled: True, Severity: silent
dotnet_diagnostic.IDE0072.severity = silent

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

# IDE0073: The file header does not match the required text
# IDE0073: The file header is missing or not located at the top of the file
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0073
# Enabled: True, Severity: silent
dotnet_diagnostic.IDE0073.severity = silent
Expand Down Expand Up @@ -550,7 +550,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

2 changes: 1 addition & 1 deletion tools/ConfigurationFilesGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ await Parallel.ForEachAsync(packages, async (item, cancellationToken) =>
sb.AppendLine();
}

foreach (var rule in rules.OrderBy(rule => rule.Id))
foreach (var rule in rules.OrderBy(rule => rule.Id).ThenBy(rule => rule.Title))
{
var currentRuleConfiguration = currentConfiguration.Rules.FirstOrDefault(r => r.Id == rule.Id);
var severity = currentRuleConfiguration != null ? currentRuleConfiguration.Severity : rule.DefaultEffectiveSeverity;
Expand Down

0 comments on commit 1e1f02d

Please sign in to comment.