Repository navigation
feat(analyzers): read disabled C# tests: commented out, compiled out, attribute removed (spec 015 phase 2) - #195
Merged
adrian-xping merged 5 commits intoDec 4, 2026
Conversation
… attribute removed (spec 015 phase 2) Comment runs between members are uncommented and parsed one member at a time; outermost constant-false #if branches are parsed as class members; a method that lost its test attribute (or an MSTest class that lost [TestClass]) is attributeRemoved against the old side. Disabled tests carry name, fingerprint, span, disabled, suppressions and body only, and a disabled copy next to a live test of the same name is dropped. The attached-block walk stops at members kept from comment runs, in the facts and the identity scan alike. Spec-Runner: spec=015 phase=2 step=implement
Contributor
Author
spec-runner review, phase 2, round 1
|
…drop fingerprint diagnostics of disabled tests (spec 015 phase 2) Spec-Runner: spec=015 phase=2 step=fix-1
Contributor
Author
spec-runner review, phase 2, round 2
|
…rective is live (spec 015 phase 2) Spec-Runner: spec=015 phase=2 step=fix-2
Contributor
Author
spec-runner review, phase 2, round 3
|
…entity scan The attached-block walk passes over /// lines, so the scan must parse a commented member that ends above them, as the facts do; otherwise the live test took the commented test's fingerprint in the scan only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
spec-runner review, phase 2, round 3
|
…he identity scan The attached-block walk crosses any mix of // and /// lines, so a run ending anywhere in that block must be parsed in the scan, as in the facts; a marker between a doc comment and the test hid the commented test above them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
spec-runner review, phase 2, round 3No findings. |
adrian-xping
merged commit Dec 4, 2026
b2bd7e3
into
feat/spec-015-csharp-skip-extraction
5 checks passed
adrian-xping
deleted the
phase/spec-015-csharp-skip-extraction/2-disabled
branch
December 4, 2026 03:02
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.
Spec 015 (docs/specs/core/015-csharp-skip-extraction.md), phase 2: Disabled tests.
Implements Spec 015 phase 2 (§10, §11 disabled, §12). New
Skips/CommentFragments(comment runs, pre-filter, member-by-member parse with columns preserved),Skips/PreprocessorRegions(branch conditions, constant-false by enumeration up to 12 symbols, outermost regions),Skips/DeclarationScope(namespaces and types at a position, test methods in a fragment) andSkips/DisabledTests(compiled-out regions, attributeRemoved).CSharpTestDiscoverynow exposes per-member framework and marker reading and stops the attached-block walk at lines owned by commented-out members (the scan parses only runs ending directly above a test).CSharpTestAnalyzeranalyzes the old side first, writes disabled tests, converts MSTest tests whose class lost its marker, and drops disabled copies of live tests. Adds thecommented-out,preprocessorandattribute-removedfixtures, switches the skip fixtures and the facts golden check to analyze each pair as a change set so attributeRemoved sees the old side, and makes the facts check compare every field of every disabled test.Notes
/* */run must start its line and that//becomes two spaces (columns map back as is); §10.3 says how a region is parsed (inside a class written around it, which must end where the region does); §13's attribute-removed row moves the renamed-file and added-file cases to the unit test ARemovedAttributeNeedsTheOldTest, since a fixture folder has no pair status; §15 lists the two extra files (CommentFragments, DeclarationScope).namespaceline sets the namespace for the rest of the run (a block namespace's closing//}doesn't pop it); a comment inside an enum gets the enclosing class as scope; block comments that don't start their line are not read.//column, a commented test outside a class, a whole commented file, elif/else ruled out by earlier branches, a region starting inside a method, overloads, a class still run by a marked derived class, and the scan not attaching a commented test's marker to the live test below.Spec updated: yes
Phase row
2-disabledcommented-out,preprocessor,attribute-removedfolders; the golden check.Opened by spec-runner.