Repository navigation
test(analyzers): add branch coverage tests for the analyzer package - #173
Merged
Merged
Conversation
Add 177 BranchCoverageTests files to E128.Analyzers.Tests. Branch coverage of the E128.Analyzers package surface rises from 72.0 to 87.2 percent. Document the nested worktree .globalconfig collision in the Lode and add a Branch Coverage Tests section to the analyzer testing note. Co-Authored-By: Claude
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.
Executive Summary
The AI SDLC Readier setup found the repository already compliant in every step but one. Branch coverage of the published
E128.Analyzerspackage was 15557 of 21601 branches (72.0 percent). This change adds tests and raises it to 18836 of 21601 (87.2 percent). That is still below the 95 percent threshold and the 100 percent target. Reachable branches remain, mostly in code fix providers.Measurement: Cobertura from all five test projects, merged with ReportGenerator, on macOS arm64 in Debug. The package surface is the sum of the
E128.AnalyzersandE128.Analyzers.CodeFixersassemblies. Whole-assembly coverage is an upper-bound proxy, not proof of coverage through the package entry points.Code Changes
tests/E128.Analyzers.Tests/*BranchCoverageTests.cs. Each file targets one analyzer, code fix provider, or helper. Each test asserts a reported diagnostic or a fix result.lode/infrastructure/agent-worktree-builds.md: records the verified cause of phantom build errors in a nested worktree. The SDK loads the.globalconfigof every ancestor directory, so a worktree under.claude/worktrees/loads two files atglobal_level = 100.lode/dotnet/analyzers/testing.md: adds a Branch Coverage Tests section.No production code, props,
nuget.config, or pipeline file changed.Tests and Tooling
scripts/check.sh --all: passed (shell lint, format, build with 0 warnings, tests).E128.Benchmarksbuilds in Release. No benchmark ran, and no benchmark export exists.Review Guide
AnalyzerTestRunner:FixedBufferFieldCodeFixProvider,SequentialRenameFixAllProvider,CaptiveDependency,ComplexityCeiling,RuntimeRegexToGenerated, andStackAllocSafety.lode/dotnet/analyzers/testing.mdsays no test does this, and about 54 existing tests do. Decide whether to enforce or relax the rule.ExecuteScalarNullGuardCodeFixProvidercan throw after it rewrites an async scalar conversion.EnumIfElseChainCodeFixProviderkeeps abreakthat used to exit an enclosing loop.StringFormatToInterpolationproduces invalid code for a format string with doubled braces.SubstringLengthUnderflowAnalyzerandSemaphoreSlimReleaseAnalyzereach report a false positive in one shape.RecursiveDeleteRootAnalyzermissesdir?.Delete(true).UnvalidatedJwtIdentityAnalyzermisses a lambda that builds aClaimsIdentityfrom an authenticated outer identity.#pragma warning disableappears inside a test's source-under-test string. It adds no suppression to the repository.WarningsNotAsErrorsinDirectory.Build.propsincludes NU1900. This predates the change.Rollback
Revert the squash commit. Only test files and two Lode notes change, so no runtime behavior is affected.
🤖 Generated with Claude Code