|
8 | 8 |
|
9 | 9 | Quoting Michael Feathers (source [here][michael-feathers-source]): |
10 | 10 |
|
11 | | -*Often when we refactor, we look at local areas of code. If we take a wider |
| 11 | +_Often when we refactor, we look at local areas of code. If we take a wider |
12 | 12 | view, using information from our version control systems, we can get a better |
13 | | -sense of the effects of our refactoring efforts.* |
| 13 | +sense of the effects of our refactoring efforts._ |
14 | 14 |
|
15 | 15 | Note: `code-complexity` currently measures complexity using either: |
| 16 | + |
16 | 17 | - lines of code count (for most languages) |
17 | 18 | - cyclomatic complexity (JavaScript/TypeScript) |
18 | 19 | - halstead complexity (JavaScript/TypeScript) |
@@ -59,12 +60,13 @@ $ code-complexity . --max-buffer 64000000 |
59 | 60 | ## Which strategy should you choose? |
60 | 61 |
|
61 | 62 | Currently, `code-complexity` supports three strategies: |
| 63 | + |
62 | 64 | - `sloc` |
63 | 65 | - `cyclomatic` (JavaScript/TypeScript only) |
64 | 66 | - `halstead` (JavaScript/TypeScript only) |
65 | 67 |
|
66 | 68 | `sloc` is the default strategy since it works on pretty much any language. |
67 | | -It's a basic source code line count. One could think that it's not super helpful, but I have found that length is a |
| 69 | +It's a basic source code line count. One could think that it's not super helpful, but I have found that length is a |
68 | 70 | decent starting point. |
69 | 71 |
|
70 | 72 | `cyclomatic` is a more advanced strategy that uses the [cyclomatic complexity][cyclomatic] |
@@ -105,8 +107,8 @@ A special thanks to a few contributors that helped me make `code-complexity` bet |
105 | 107 | - Alexander Dormann (alexdo) for fixing the `ENOBUFS` (and apologies for stealing your code). |
106 | 108 | - Scott Brooks (scottamplitude) for initiating the work on complexity strategies |
107 | 109 |
|
108 | | -[michael-feathers-source]:https://www.stickyminds.com/article/getting-empirical-about-refactoring |
109 | | -[travis-image]:https://img.shields.io/travis/simonrenoult/code-complexity/master.svg?style=flat-square |
| 110 | +[michael-feathers-source]: https://www.stickyminds.com/article/getting-empirical-about-refactoring |
| 111 | +[travis-image]: https://img.shields.io/travis/simonrenoult/code-complexity/master.svg?style=flat-square |
110 | 112 | [travis-url]: https://travis-ci.org/simonrenoult/code-complexity |
111 | 113 | [style-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square |
112 | 114 | [style-url]: https://prettier.io/ |
|
0 commit comments