Skip to content

Commit 720cefc

Browse files
committed
Restore complexity and CRAP to dotnet-quality
1 parent c879e7a commit 720cefc

6 files changed

Lines changed: 13 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ This catalog currently contains **157** skills.
313313
| [`dotnet-analyzer-config`](catalog/Tools/Analyzer-Config/skills/dotnet-analyzer-config/) | `1.0.0` | Use a repo-root `.editorconfig` to configure free .NET analyzer and style rules. Use when a .NET repo needs rule severity, code-style options, section layout, or analyzer ownership made explicit. Nested `.editorconfig` files are allowed when they serve a clear subtree-specific purpose. |
314314
| [`dotnet-chous`](catalog/Tools/Chous/skills/dotnet-chous/) | `1.0.0` | Use Chous in .NET repositories that ship sizeable frontend codebases and want file-structure linting, naming convention enforcement, and folder-layout policy as a CLI gate. Use when the problem is frontend architecture drift in the file tree rather than semantic code issues inside the files. |
315315
| [`dotnet-code-analysis`](catalog/Tools/Code-Analysis/skills/dotnet-code-analysis/) | `1.0.1` | Use the free built-in .NET SDK analyzers and analysis levels with gradual Roslyn warning promotion. Use when a .NET repo needs first-party code analysis, `EnableNETAnalyzers`, `AnalysisLevel`, or warning-as-error policy wired into build and CI. |
316+
| [`dotnet-complexity`](catalog/Tools/Complexity/skills/dotnet-complexity/) | `1.0.0` | Use free built-in .NET maintainability analyzers and code metrics configuration to find overly complex methods and coupled code. Use when a repo needs cyclomatic complexity checks, maintainability thresholds, or complexity-driven refactoring gates. |
316317
| [`dotnet-csharpier`](catalog/Tools/CSharpier/skills/dotnet-csharpier/) | `1.0.0` | Use the open-source free `CSharpier` formatter for C# and XML. Use when a .NET repo intentionally wants one opinionated formatter instead of a highly configurable `dotnet format`-driven style model. |
317318
| [`dotnet-format`](catalog/Tools/Format/skills/dotnet-format/) | `1.0.0` | Use the free first-party `dotnet format` CLI for .NET formatting and analyzer fixes. Use when a .NET repo needs formatting commands, `--verify-no-changes` CI checks, or `.editorconfig`-driven code style enforcement. |
318319
| [`dotnet-metalint`](catalog/Tools/Metalint/skills/dotnet-metalint/) | `1.0.0` | Use Metalint in .NET repositories that ship Node-based frontend assets and want one CLI entrypoint over several underlying linters. Use when a repo wants to orchestrate ESLint, Stylelint, HTMLHint, and related frontend checks from a single checked-in `.metalint/` configuration. |
@@ -368,7 +369,6 @@ This catalog currently contains **157** skills.
368369
| [`dotnet-asynkron-profiler`](catalog/Tools/Asynkron-Profiler/skills/dotnet-asynkron-profiler/) | `1.0.0` | Use the open-source free `Asynkron.Profiler` dotnet tool for CLI-first CPU, allocation, exception, contention, and heap profiling of .NET commands or existing trace artifacts. |
369370
| [`dotnet-cloc`](catalog/Tools/cloc/skills/dotnet-cloc/) | `1.0.0` | Use the open-source free `cloc` tool for line-count, language-mix, and diff statistics in .NET repositories. Use when a repo needs C# and solution footprint metrics, branch-to-branch LOC comparison, or repeatable code-size reporting in local workflows and CI. |
370371
| [`dotnet-codeql`](catalog/Tools/CodeQL/skills/dotnet-codeql/) | `1.0.0` | Use the open-source CodeQL ecosystem for .NET security analysis. Use when a repo needs CodeQL query packs, CLI-based analysis on open source codebases, or GitHub Action setup with explicit licensing caveats for private repositories. |
371-
| [`dotnet-complexity`](catalog/Tools/Complexity/skills/dotnet-complexity/) | `1.0.0` | Use free built-in .NET maintainability analyzers and code metrics configuration to find overly complex methods and coupled code. Use when a repo needs cyclomatic complexity checks, maintainability thresholds, or complexity-driven refactoring gates. |
372372
| [`dotnet-profiling`](catalog/Tools/Profiling/skills/dotnet-profiling/) | `1.0.0` | Use the free official .NET diagnostics CLI tools for profiling and runtime investigation in .NET repositories. Use when a repo needs CPU tracing, live counters, GC and allocation investigation, exception or contention tracing, heap snapshots, or startup diagnostics without GUI-only tooling. |
373373
| [`dotnet-quickdup`](catalog/Tools/QuickDup/skills/dotnet-quickdup/) | `1.0.0` | Use the open-source free `QuickDup` clone detector for .NET repositories. Use when a repo needs duplicate C# code discovery, structural clone detection, DRY refactoring candidates, or repeatable duplication scans in local workflows and CI. |
374374
| [`dotnet-trace-collect`](catalog/Tools/Official-DotNet-Diagnostics/skills/dotnet-trace-collect/) | `0.1.0` | Guide developers through capturing diagnostic artifacts to diagnose production .NET performance issues. Use when the user needs help choosing diagnostic tools, collecting performance data, or understanding tool trade-offs across different environments (Windows/Linux, .NET Framework/modern .NET, container/non-container). |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"version": "1.0.0",
3-
"category": "Metrics"
3+
"category": "Code Quality"
44
}

