Skip to content

Escalate repo-enforced code style diagnostics to warning - #1816

Open
josefpihrt wants to merge 6 commits into
mainfrom
escalate-repo-style-to-warning
Open

Escalate repo-enforced code style diagnostics to warning#1816
josefpihrt wants to merge 6 commits into
mainfrom
escalate-repo-style-to-warning

Conversation

@josefpihrt

@josefpihrt josefpihrt commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Escalate listed RCS rules in .editorconfig from suggestion to warning, and set csharp_style_namespace_declarations to warning, so style issues fail local/CI builds under TreatWarningsAsErrors.
  • Explicitly set enabled-by-default product Info analyzers to warning in .editorconfig (except RCS1163, RCS1213, RCS9001, left at suggestion for multi-Roslyn TFM / #if debt).
  • Change dotnet format in CI and agent skills from --severity info to --severity warn.
  • Small fallout fixes: ConfigureAwait(false) on roslyn3.8 path; explicit SHA256 type under NETFRAMEWORK.

Test plan

  • cd src && dotnet build Roslynator.sln with TreatWarningsAsErrors=true
  • cd src && dotnet format Roslynator.sln --no-restore --verify-no-changes --severity warn
  • Package jobs (roslyn3.8 / roslyn4.7) with TreatWarningsAsErrors
  • Confirm PR CI is green after latest commit

Josef Pihrt and others added 6 commits August 15, 2026 12:30
Make listed RCS rules and CI format checks fail at warning severity so contributors see style issues during local builds under TreatWarningsAsErrors.

Co-authored-by: Cursor <cursoragent@cursor.com>
Local dotnet format and CI disagree on indentation around #endif for ROSLYN_* defines; keep the layout CI expects.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep RCS9001 at suggestion (existing pattern-matching debt) and add ConfigureAwait(false) in the roslyn3.8 path of RawStringLiteralCodeFixProvider.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use an explicit SHA256 type under NETFRAMEWORK so TreatWarningsAsErrors succeeds on Windows framework CLI builds.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add explicit warning entries for product-default Info rules that were still at suggestion, so TreatWarningsAsErrors and format --severity warn enforce them. Leave RCS1163, RCS1213, and RCS9001 at suggestion due to multi-Roslyn TFM / #if debt.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant