
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
code-complexity
Advanced tools
Measure projects complexity based on files sloc and commit count.
$ npx code-complexity <path-to-git-directory>
Usage: code-complexity <dir> [options]
Measure projects complexity based on files sloc and commit count.
Options:
-l, --limit [limit] Limit the number of files to output
-d, --details Show the number of commit and computed sloc
-c, --commit Show the number of commits
-s, --sloc Show the computed sloc
-i, --since [since] Limit the age of the commit analyzed
-n, --no-first-parent Do not use the git-log flag '--first-parent' when counting commits
--sort [sort] Sort results by commit, complexity, file or sloc
--min [min] Exclude results below <min>
--max [max] Exclude results above <max>
--excludes <strings> List of strings (comma separated) used in filenames to exclude
(executed after '--includes') (default: [])
--includes <strings> List of strings (comma separated) used in filenames to include
(executed before '--excludes') (default: [])
-h, --help display help for command
Examples:
$ code-complexity <dir>
$ code-complexity <dir> --limit 3
$ code-complexity <dir> --details
$ code-complexity <dir> --min 10 --max 50
$ code-complexity <dir> --sort complexity
$ code-complexity <dir> --excludes lib,test
$ code-complexity <dir> --includes users
$ code-complexity <dir> --details --limit 10 --sort complexity --excludes test
$ npx code-complexity . --details --sort complexity --limit 10
test/code-complexity.test.ts 535 (commits: 5, sloc: 107)
src/cli.ts 402 (commits: 6, sloc: 67)
src/services/prepare-stdout.ts 348 (commits: 4, sloc: 87)
src/services/compute-complexity.ts 108 (commits: 4, sloc: 27)
src/services/count-commits-per-file.ts 83 (commits: 1, sloc: 83)
src/services/compute-complexity-per-file.ts 36 (commits: 1, sloc: 36)
.eslintrc.js 19 (commits: 1, sloc: 19)
Error: stdout maxBuffer exceeded: use the flag --since to limit the number of commits to analyze.FAQs
Measure the churn/complexity score. Higher values mean hotspots where refactorings should happen.
The npm package code-complexity receives a total of 3,724 weekly downloads. As such, code-complexity popularity was classified as popular.
We found that code-complexity demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.