cli/ManagedCode.DotnetSkills/Runtime/CatalogScanner.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ internal static class CatalogScanner
2929
new(
3030
"dotnet-quality",
3131
".NET quality bundle",
32-
"Install the core .NET quality toolchain: formatter, analyzers, editorconfig guidance, and CI quality checks. Frontend linters stay out of this bundle on purpose.",
32+
"Install the core .NET quality toolchain: formatter, analyzers, complexity checks, CRAP analysis, editorconfig guidance, and CI quality checks. Frontend linters stay out of this bundle on purpose.",
3333
"stack",
3434
".NET Quality",
3535
"Code Quality",
@@ -42,6 +42,8 @@ internal static class CatalogScanner
4242
"dotnet-stylecop-analyzers",
4343
"dotnet-analyzer-config",
4444
"dotnet-code-analysis",
45+
"dotnet-complexity",
46+
"crap-score",
4547
]),
4648
new(
4749
"frontend-quality",

scripts/catalog_index.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
{
3333
"name": "dotnet-quality",
3434
"title": ".NET quality bundle",
35-
"description": "Install the core .NET quality toolchain: formatter, analyzers, editorconfig guidance, and CI quality checks. Frontend linters stay out of this bundle on purpose.",
35+
"description": "Install the core .NET quality toolchain: formatter, analyzers, complexity checks, CRAP analysis, editorconfig guidance, and CI quality checks. Frontend linters stay out of this bundle on purpose.",
3636
"kind": "stack",
3737
"stack": ".NET Quality",
3838
"lane": "Code Quality",
@@ -45,6 +45,8 @@
4545
"dotnet-stylecop-analyzers",
4646
"dotnet-analyzer-config",
4747
"dotnet-code-analysis",
48+
"dotnet-complexity",
49+
"crap-score",
4850
],
4951
},
5052
{

tests/ManagedCode.DotnetSkills.Tests/CatalogOrganizationTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public void Load_AssignsExpectedStacksAndLanes()
3333
AssertSkill(catalog, "template-authoring", "Templates & Scaffolding", "Project & Templates");
3434
AssertSkill(catalog, "analyzing-dotnet-performance", "Diagnostics & Metrics", "Performance");
3535
AssertSkill(catalog, "dotnet-cloc", "Diagnostics & Metrics", "Observability");
36+
AssertSkill(catalog, "dotnet-complexity", ".NET Quality", "Code Quality");
3637
AssertSkill(catalog, "dotnet-codeql", "Diagnostics & Metrics", "Static Analysis");
3738
AssertSkill(catalog, "mtp-hot-reload", "Upgrades & Migration", "Testing migrations");
3839
AssertSkill(catalog, "migrate-xunit-to-xunit-v3", "Upgrades & Migration", "Testing migrations");
@@ -59,6 +60,8 @@ public void Load_ExposesFocusedBundles_WithoutMixingQualityAndMigrationFlows()
5960
Assert.Equal(".NET Quality", dotnetQuality.Stack);
6061
Assert.Equal("Code Quality", dotnetQuality.Lane);
6162
Assert.DoesNotContain(dotnetQuality.Skills, skill => string.Equals(skill, "dotnet-eslint", StringComparison.OrdinalIgnoreCase));
63+
Assert.Contains(dotnetQuality.Skills, skill => string.Equals(skill, "dotnet-complexity", StringComparison.OrdinalIgnoreCase));
64+
Assert.Contains(dotnetQuality.Skills, skill => string.Equals(skill, "crap-score", StringComparison.OrdinalIgnoreCase));
6265

6366
Assert.Equal(".NET Foundations", dotnetBase.Stack);
6467
Assert.Equal("Foundations", dotnetBase.Lane);

tests/ManagedCode.DotnetSkills.Tests/SkillInstallerTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ public void SelectSkillsFromPackages_ResolvesFocusedBundlesOnly()
7070
Assert.Contains(selected, skill => skill.Name == "dotnet-orleans");
7171
Assert.Contains(selected, skill => skill.Name == "dotnet-managedcode-orleans-graph");
7272
Assert.Contains(selected, skill => skill.Name == "dotnet-code-analysis");
73+
Assert.Contains(selected, skill => skill.Name == "dotnet-complexity");
74+
Assert.Contains(selected, skill => skill.Name == "crap-score");
7375
Assert.Contains(selected, skill => skill.Name == "dotnet-format");
7476
Assert.Equal(selected.Select(skill => skill.Name).Distinct(StringComparer.OrdinalIgnoreCase).Count(), selected.Count);
7577
}

0 commit comments

Comments
 (0)