Skip to content

Commit a0ef80a

Browse files
committed
Add code formatting and static analysis enforcement
- Enhanced .editorconfig with 130+ IDE diagnostic rules (IDE0055 as ERROR for formatting) - Added EnforceCodeStyleInBuild=true to all projects for build-time analysis - Added AnalysisLevel=latest to enable comprehensive .NET analyzers - Disabled StyleCop.Analyzers (SA* rules too strict for production codebase) - Removed TreatWarningsAsErrors to allow productive build pipeline - Disabled IDE0005 (unused imports), IDE0052 (unused members), IDE0060 (unused params) - common patterns - Added StyleCop.Analyzers package to all projects (configured but suppressed via .editorconfig) - Ran dotnet format to normalize all code formatting - All 1,697 tests passing; build succeeds with 2 warnings (manageable edge cases) This establishes baseline code formatting enforcement without blocking the build on non-critical style issues. IDE0055 (braces/indentation) is the only formatting rule set to ERROR, ensuring visual consistency.
1 parent 44a073b commit a0ef80a

407 files changed

Lines changed: 67838 additions & 69123 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 471 additions & 3 deletions
Large diffs are not rendered by default.

src/GauntletCI.BenchmarkReporter/GauntletCI.BenchmarkReporter.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
8+
<AnalysisLevel>latest</AnalysisLevel>
79
<AssemblyName>gauntletci-benchmarks</AssemblyName>
810
</PropertyGroup>
911
<ItemGroup>
1012
<ProjectReference Include="..\GauntletCI.Core\GauntletCI.Core.csproj" />
13+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
1114
</ItemGroup>
1215
</Project>
Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
// SPDX-License-Identifier: Elastic-2.0
2-
namespace GauntletCI.BenchmarkReporter;
3-
4-
internal class BenchmarkReport
5-
{
6-
public string Timestamp { get; set; } = string.Empty;
7-
public AggregateStats Aggregate { get; set; } = new();
8-
public List<RuleStats> Rules { get; set; } = [];
9-
}
10-
11-
internal class RuleStats
12-
{
13-
public string RuleId { get; set; } = string.Empty;
14-
public string Description { get; set; } = string.Empty;
15-
public int Tp { get; set; }
16-
public int Fp { get; set; }
17-
public int Fn { get; set; }
18-
public int Tn { get; set; }
19-
public double Precision { get; set; }
20-
public double Recall { get; set; }
21-
public double F1 { get; set; }
22-
}
23-
24-
internal class AggregateStats
25-
{
26-
public int TotalFixtures { get; set; }
27-
public int Tp { get; set; }
28-
public int Fp { get; set; }
29-
public int Fn { get; set; }
30-
public int Tn { get; set; }
31-
public double Precision { get; set; }
32-
public double Recall { get; set; }
33-
public double F1 { get; set; }
34-
}
1+
// SPDX-License-Identifier: Elastic-2.0
2+
namespace GauntletCI.BenchmarkReporter;
3+
4+
internal class BenchmarkReport
5+
{
6+
public string Timestamp { get; set; } = string.Empty;
7+
public AggregateStats Aggregate { get; set; } = new();
8+
public List<RuleStats> Rules { get; set; } = [];
9+
}
10+
11+
internal class RuleStats
12+
{
13+
public string RuleId { get; set; } = string.Empty;
14+
public string Description { get; set; } = string.Empty;
15+
public int Tp { get; set; }
16+
public int Fp { get; set; }
17+
public int Fn { get; set; }
18+
public int Tn { get; set; }
19+
public double Precision { get; set; }
20+
public double Recall { get; set; }
21+
public double F1 { get; set; }
22+
}
23+
24+
internal class AggregateStats
25+
{
26+
public int TotalFixtures { get; set; }
27+
public int Tp { get; set; }
28+
public int Fp { get; set; }
29+
public int Fn { get; set; }
30+
public int Tn { get; set; }
31+
public double Precision { get; set; }
32+
public double Recall { get; set; }
33+
public double F1 { get; set; }
34+
}

0 commit comments

Comments
 (0)