dotnet-csharp-pattern-mining
Read-only mining codemod that detects .NET platform compatibility and migration code patterns in C# source. Each finding includes an autoFix classification (yes, partial, no) and a risk level. No files are written to the target repo.
Registry: private. Use the public
dotnet-migration-assessment-bundleto run all miners in one workflow.
What it does
Scans .cs files for legacy platform APIs and migration-sensitive code patterns, including:
| Pattern | Category | Risk |
|---|---|---|
BinaryFormatter | code-pattern | critical |
HttpContext.Current | code-pattern | high |
ConfigurationManager | code-pattern | medium |
Thread.Abort | code-pattern | high |
AppDomains | platform | high |
Reflection.Emit | platform | high |
System.Web usage | platform | high |
COM Interop (DllImport) | platform | high |
Registry usage | platform | high |
Windows-only APIs | platform | medium |
Reflection-heavy code | platform | medium |
WCF ServiceContract | code-pattern | high |
WebForms Page | code-pattern | critical |
EF6 DbContext | code-pattern | high |
OWIN IAppBuilder | code-pattern | high |
Web API 2 ApiController | code-pattern | high |
Metrics
| Metric | Cardinalities |
|---|---|
dotnet-csharp-pattern | pattern, category, autoFix, risk, file, line, snippet |
Run
Via bundle (recommended):
bash
Standalone (local monorepo):
bash
Testing
bash