Detect Static Dependencies

Scan C# source files for hard-to-test static dependencies — DateTime.Now/UtcNow, File.*, Directory.*, Environment.*, HttpClient, Console.*, Process.*, and other untestable statics. Produces a ranked report of static call sites by frequency. USE FOR: find untestable statics, scan for static dependencies, testability audit, identify hard-to-mock code, find DateTime.Now usage, detect static coupling, testability report, static analysis for testability. DO NOT USE FOR: generating wrappers (use generate-testability-wrappers), migrating code (use migrate-static-to-wrapper), general code review, or finding statics that are already behind abstractions.

managedcode Updated

File contents

managedcode/dotnet-skills/tree/main/external-sources/upstreams/dotnet-skills/dotnet-test/skills/detect-static-dependencies commit 7d15517a9c

Frequently asked questions

npx skillmds@latest add managedcode/detect-static-dependencies-2