1010
1111Quoting Michael Feathers (source [ here] [ michael-feathers-source ] ):
1212
13- * Often when we refactor, we look at local areas of code. If we take a wider
13+ _ Often when we refactor, we look at local areas of code. If we take a wider
1414view, using information from our version control systems, we can get a better
15- sense of the effects of our refactoring efforts.*
16-
15+ sense of the effects of our refactoring efforts._
1716
1817Note: ` code-complexity ` currently measures complexity using either:
18+
1919- lines of code count (all languages)
2020- cyclomatic complexity (JavaScript/TypeScript)
2121- halstead complexity (JavaScript/TypeScript)
@@ -43,6 +43,7 @@ $ npx code-complexity <path-to-git-directory or URL> [options]
4343 -u, --until [until] limit analysis to commits older in age than date
4444 -s, --sort [sort] sort results (allowed valued: score, churn, complexity or file)
4545 -d, --directories display values for directories instead of files
46+ -mb, --max-buffer [maxBuffer] set the max buffer size for git log (in bytes)
4647 -h, --help display help for command
4748
4849 Examples:
@@ -53,10 +54,11 @@ $ npx code-complexity <path-to-git-directory or URL> [options]
5354 $ code-complexity ../foo --sort score
5455 $ code-complexity /foo/bar --filter 'src/**,!src/front/**'
5556 $ code-complexity . --limit 10 --sort score
56- $ code-complexity . --limit 10 --directories
57+ $ code-complexity . --limit 10 --directories
5758 $ code-complexity . --limit 10 --sort score -cs halstead
5859 $ code-complexity . --since=2021-06-01 --limit 100
5960 $ code-complexity . --since=2021-04-01 --until=2021-07-01
61+ $ code-complexity . --max-buffer 64000000
6062```
6163
6264## Output
@@ -82,8 +84,8 @@ A special thanks to a few contributors that helped me make `code-complexity` bet
8284- Alexander Dormann (alexdo) for fixing the ` ENOBUFS ` (and apologies for stealing your code).
8385- Scott Brooks (scottamplitude) for initiating the work on complexity strategies
8486
85- [ michael-feathers-source ] :https://www.stickyminds.com/article/getting-empirical-about-refactoring
86- [ travis-image ] :https://img.shields.io/travis/simonrenoult/code-complexity/master.svg?style=flat-square
87+ [ michael-feathers-source ] : https://www.stickyminds.com/article/getting-empirical-about-refactoring
88+ [ travis-image ] : https://img.shields.io/travis/simonrenoult/code-complexity/master.svg?style=flat-square
8789[ travis-url ] : https://travis-ci.org/simonrenoult/code-complexity
8890[ style-image ] : https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square
8991[ style-url ] : https://prettier.io/
0 commit comments