Add a way to compute complexity based on something else than sloc
See original GitHub issueWhat problem are you trying to solve?
We’re currently measuring complexity based on sloc
. It’s nice but a long file doesn’t always mean it’s complex.
Describe the feature
We could add a --complexity-strategy=<sloc or cyclomatic or xyz>
that would be used in the complexity processing.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
What Is Code Complexity? What It Means and How to Measure It
Cyclomatic complexity measures the number of nested conditions within the code, such as those created by for, if/else, switch, while, and until.
Read more >Hits-of-Code Instead of SLoC - Yegor Bugayenko
Hits-of-Code takes complexity into account, because the longer you work with that sorting algorithm the more modifications you make to its lines ...
Read more >A Simple Understanding of Code Complexity - Codegrip
Source Lines of Code (SLOC) – It counts the number of lines in the source code. It is the most straightforward metric used...
Read more >Is SLOC an effective (rough) measurement of computational ...
But the bigger the code base, the more likely it is that someone is actually ... and that's going to put a pretty...
Read more >How to find time complexity of an algorithm? | Adrian Mejia Blog
Some functions are easy to analyze, but when you have loops, and recursion ... How to calculate time complexity of any algorithm or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The algorithm just counts lines of code and returns that as complexity then? Would be good to have that in the readme. Looks like it comes from here:
const result = await nodeSloc({ path: absolutePath });
Can open a PR for the README adjustment if you will confirm.Done in 4.3 😃