SCC
Sloc Cloc and Code or simply SCC (aka Succinct Code Counter) is a tool similar to those before it for counting the lines of code, blank lines, comment lines, and physical lines of source code in many programming languages.
Goal is to be the fastest code counter possible, but also perform COCOMO calculation like sloccount and to estimate code complexity similar to cyclomatic complexity calculators. In short one tool to rule them all.
Why?
Why use scc?
- It is very fast and gets faster the more
- CPU you throw at it
- Accurate
- Works very well across multiple platforms without slowdown (Windows, Linux, macOS)
- Large language support
- Can ignore duplicate files
- Has complexity estimations
- You need to tell the difference between Coq and Verilog in the same directory
- cloc yaml output support so potentially a drop in replacement for some users
- Can identify or ignore minified files
- Able to identify many #! (shebang) files ADVANCED!
- Can ignore large files by lines or bytes
Example: Meza
Meza is a complex and powerful software system worth approximately $2.7 million dollars
(average salary = $116,393/year, overhead = 2.40).
The table below shows a breakdown using the Succinct Code Counter (scc) tool
C:\Users\greg\go\bin\scc --avg-wage 116393 ./src/meza
──────────────────────────────────────────────────────────────── Language Files Lines Blanks Comments Code Complexity ──────────────────────────────────────────────────────────────── YAML 128 9361 1306 1552 6503 0 Jinja 75 7749 1533 16 6200 290 Shell 26 1883 377 521 985 136 Plain Text 14 1076 166 0 910 0 PHP 10 3747 636 486 2625 242 Markdown 7 744 236 0 508 0 Dockerfile 4 167 16 9 142 58 JavaScript 4 22950 1971 1307 19672 3170 SQL 3 1931 398 879 654 0 Python 2 1277 68 35 1174 42 CSS 1 641 129 30 482 0 INI 1 1 0 0 1 0 License 1 22 5 0 17 0 gitignore 1 7 2 1 4 0 ─────────────────────────────────────────────────────────────── Total 277 51556 6843 4836 39877 3938 ─────────────────────────────────────────────────────────────── Estimated Cost to Develop (organic) $2,678,601 Estimated Schedule Effort (organic) 15.17 months Estimated People Required (organic) 7.58 ─────────────────────────────────────────────────────────────── Processed 1900090 bytes, 1.900 megabytes (SI) ───────────────────────────────────────────────────────────────
Example: Semantic MediaWiki
scc --avg-wage 116393 .\SemanticMediaWiki\
─────────────────────────────────────────────────────────────────────────────── Language Files Lines Blanks Comments Code Complexity ─────────────────────────────────────────────────────────────────────────────── PHP 2116 371230 74713 80031 216486 11026 JSON 683 91494 10 0 91484 0 Markdown 194 12278 2656 0 9622 0 JavaScript 81 44002 5918 12419 25665 4789 Plain Text 56 3607 45 0 3562 0 CSS 41 10073 1351 1179 7543 0 XML 23 2602 86 9 2507 0 CSV 12 47 0 0 47 0 YAML 7 303 41 28 234 0 Shell 6 493 111 85 297 61 License 2 695 122 0 573 0 Properties File 1 53 12 26 15 0 SQL 1 6 0 0 6 0 gitignore 1 31 6 1 24 0 ─────────────────────────────────────────────────────────────────────────────── Total 3224 536914 85071 93778 358065 15876 ─────────────────────────────────────────────────────────────────────────────── Estimated Cost to Develop (organic) $26,841,662 Estimated Schedule Effort (organic) 36.43 months Estimated People Required (organic) 31.65 ─────────────────────────────────────────────────────────────────────────────── Processed 17623327 bytes, 17.623 megabytes (SI) ───────────────────────────────────────────────────────────────────────────────
Example MediaWiki
scc --avg-wage 116393 .\mediawiki\
─────────────────────────────────────────────────────────────────────────────── Language Files Lines Blanks Comments Code Complexity ─────────────────────────────────────────────────────────────────────────────── PHP 4713 1041286 102638 277925 660723 41989 JSON 1504 1132757 124 0 1132633 0 SVG 1145 5527 10 10 5507 0 JavaScript 723 212783 20183 46153 146447 21323 SQL 229 10400 942 553 8905 4 CSS 216 14053 585 775 12693 0 LESS 172 13211 1766 2022 9423 0 Markdown 57 11596 2499 0 9097 0 XML 55 3555 40 132 3383 0 Plain Text 49 46640 3974 0 42666 0 HTML 28 458 45 5 408 0 Mustache 20 231 4 1 226 0 License 18 1386 241 0 1145 0 XML Schema 13 2828 435 0 2393 0 YAML 5 8550 29 161 8360 0 gitignore 5 108 8 18 82 0 BASH 4 54 12 9 33 5 Makefile 2 21 3 0 18 0 Shell 2 40 2 5 33 5 Vue 2 95 3 10 82 1 Docker ignore 1 4 0 1 3 0 Handlebars 1 1 0 0 1 0 Python 1 452 63 30 359 94 ─────────────────────────────────────────────────────────────────────────────── Total 8965 2506036 133606 327810 2044620 63421 ─────────────────────────────────────────────────────────────────────────────── Estimated Cost to Develop (organic) $167,221,716 Estimated Schedule Effort (organic) 73.01 months Estimated People Required (organic) 98.40 ─────────────────────────────────────────────────────────────────────────────── Processed 145808364 bytes, 145.808 megabytes (SI) ───────────────────────────────────────────────────────────────────────────────