Codex Review C# Cyclomatic Complexity with CA1502
Check method complexity and maintainability diagnostics against the project's severity and threshold settings.
中文Install in Codex
Use the .NET SDK, a local project with the analyzer enabled, and its rule configuration.
- Copy the pinned `.codex/skills/complexity/` directory into `.agents/skills/complexity/` in the project.
- Read `references/complexity.md`, `references/metrics.md`, and `references/config.md`, then identify the relevant rule.
Example task
Enable `CA1502` in a local demo with a branching status formatter. Run `dotnet build Demo.csproj` and report the diagnostic location.What to check
The report identifies any method exceeding the project threshold, the rule settings, and tests that cover its behavior.
Original SKILL.md on GitHub · Updated
Frequently asked question
Where does the threshold belong?
Use `.editorconfig` for diagnostic severity and `CodeMetricsConfig.txt` as an `AdditionalFiles` item for metric thresholds.