Skip to content

style(tests): remove code regions from Scope tests - #441

Merged
samtrion merged 1 commit into
mainfrom
style/stryker-region-violates-no-code-regions-adr-1
Oct 29, 2026
Merged

samtrion merged 1 commit into
mainfrom
style/stryker-region-violates-no-code-regions-adr-1

Conversation

@samtrion

@samtrion samtrion commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem

decisions/2026-01-21-no-code-regions.md (state: accepted, applyTo **/*.cs) says code regions MUST NOT be used. tests/NetEvolve.CodeBuilder.Tests.Unit/CSharpCodeBuilderTests.Scope.cs still has two region pairs (#region at lines 7 and 143, #endregion at lines 141 and 436), i.e. 4 directives. No other #region exists in src or tests.

Root cause

The file was never cleaned up after the ADR was accepted.

Change

Delete the four directives and the blank lines around them. No other edit; UTF-8 BOM kept.

Before / After

Metric before after
#region / #endregion directives 4 (in 1 file) 0
Unit tests (local, net9.0 + net10.0) 1185 passed 1185 passed
Mutation score 91.94 % 91.94 % (run)

Risk / what this does not change

Hygiene only. Test code is not mutated, so no improvement of the mutation baseline is expected; the mutation run is only a sanity check that nothing changed.

decisions/2026-01-21-no-code-regions.md (accepted, applyTo **/*.cs) forbids code regions. CSharpCodeBuilderTests.Scope.cs still contained two #region/#endregion pairs. Remove the four directives; no behavior change.
@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.76%. Comparing base (0caae59) to head (dc50f75).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #441   +/-   ##
=======================================
  Coverage   91.76%   91.76%           
=======================================
  Files          15       15           
  Lines         340      340           
  Branches      100      100           
=======================================
  Hits          312      312           
  Misses         17       17           
  Partials       11       11           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samtrion
samtrion merged commit fdfd809 into main Oct 29, 2026
13 checks passed
@samtrion
samtrion deleted the style/stryker-region-violates-no-code-regions-adr-1 branch October 29, 2026 15:05
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