feat(mapper): add .NET mapper for C#, F#, and Visual Basic projects#49
Closed
danielmarbach wants to merge 3 commits into
Closed
feat(mapper): add .NET mapper for C#, F#, and Visual Basic projects#49danielmarbach wants to merge 3 commits into
danielmarbach wants to merge 3 commits into
Conversation
Supports .csproj, .fsproj, and .vbproj project discovery via .sln and .slnx solution files with standalone fallback. Maps console apps, ASP.NET Core web apps, libraries, and test suites. Detects test projects by naming convention (.Tests/.Specs suffix) and framework references (xUnit, NUnit, MSTest, TUnit). Associates test files with matching library features. Default commands: dotnet build, dotnet format --verify-no-changes (lint), dotnet format (format), dotnet test. Excludes bin/ and obj/ directories. Adds global.json and Directory.Build.props/Directory.Packages.props to config file candidates. Adds 8 test cases covering solution-based discovery, .slnx parsing, standalone projects, all three languages, web apps, and build artifact skipping.
…ions When the same project is referenced by different solution files with different relative paths (e.g. ../../generator/Foo.csproj vs generator/Foo.csproj), the Set dedup did not catch them because the path strings differed. This produced duplicate features with different entrypoints (e.g. CommandLineParser.cs vs Program.cs). Add resolveRelativePath() to normalize .. and . segments in project paths parsed from .sln and .slnx files, so the Set correctly dedupes by canonical path. Reduces aws-sdk-net seeds from 7725 to 1806 with zero duplicate features.
c564037 to
4e8f535
Compare
Contributor
Author
|
Potential duplicate of #58 Happy to close mine. Like I mentioned it's just code. |
Contributor
|
Thanks @danielmarbach. Closing this as superseded by #58, which landed the .NET mapper work and credits your ideas in the changelog. I also landed follow-up hardening in 709f6b5: NuGet.config is excluded from review context, solution validation rejects stale/out-of-root project entries, and .slnx commented project entries are ignored. Verified with live CLI fixtures and codex-review clean. |
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.
.NET mapper for C#, F#, and Visual Basic
What it does
Adds a deterministic
.NETmapper that discovers projects via.slnand.slnxsolution files (with standalone fallback when no solution exists) and maps them as reviewable feature slices.Language support: C# (
.csproj), F# (.fsproj), Visual Basic (.vbproj)Feature types:
dotnet-console) —OutputType=Exedotnet-web) —Sdk=Microsoft.NET.Sdk.Webdotnet-library) —OutputType=Librarydotnet-test) — detected by naming convention (.Tests/.Specssuffix) or framework packages (xUnit, NUnit, MSTest, TUnit)Default commands:
dotnet builddotnet format --verify-no-changesdotnet formatdotnet testImplementation
src/mappers/dotnet.ts— new mapper: solution parsing (.sln+.slnx), project file XML parsing, source file discovery, test association by name matching,bin//obj/exclusionsrc/detect.ts— language detection (csharp,fsharp,visual-basic), package manager detection (dotnet), default commandssrc/mapper.ts— registers the mappersrc/mappers/config.ts— addsglobal.json,Directory.Build.props,Directory.Packages.propsas config candidatesdocs/feature-mapping.md— documents .NET mapping supportVerified against real-world repositories
.slnx.sln.slnx.sln.sln/.slnx.slnQuality audit performed across all repos:
bin//obj/path leaks in owned files, context files, tests, or entrypointsresolveRelativePath()normalizes..segments).slnxparsing, standalone projects, all three languages, web apps, and build artifact skippingTest plan
pnpm typecheck— cleanpnpm lint— zero warnings/errorspnpm format:check— cleanpnpm test— 440 passed, 1 skippedpnpm build— clean