Skip to content

sonar: fix mechanical issues (batch 2) - #397

Merged
MPCoreDeveloper merged 1 commit into
masterfrom
sonar/mechanical-cleanup-2
Sep 4, 2026
Merged

sonar: fix mechanical issues (batch 2)#397
MPCoreDeveloper merged 1 commit into
masterfrom
sonar/mechanical-cleanup-2

Conversation

@MPCoreDeveloper

Copy link
Copy Markdown
Owner

Second batch against the SonarCloud new-code issues:

  • S1192: repeated literals -> constants in Program.cs (engine prefixes, banners, results dir, DB password, column/param names, SQL strings) and FixedWidthBenchmark.cs (fixed-width/legacy labels).
  • S108/S2486: empty benchmark catch blocks now explain best-effort temp-dir cleanup.
  • S2589: always-true constant-count guards removed (constants are compile-time > 0).
  • S3267 (HashIndex / Table.Compaction / Table.Serialization): loops simplified with Where/Select.
  • S1117 (Storage.Append): shadowing variable renamed.

Validated: SharpCoreDB.Tests 1777/0 (rebuilt + full run); benchmark project builds.

- benchmarks: define constants for repeated literals (S1192): engine prefixes, banner lines, result dir, DB password, column/param names and SQL strings in Program.cs; fixed-width/legacy labels in FixedWidthBenchmark.cs
- benchmarks: empty catch blocks now explain best-effort temp cleanup (S108/S2486); remove always-true constant-count guards (S2589)
- HashIndex/Table.Compaction/Table.Serialization: S3267 loops simplified with Where/Select
- Storage.Append: S1117 parameter rename (handleKey)
@MPCoreDeveloper
MPCoreDeveloper merged commit 1e4f4a6 into masterSep 4, 2026
1 check passed
@MPCoreDeveloper
MPCoreDeveloper deleted the sonar/mechanical-cleanup-2 branch September 4, 2026 18:58
@sonarqubecloud

Copy link
Copy Markdown

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@MPCoreDeveloper