complexity-guard 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +7 -2
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -53,12 +53,15 @@ Top Halstead volume hotspots:
53
53
  - **Cognitive Complexity**: SonarSource-based metric with nesting depth penalties — measures understandability
54
54
  - **Halstead Metrics**: Information-theoretic vocabulary density, volume, difficulty, effort, and estimated bugs
55
55
  - **Structural Metrics**: Function length, parameter count, nesting depth, file length, and export count
56
+ - **Duplication Detection**: Rabin-Karp rolling hash detects Type 1 and Type 2 code clones across files — enable with `--duplication`
56
57
  - **Composite Health Score**: Single 0–100 score combining all metric families with configurable weights — enforce in CI with `--fail-health-below`
57
- - **Console + JSON + SARIF Output**: Human-readable terminal display, machine-readable JSON, and SARIF 2.1.0 for GitHub Code Scanning inline complexity annotations on PR diffs
58
- - **Configurable Thresholds**: Warning and error levels for all four metric families, customizable per project
58
+ - **Console + JSON + SARIF + HTML Output**: Human-readable terminal display, machine-readable JSON, SARIF 2.1.0 for GitHub Code Scanning, and self-contained HTML reports with interactive dashboard, treemap visualization, and sortable metric tables
59
+ - **Multi-threaded Parallel Analysis**: Analyzes files concurrently across all CPU cores by default 1.5–3.1x faster than FTA; use `--threads N` to control thread count
60
+ - **Configurable Thresholds**: Warning and error levels for all metric families, customizable per project
59
61
  - **Selective Metrics**: Use `--metrics cyclomatic,halstead` to compute only specific families
60
62
  - **Zero Config**: Works out of the box with sensible defaults, optional `.complexityguard.json` for customization
61
63
  - **Single Binary**: No runtime dependencies, runs offline, fast startup
64
+ - **Low Memory Footprint**: 1.2–2.2x less memory than Node.js-based tools on small and medium projects
62
65
  - **Error-Tolerant Parsing**: Tree-sitter based parser handles syntax errors gracefully, continues analysis on remaining files
63
66
 
64
67
  ## Configuration
@@ -94,6 +97,8 @@ Create a `.complexityguard.json` file in your project root to customize behavior
94
97
  - [GitHub](https://github.com/benvds/complexity-guard)
95
98
  - [Documentation](https://github.com/benvds/complexity-guard#documentation)
96
99
  - [SARIF Output / GitHub Code Scanning](https://github.com/benvds/complexity-guard/blob/main/docs/sarif-output.md)
100
+ - [HTML Reports](https://github.com/benvds/complexity-guard/blob/main/docs/examples.md#html-reports)
101
+ - [Performance Benchmarks](https://github.com/benvds/complexity-guard/blob/main/docs/benchmarks.md)
97
102
 
98
103
  ## License
99
104
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Ben van de Sande",
5
5
  "email": "info@getlean.digital"
6
6
  },
7
- "version": "0.5.0",
7
+ "version": "0.7.0",
8
8
  "description": "Fast complexity analysis for TypeScript/JavaScript — single static binary",
9
9
  "bin": {
10
10
  "complexity-guard": "bin/complexity-guard.js"
@@ -13,11 +13,11 @@
13
13
  "bin/"
14
14
  ],
15
15
  "optionalDependencies": {
16
- "@complexity-guard/darwin-arm64": "0.5.0",
17
- "@complexity-guard/darwin-x64": "0.5.0",
18
- "@complexity-guard/linux-arm64": "0.5.0",
19
- "@complexity-guard/linux-x64": "0.5.0",
20
- "@complexity-guard/windows-x64": "0.5.0"
16
+ "@complexity-guard/darwin-arm64": "0.7.0",
17
+ "@complexity-guard/darwin-x64": "0.7.0",
18
+ "@complexity-guard/linux-arm64": "0.7.0",
19
+ "@complexity-guard/linux-x64": "0.7.0",
20
+ "@complexity-guard/windows-x64": "0.7.0"
21
21
  },
22
22
  "license": "MIT",
23
23
  "repository": {