Skip to content

v4.4.0

Latest
Compare
Choose a tag to compare
@simonrenoult simonrenoult released this 13 Nov 22:42
· 8 commits to main since this release

🦄 Analysis per directory, wow! 🦄

Make analyze available for directories in addition to files, eg npx code-complexity https://github.com/simonrenoult/code-complexity --directories.

This command will group results per directory, which is interesting in two ways:

  • complexity might be hidden behind several averagely complex files within the same module
  • it also opens new way of analyzing cohesion and coupling (for future releases).

Example of output:

$ npx code-complexity https://github.com/simonrenoult/code-complexity --directories --limit 5 --sort score

┌──────────┬────────────┬───────┬───────┐
│ file     │ complexity │ churn │ score │
├──────────┼────────────┼───────┼───────┤
│ src      │ 622        │ 58    │ 36076 │
├──────────┼────────────┼───────┼───────┤
│ test     │ 582        │ 26    │ 15132 │
├──────────┼────────────┼───────┼───────┤
│ src/lib  │ 376        │ 30    │ 11280 │
├──────────┼────────────┼───────┼───────┤
│ .idea    │ 474        │ 22    │ 10428 │
├──────────┼────────────┼───────┼───────┤
│ test/lib │ 400        │ 14    │ 5600  │
└──────────┴────────────┴───────┴───────┘