Sync .editorconfig: relax RS0030 to none in tests and benchmarks#95
Merged
Chris-Wolfgang merged 1 commit intoMay 1, 2026
Conversation
…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>
4 tasks
Contributor
There was a problem hiding this comment.
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 = nonefor[tests/**/*.cs]. - Set
dotnet_diagnostic.RS0030.severity = nonefor[benchmarks/**/*.cs]. - Updated the related inline comments to match the intended “allow” behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Picks up the canonical change from repo-template#329:
[tests/**/*.cs]:dotnet_diagnostic.RS0030.severitychanged fromwarningtonone.[benchmarks/**/*.cs]: same change.Why
The prior
severity = warningwas meant to "warn but allow" the banned API analyzer in test/benchmark code, but Release builds enableTreatWarningsAsErrorswhich promoted it back to error — defeating the relaxation entirely. Setting tononematches 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) andTask.Wait()(RunAsyncActionTests.cs) — both legitimate test patterns.Why split
.editorconfigis 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 changeswill fail by design. The pr.yaml workflow intentionally gates.editorconfigchanges 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
.editorconfigcontent matches canonical's.editorconfigbyte-for-byte (verified locally withdiff)