JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8139
  • Score
    100M100P100Q128241F
  • License MIT

Measure projects complexity based on files sloc and commit count.

Package Exports

  • code-complexity

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (code-complexity) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

code-complexity

Measure projects complexity based on files sloc and commit count.

Build Status Coverage Status Style Status NPM Version

Usage

$ npx code-complexity <path-to-git-directory>

Help

  Usage: code-complexity <dir>

  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>
    -h, --help             output usage information

  Examples:

    $ code-complexity /path/to/git/directory
    $ code-complexity /path/to/git/directory --limit 3
    $ code-complexity /path/to/git/directory --details
    $ code-complexity /path/to/git/directory --min 10 --max 50

Output

$ npx code-complexity . --details

src/code-complexity.js 53 (commits: 1, sloc: 53)
src/cli.js 16 (commits: 1, sloc: 16)

Troubleshooting

  • Error: stdout maxBuffer exceeded: use the flag --since to limit the number of commits to analyze.