Skip to content

Sync .editorconfig: relax RS0030 to none in tests and benchmarks#95

Merged
Chris-Wolfgang merged 1 commit into
mainfrom
chore/sync-editorconfig-rs0030-none-in-tests-and-benchmarks
May 1, 2026
Merged

Sync .editorconfig: relax RS0030 to none in tests and benchmarks#95
Chris-Wolfgang merged 1 commit into
mainfrom
chore/sync-editorconfig-rs0030-none-in-tests-and-benchmarks

Conversation

@Chris-Wolfgang
Copy link
Copy Markdown
Owner

@Chris-Wolfgang Chris-Wolfgang commented May 1, 2026

Summary

Picks up the canonical change from repo-template#329:

  • [tests/**/*.cs]: dotnet_diagnostic.RS0030.severity changed from warning to none.
  • [benchmarks/**/*.cs]: same change.

Why

The prior severity = warning was meant to "warn but allow" the banned API analyzer in test/benchmark code, but Release builds enable TreatWarningsAsErrors which promoted it back to error — defeating the relaxation entirely. Setting to none matches the existing pattern for every other relaxed rule in those folders.

Surfaced when #94's code-fix branch began enforcing the rule on test code using DateTime.Now (ResultOfTTests.cs) and Task.Wait() (RunAsyncActionTests.cs) — both legitimate test patterns.

Why split

.editorconfig is a protected file. Splitting it out of #94 keeps that PR focused on code changes and lets this canonical-sync land cleanly under its own review.

Expected CI behavior

PR Checks v3 (Gated)Detect protected configuration file changes will fail by design. The pr.yaml workflow intentionally gates .editorconfig changes via that step (Dependabot-exempt). This PR cannot pass automated CI as-is.

Merge path: maintainer manual review + admin merge (or temporary ruleset bypass), after locally verifying the diff matches canonical / repo-template#329.

Test plan

  • .editorconfig content matches canonical's .editorconfig byte-for-byte (verified locally with diff)
  • Maintainer reviews the diff against repo-template#329
  • Admin merge (CI failure on protected-files guard is expected)

…nonical

Picks up the canonical change from repo-template#329:
- [tests/**/*.cs]: RS0030.severity changed from warning to none.
- [benchmarks/**/*.cs]: same change.

The prior 'severity = warning' was meant to "warn but allow" the
banned API analyzer in test/benchmark code, but Release builds
enable TreatWarningsAsErrors which promoted it back to error —
defeating the relaxation entirely. Setting to 'none' matches the
existing pattern for every other relaxed rule in those folders.

Surfaced when [#94]'s code-fix branch began enforcing the rule on
test code that uses DateTime.Now and Task.Wait() — both legitimate
test patterns.

This change is split out of #94 because .editorconfig is a protected
file and benefits from a focused, isolated review.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 1, 2026 01:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Syncs this repo’s canonical .editorconfig to fully disable RS0030 (Banned API Analyzer) for test and benchmark code, avoiding TreatWarningsAsErrors in Release builds re-promoting the rule to an error.

Changes:

  • Set dotnet_diagnostic.RS0030.severity = none for [tests/**/*.cs].
  • Set dotnet_diagnostic.RS0030.severity = none for [benchmarks/**/*.cs].
  • Updated the related inline comments to match the intended “allow” behavior.

Comment thread .editorconfig
Comment thread .editorconfig
@Chris-Wolfgang Chris-Wolfgang merged commit 1fc0308 into main May 1, 2026
10 of 12 checks passed
@Chris-Wolfgang Chris-Wolfgang deleted the chore/sync-editorconfig-rs0030-none-in-tests-and-benchmarks branch May 1, 2026 23:57
Sign up for free to 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.

2 participants