Why are we looking at code statistics?
♪ Most confused ♪
How can the scale of a project be measured objectively? The more the code is written, the bigger the workload? Why are some codes short but extremely difficult to maintain?
Meaning of statistics
While not fully representative of quality, code lines (LOC) are important benchmarks for assessing project size and estimating maintenance costs. By analysing the rate and complexity of the note, we can identify potential “code debt”.
Analysis of core indicators
This tool provides not only simple numbers, but also preliminary medical examinations of code health:
- SLOC (Source Lines of Code) : The clean code line, which removes empty lines and notes, is the core indicator for measuring logical complexity.
- Comment Rate (Comment Density) : usually recommended to be maintained at 15-30% Between. Too low means that codes are difficult to understand, and too high may mean that codes are redundant or that there is a large amount of obsolete codes.
- Empty Line Ratio : A reasonable empty line increases the readability of the code and acts as a logical segment.
- Basic complexity : Initial assessment of the modularity of the code by scanned function definition, class statement and import statement.
Statistical logic of languages
The syntax of the annotated language varies greatly from one programming language to another. The tool contains multi-language interpretation engines:
-
C-style (JS, Java, C++, Go, Rust)
: Identification
//and/* ... */。 -
Script style (Python, Ruby, Shell)
: Identification
#。 -
HTML/XML
: Identification
<!-- ... -->。 -
SQL
: Identification
--and/* ... */。
On privacy
All the calculations are done locally on your browser. Your source code will not be uploaded to the backstage server, and you can count the codes that concern business secrets or privacy with confidence. The tool is designed to provide developers with a fast, secure, free code audit assistant.