1# Sloc Cloc and Code (scc)2345A tool similar to cloc, sloccount and tokei. For counting the lines of code, blank lines, comment lines, and physical lines of source code in many programming languages.67Goal is to be the fastest code counter possible, but also perform COCOMO calculation like sloccount, LOCOMO estimation for LLM-based development costs, estimate code complexity similar to cyclomatic complexity calculators and produce unique lines of code or DRYness metrics. In short one tool to rule them all.89Also it has a very short name which is easy to type `scc`.1011If you don't like sloc cloc and code feel free to use the name `Succinct Code Counter`.1213[](https://github.com/boyter/scc/actions/workflows/go.yml)14[](https://goreportcard.com/report/github.com/boyter/scc)15[](https://coveralls.io/github/boyter/scc?branch=master)16[](https://github.com/boyter/scc/)1718[](https://github.com/avelino/awesome-go)1920Licensed under MIT licence.2122## Table of Contents2324- [Install](#install)25- [Background](#background)26- [Pitch](#pitch)27- [Usage](#usage)28- [Complexity Estimates](#complexity-estimates)29- [Unique Lines of Code (ULOC)](#unique-lines-of-code-uloc)30- [COCOMO](#cocomo)31- [LOCOMO](#locomo)32- [Git Insight Reports](#git-insight-reports)33- [HTML Report](#html-report)34- [Output Formats](#output-formats)35- [Performance](#performance)36- [Development](#development)37- [MCP Server Mode](#mcp-server-mode)38- [Adding/Modifying Languages](#addingmodifying-languages)39- [Issues](#issues)40- [Badges](#badges)41- [Language Support](LANGUAGES.md)42- [Citation](#citation)4344### scc for Teams & Enterprise4546While scc will always be a free and open tool for individual developers, companies and businesses, we are exploring an enhanced version designed for teams and businesses. scc Enterprise will build on the core scc engine to provide historical analysis, team-level dashboards, and policy enforcement to help engineering leaders track code health, manage technical debt, and forecast project costs.4748We are currently gathering interest for a private beta. If you want to visualize your codebase's evolution, integrate quality gates into your CI/CD pipeline, and get a big-picture view across all your projects,49sign up for the early access list [here](https://docs.google.com/forms/d/e/1FAIpQLScIBKy3y2m0rKu89L67qwe26Xyn9Scu0gW-HQX9lC0qEAx9nQ/viewform)5051### Install5253#### Go Install5455You can install `scc` by using the standard go toolchain.5657To install the latest stable version of scc:5859`go install github.com/boyter/scc/v3@latest`6061To install a development version:6263`go install github.com/boyter/scc/v3@master`6465Note that `scc` needs go version >= 1.25.6667#### Snap6869A [snap install](https://snapcraft.io/scc) exists thanks to [Ricardo](https://feliciano.tech/).7071`$ sudo snap install scc`7273*NB* Snap installed applications cannot run outside of `/home` <https://askubuntu.com/questions/930437/permission-denied-error-when-running-apps-installed-as-snap-packages-ubuntu-17> so you may encounter issues if you use snap and attempt to run outside this directory.7475#### Homebrew7677Or if you have [Homebrew](https://brew.sh/) installed7879`$ brew install scc`8081#### Fedora8283Fedora Linux users can use a [COPR repository](https://copr.fedorainfracloud.org/coprs/lihaohong/scc/):8485`$ sudo dnf copr enable lihaohong/scc && sudo dnf install scc`8687#### MacPorts8889On macOS, you can also install via [MacPorts](https://www.macports.org)9091`$ sudo port install scc`9293#### Scoop9495Or if you are using [Scoop](https://scoop.sh/) on Windows9697`$ scoop install scc`9899#### Chocolatey100101Or if you are using [Chocolatey](https://chocolatey.org/) on Windows102103`$ choco install scc`104105#### WinGet106107Or if you are using [WinGet](https://github.com/microsoft/winget-cli) on Windows108109`winget install --id benboyter.scc --source winget`110111#### FreeBSD112113On FreeBSD, scc is available as a package114115`$ pkg install scc`116117Or, if you prefer to build from source, you can use the ports tree118119`$ cd /usr/ports/devel/scc && make install clean`120121### Run in Docker122123Go to the directory you want to run scc from.124125Run the command below to run the latest release of scc on your current working directory:126127```bash128docker run --rm -it -v "$PWD:/pwd" ghcr.io/boyter/scc:master scc /pwd129```130131#### Manual132133Binaries for Windows, GNU/Linux and macOS for both i386 and x86_64 machines are available from the [releases](https://github.com/boyter/scc/releases) page.134135#### GitLab136137<https://about.gitlab.com/blog/2023/02/15/code-counting-in-gitlab/>138139#### Other140141If you would like to assist with getting `scc` added into apt/chocolatey/etc... please submit a PR or at least raise an issue with instructions.142143### Background144145Read all about how it came to be along with performance benchmarks,146147- <https://boyter.org/posts/sloc-cloc-code/>148- <https://boyter.org/posts/why-count-lines-of-code/>149- <https://boyter.org/posts/sloc-cloc-code-revisited/>150- <https://boyter.org/posts/sloc-cloc-code-performance/>151- <https://boyter.org/posts/sloc-cloc-code-performance-update/>152153Some reviews of `scc`154155- <https://nickmchardy.com/2018/10/counting-lines-of-code-in-koi-cms.html>156- <https://www.feliciano.tech/blog/determine-source-code-size-and-complexity-with-scc/>157- <https://metaredux.com/posts/2019/12/13/counting-lines.html>158159Setting up `scc` in GitLab160161- <https://about.gitlab.com/blog/2023/02/15/code-counting-in-gitlab/>162163A talk given at the first GopherCon AU about `scc` (press S to see speaker notes)164165- <https://boyter.org/static/gophercon-syd-presentation/>166- <https://www.youtube.com/watch?v=jd-sjoy3GZo>167168For performance see the [Performance](https://github.com/boyter/scc#performance) section169170Other similar projects,171172- [SLOCCount](https://www.dwheeler.com/sloccount/) the original sloc counter173- [cloc](https://github.com/AlDanial/cloc), inspired by SLOCCount; implemented in Perl for portability174- [gocloc](https://github.com/hhatto/gocloc) a sloc counter in Go inspired by tokei175- [loc](https://github.com/cgag/loc) rust implementation similar to tokei but often faster176- [loccount](https://gitlab.com/esr/loccount) Go implementation written and maintained by ESR177- [polyglot](https://github.com/vmchale/polyglot) ATS sloc counter178- [tokei](https://github.com/XAMPPRocky/tokei) fast, accurate and written in rust179- [sloc](https://github.com/flosse/sloc) coffeescript code counter180- [stto](https://github.com/mainak55512/stto) new Go code counter with a focus on performance181182Interesting reading about other code counting projects tokei, loc, polyglot and loccount183184- <https://www.reddit.com/r/rust/comments/59bm3t/a_fast_cloc_replacement_in_rust/>185- <https://www.reddit.com/r/rust/comments/82k9iy/loc_count_lines_of_code_quickly/>186- <http://blog.vmchale.com/article/polyglot-comparisons>187- <http://esr.ibiblio.org/?p=8270>188189Further reading about processing files on the disk performance190191- <https://blog.burntsushi.net/ripgrep/>192193Using `scc` to process 40 TB of files from GitHub/Bitbucket/GitLab194195- <https://boyter.org/posts/an-informal-survey-of-10-million-github-bitbucket-gitlab-projects/>196197### Pitch198199Why use `scc`?200201- It is very fast and gets faster the more CPU you throw at it202- Accurate203- Works very well across multiple platforms without slowdown (Windows, Linux, macOS)204- Large language support205- Can ignore duplicate files206- Has complexity estimations207- You need to tell the difference between Coq and Verilog in the same directory208- cloc yaml output support so potentially a drop in replacement for some users209- Can identify or ignore minified files210- Able to identify many #! files ADVANCED! <https://github.com/boyter/scc/issues/115>211- Can ignore large files by lines or bytes212- Can calculate the ULOC or unique lines of code by file, language or project213- Supports multiple output formats for integration, CSV, SQL, JSON, HTML and more214215Why not use `scc`?216217- You don't like Go for some reason218- It cannot count D source with different nested multi-line comments correctly <https://github.com/boyter/scc/issues/27>219220### Differences221222There are some important differences between `scc` and other tools that are out there. Here are a few important ones for you to consider.223224Blank lines inside comments are counted as comments. While the line is technically blank the decision was made that once in a comment everything there should be considered a comment until that comment is ended. As such the following,225226```c227/* blank lines follow228229230*/231```232233Would be counted as 4 lines of comments. This is noticeable when comparing scc's output to other tools on large234repositories.235236`scc` is able to count verbatim strings correctly. For example in C# the following,237238```C#239private const string BasePath = @"a:\";240// The below is returned to the user as a version241private const string Version = "1.0.0";242```243244Because of the prefixed @ this string ends at the trailing " by ignoring the escape character \ and as such should be245counted as 2 code lines and 1 comment. Some tools are unable to246deal with this and instead count up to the "1.0.0" as a string which can cause the middle comment to be counted as247code rather than a comment.248249`scc` will also tell you the number of bytes it has processed (for most output formats) allowing you to estimate the250cost of running some static analysis tools.251252### Usage253254Command line usage of `scc` is designed to be as simple as possible.255Full details can be found in `scc --help` or `scc -h`. Note that the below reflects the state of master not a release, as such256features listed below may be missing from your installation.257258```text259$ scc -h260Sloc, Cloc and Code. Count lines of code in a directory with complexity estimation.261Version 3.8.0 (beta)262Ben Boyter <ben@boyter.org> + Contributors263264Usage:265 scc [flags] [files or directories]266267Examples:268 Count the current directory:269 scc270271 Count a specific folder or file:272 scc myproject/273 scc main.go274275 Count several paths at once:276 scc src/ docs/ README.md277278 Show a per-file breakdown instead of the per-language summary:279 scc --by-file280281 Output as CSV or JSON (e.g. for further processing):282 scc --format csv283 scc --format json -o counts.json284285 Count an unrecognised extension as a known language:286 scc --count-as jsp:html287288 Count files matching a path pattern as a new category (glob by default):289 scc --count-as-pattern '*_spec.rb:Ruby Spec:Ruby'290291 Generate a self-contained HTML infographic report:292 scc --report293 scc --report=out.html --report-title "myrepo" --report-skip cocomo294295Flags:296 --avg-wage int average wage value used for basic COCOMO calculation (default 56286)297 --binary disable binary file detection298 --buckets int time-bucket resolution for the git timeline reports (default 60) (default 60)299 --by-author render the author rollup report (bus factor and last-toucher attribution over recent git history)300 --by-file display output for every file301 -m, --character calculate max and mean characters per line302 --ci enable CI output settings where stdout is ASCII303 --cocomo-project-type string change COCOMO model type [organic, semi-detached, embedded, "custom,1,1,1,1"] (default "organic")304 --cost-comparison show both COCOMO and LOCOMO estimates side by side305 --count-as string count extension as language [e.g. jsp:htm,chead:"C Header" maps extension jsp to html and chead to C Header]306 --count-as-pattern stringArray count files matching a path pattern as a new named category backed by a base language [repeatable; pattern is glob by default, prefix with re: for regex; e.g. *_spec.rb:"Ruby Spec":Ruby or re:\.test\.js$:"JavaScript Tests":JavaScript]307 --count-ignore set to allow .gitignore and .ignore files to be counted308 --currency-symbol string set currency symbol (default "$")309 --debug enable debug output310 --depth int commit window size for git history reports; 0 means entire history (large repos may be slow) (default 1000)311 --directory-walker-job-workers int controls the maximum number of workers which will walk the directory tree (default 8)312 -a, --dryness calculate the DRYness of the project (implies --uloc)313 --eaf float the effort adjustment factor derived from the cost drivers (1.0 if rated nominal) (default 1)314 --exclude-dir strings directories to exclude (default [.git,.hg,.svn])315 -x, --exclude-ext strings ignore file extensions (overrides include-ext) [comma separated list: e.g. go,java,js]316 -n, --exclude-file strings ignore files with matching names (default [package-lock.json,Cargo.lock,yarn.lock,pubspec.lock,Podfile.lock,pnpm-lock.yaml])317 --file-gc-count int number of files to parse before turning the GC on (default 10000)318 --file-list-queue-size int the size of the queue of files found and ready to be read into memory (default 8)319 --file-process-job-workers int number of goroutine workers that process files collecting stats (default 8)320 --file-summary-job-queue-size int the size of the queue used to hold processed file statistics before formatting (default 8)321 -f, --format string set output format [tabular, wide, json, json2, csv, csv-stream, cloc-yaml, html, html-table, sql, sql-insert, openmetrics] (default "tabular")322 --format-multi string have multiple format output overriding --format [e.g. tabular:stdout,csv:file.csv,json:file.json]323 --gen identify generated files324 --generated-markers strings string markers in head of generated files (default [do not edit,<auto-generated />])325 -h, --help help for scc326 --hotspots render the hotspots report (files ranked by complexity × change frequency over recent git history)327 -i, --include-ext strings limit to file extensions [comma separated list: e.g. go,java,js]328 --include-symlinks if set will count symlink files329 -l, --languages print supported languages and extensions330 --large-byte-count int number of bytes a file can contain before being removed from output (default 1000000)331 --large-line-count int number of lines a file can contain before being removed from output (default 40000)332 --locomo enable LOCOMO (LLM Output COst MOdel) cost estimation333 --locomo-config string LOCOMO power-user config "tokensPerLine,inputPerLine,complexityWeight,iterations,iterationWeight"334 --locomo-cycles float override estimated LLM iteration cycles (default: calculated from complexity)335 --locomo-input-price float LOCOMO cost per 1M input tokens in dollars (overrides preset)336 --locomo-output-price float LOCOMO cost per 1M output tokens in dollars (overrides preset)337 --locomo-preset string LOCOMO model preset [large, medium, small, local] (default "medium")338 --locomo-review float human review minutes per line of code for LOCOMO estimate (default 0.01)339 --locomo-tps float LOCOMO output tokens per second (overrides preset)340 --mcp start as an MCP (Model Context Protocol) server over stdio341 --min identify minified files342 -z, --min-gen identify minified or generated files343 --min-gen-line-length int number of bytes per average line for file to be considered minified or generated (default 255)344 --no-cocomo remove COCOMO calculation output345 -c, --no-complexity skip calculation of code complexity346 -d, --no-duplicates remove duplicate files from stats and output347 --no-fold-authors disable the name+email-domain identity folding fallback for git author reports (mailmap still applied)348 --no-gen ignore generated files in output (implies --gen)349 --no-gitignore disables .gitignore file logic350 --no-gitmodule disables .gitmodules file logic351 --no-hborder remove horizontal borders between sections352 --no-ignore disables .ignore file logic353 --no-large ignore files over certain byte and line size set by large-line-count and large-byte-count354 --no-min ignore minified files in output (implies --min)355 --no-min-gen ignore minified or generated files in output (implies --min-gen)356 --no-scc-ignore disables .sccignore file logic357 --no-size remove size calculation output358 -M, --not-match stringArray ignore files and directories matching regular expression359 -o, --output string output filename (default stdout)360 --overhead float set the overhead multiplier for corporate overhead (facilities, equipment, accounting, etc.) (default 2.4)361 -p, --percent include percentage values in output362 --remap-all string inspect every file and remap by checking for a string and remapping the language [e.g. "-*- C++ -*-":"C Header"]363 --remap-unknown string inspect files of unknown type and remap by checking for a string and remapping the language [e.g. "-*- C++ -*-":"C Header"]364 --report string[="scc-report.html"] write a self-contained HTML report; bare flag writes scc-report.html and prompts before overwriting, --report=path/out.html overwrites silently365 --report-skip string comma-separated sections to omit (cocomo,locomo,hotspots,authors,timeline,files,uloc,linelength,card)366 --report-title string override the repo name shown in the report banner367 --size-unit string set size unit [si, binary, mixed, xkcd-kb, xkcd-kelly, xkcd-imaginary, xkcd-intel, xkcd-drive, xkcd-bakers] (default "si")368 --sloccount-format print a more SLOCCount like COCOMO calculation369 -s, --sort string column to sort by [files, name, lines, blanks, code, comments, complexity] (default "files")370 --sql-project string use supplied name as the project identifier for the current run. Only valid with the --format sql or sql-insert option371 --timeline render an over-time view of recent git history; with --by-author runs the author timeline, alone runs the languages timeline372 -t, --trace enable trace output (not recommended when processing multiple files)373 -u, --uloc calculate the number of unique lines of code (ULOC) for the project374 -v, --verbose verbose output375 --version version for scc376 -w, --wide wider output with additional statistics (implies --complexity)377```378379Output should look something like the below for the redis project380381```text382$ scc redis 383───────────────────────────────────────────────────────────────────────────────384Language Files Lines Blanks Comments Code Complexity385───────────────────────────────────────────────────────────────────────────────386C 437 267,353 31,103 45,998 190,252 48,269387JSON 406 25,392 4 0 25,388 0388C Header 288 48,831 5,648 11,302 31,881 3,097389TCL 215 66,943 7,330 4,651 54,962 3,816390Shell 75 1,626 239 343 1,044 185391Python 34 4,802 694 498 3,610 621392Markdown 26 4,647 1,226 0 3,421 0393Autoconf 22 11,732 1,124 1,420 9,188 1,016394Lua 20 525 69 71 385 89395Makefile 20 1,956 368 170 1,418 85396YAML 20 2,696 147 53 2,496 0397MSBuild 11 1,995 2 0 1,993 160398Plain Text 10 1,773 313 0 1,460 0399Ruby 9 817 73 105 639 123400C++ 8 546 85 43 418 43401HTML 5 9,658 2,928 12 6,718 0402License 3 90 17 0 73 0403CMake 2 298 49 5 244 12404CSS 2 107 16 0 91 0405Systemd 2 80 6 0 74 0406BASH 1 143 16 5 122 38407Batch 1 28 2 0 26 3408C++ Header 1 9 1 3 5 0409Extensible Styleshe… 1 10 0 0 10 0410JavaScript 1 31 1 0 30 5411Module-Definition 1 11,375 2,116 0 9,259 167412SVG 1 1 0 0 1 0413Smarty Template 1 44 1 0 43 5414m4 1 951 218 64 669 0415───────────────────────────────────────────────────────────────────────────────416Total 1,624 464,459 53,796 64,743 345,920 57,734417───────────────────────────────────────────────────────────────────────────────418Estimated Cost to Develop (organic) $12,517,562419Estimated Schedule Effort (organic) 35.93 months420Estimated People Required (organic) 30.95421───────────────────────────────────────────────────────────────────────────────422Processed 16601962 bytes, 16.602 megabytes (SI)423───────────────────────────────────────────────────────────────────────────────424```425426Note that you don't have to specify the directory you want to run against. Running `scc` will assume you want to run against the current directory.427428You can also run against multiple files or directories `scc directory1 directory2 file1 file2` with the results aggregated in the output.429430Since `scc` writes to standard output, there are many ways to easily share the results. For example, using [netcat](https://manpages.org/nc)431and [one of many pastebins](https://paste.c-net.org/) gives a public URL:432433```bash434$ scc | nc paste.c-net.org 9999435https://paste.c-net.org/Example436```437438### Ignore Files439440`scc` mostly supports .ignore files inside directories that it scans. This is similar to how ripgrep, ag and tokei work. .ignore files are 100% the same as .gitignore files with the same syntax, and as such `scc` will ignore files and directories listed in them. You can add .ignore files to ignore things like vendored dependency checked in files and such. The idea is allowing you to add a file or folder to git and have ignored in the count.441442It also supports its own ignore file `.sccignore` if you want `scc` to ignore things while having ripgrep, ag, tokei and others support them.443444### Interesting Use Cases445446Used inside Intel Nemu Hypervisor to track code changes between revisions <https://github.com/intel/nemu/blob/topic/virt-x86/tools/cloc-change.sh#L9>447Appears to also be used inside both <http://codescoop.com/> <https://pinpoint.com/> <https://github.com/chaoss/grimoirelab-graal>448449It also is used to count code and guess language types in <https://searchcode.com/> which makes it one of the most frequently run code counters in the world.450451You can also hook scc into your gitlab pipeline <https://gitlab.com/guided-explorations/ci-cd-plugin-extensions/ci-cd-plugin-extension-scc>452453Used by the following products and services,454455- [GitHub CodeQL](https://github.com/boyter/scc/pull/317) - The CodeQL engine uses `scc` for line counting456- [JetBrains Qodana](https://github.com/JetBrains/qodana-cli) - The Qodana CLI leverages `scc` as a command-line helper for code analysis457- [Scaleway](https://twitter.com/Scaleway/status/1488087029476995074?s=20&t=N2-z6O-ISDdDzULg4o4uVQ) - Cloud provider using `scc`458- [Linux Foundation LFX Insights](https://docs.linuxfoundation.org/lfx/insights/v3-beta-version-current/getting-started/landing-page/cocomo-cost-estimation-simplified) - COCOMO cost estimation459- [OpenEMS](https://openems.io/)460461### Features462463`scc` uses a small state machine in order to determine what state the code is when it reaches a newline `\n`. As such it is aware of and able to count464465- Single Line Comments466- Multi Line Comments467- Strings468- Multi Line Strings469- Blank lines470471Because of this it is able to accurately determine if a comment is in a string or is actually a comment.472473It also attempts to count the complexity of code. This is done by checking for branching operations in the code. For example, each of the following `for if switch while else || && != ==` if encountered in Java would increment that files complexity by one.474475### Complexity Estimates476477Let's take a minute to discuss the complexity estimate itself.478479The complexity estimate is really just a number that is only comparable to files in the same language. It should not be used to compare languages directly without weighting them. The reason for this is that its calculated by looking for branch and loop statements in the code and incrementing a counter for that file.480481Because some languages don't have loops and instead use recursion they can have a lower complexity count. Does this mean they are less complex? Probably not, but the tool cannot see this because it does not build an AST of the code as it only scans through it.482483Generally though the complexity there is to help estimate between projects written in the same language, or for finding the most complex file in a project `scc --by-file -s complexity` which can be useful when you are estimating on how hard something is to maintain, or when looking for those files that should probably be refactored.484485As for how it works.486487It's my own definition, but tries to be an approximation of cyclomatic complexity <https://en.wikipedia.org/wiki/Cyclomatic_complexity> although done only on a file level.488489The reason it's an approximation is that it's calculated almost for free from a CPU point of view (since its a cheap lookup when counting), whereas a real cyclomatic complexity count would need to parse the code. It gives a reasonable guess in practice though even if it fails to identify recursive methods. The goal was never for it to be exact.490491In short when scc is looking through what it has identified as code if it notices what are usually branch conditions it will increment a counter.492493The conditions it looks for are compiled into the code and you can get an idea for them by looking at the JSON inside the repository. See <https://github.com/boyter/scc/blob/master/languages.json#L3869> for an example of what it's looking at for a file that's Java.494495The increment happens for each of the matching conditions and produces the number you see.496497### Unique Lines of Code (ULOC)498499ULOC stands for Unique Lines of Code and represents the unique lines across languages, files and the project itself. This idea was taken from500<https://cmcenroe.me/2018/12/14/uloc.html> where the calculation is presented using standard Unix tools `sort -u *.h *.c | wc -l`. This metric is501there to assist with the estimation of complexity within the project. Quoting the source502503> In my opinion, the number this produces should be a better estimate of the complexity of a project. Compared to SLOC, not only are blank lines discounted, but so are close-brace lines and other repetitive code such as common includes. On the other hand, ULOC counts comments, which require just as much maintenance as the code around them does, while avoiding inflating the result with license headers which appear in every file, for example.504505You can obtain the ULOC by supplying the `-u` or `--uloc` argument to `scc`.506507It has a corresponding metric `DRYness %` which is the percentage of ULOC to CLOC or `DRYness = ULOC / SLOC`. The508higher the number the more DRY (don't repeat yourself) the project can be considered. In general a higher value509here is a better as it indicates less duplicated code. The DRYness metric was taken from a comment by minimax <https://lobste.rs/s/has9r7/uloc_unique_lines_code>510511To obtain the DRYness metric you can use the `-a` or `--dryness` argument to `scc`, which will implicitly set `--uloc`.512513Note that there is a performance penalty when calculating the ULOC metrics which can double the runtime.514515Running the uloc and DRYness calculations against C code a clone of redis produces an output as follows.516517```bash518$ scc -a -i c redis 519───────────────────────────────────────────────────────────────────────────────520Language Files Lines Blanks Comments Code Complexity521───────────────────────────────────────────────────────────────────────────────522C 437 267,353 31,103 45,998 190,252 48,269523(ULOC) 149892524───────────────────────────────────────────────────────────────────────────────525Total 437 267,353 31,103 45,998 190,252 48,269526───────────────────────────────────────────────────────────────────────────────527Unique Lines of Code (ULOC) 149892528DRYness % 0.56529───────────────────────────────────────────────────────────────────────────────530Estimated Cost to Develop (organic) $6,681,762531Estimated Schedule Effort (organic) 28.31 months532Estimated People Required (organic) 20.97533───────────────────────────────────────────────────────────────────────────────534Processed 9390815 bytes, 9.391 megabytes (SI)535───────────────────────────────────────────────────────────────────────────────536```537538Further reading about the ULOC calculation can be found at <https://boyter.org/posts/sloc-cloc-code-new-metic-uloc/>539540Interpreting Dryness,541542- 75% (High Density): Very terse, expressive code. Every line counts. (Example: Clojure, Haskell)543- 60% - 70% (Standard): A healthy balance of logic and structural ceremony. (Example: Java, Python)544- < 55% (High Boilerplate): High repetition. Likely due to mandatory error handling, auto-generated code, or verbose configuration. (Example: C#, CSS)545546See <https://boyter.org/posts/boilerplate-tax-ranking-popular-languages-by-density/> for more details.547548### COCOMO549550The COCOMO statistics displayed at the bottom of any command line run can be configured as needed.551552```text553Estimated Cost to Develop (organic) $664,081554Estimated Schedule Effort (organic) 11.772217 months555Estimated People Required (organic) 5.011633556```557558To change the COCOMO parameters, you can either use one of the default COCOMO models.559560```text561scc --cocomo-project-type organic562scc --cocomo-project-type semi-detached563scc --cocomo-project-type embedded564```565566You can also supply your own parameters if you are familiar with COCOMO as follows,567568```text569scc --cocomo-project-type "custom,1,1,1,1"570```571572See below for details about how the model choices, and the parameters they use.573574Organic – A software project is said to be an organic type if the team size required is adequately small, the575problem is well understood and has been solved in the past and also the team members have a nominal experience576regarding the problem.577578`scc --cocomo-project-type "organic,2.4,1.05,2.5,0.38"`579580Semi-detached – A software project is said to be a Semi-detached type if the vital characteristics such as team-size,581experience, knowledge of the various programming environment lie in between that of organic and Embedded.582The projects classified as Semi-Detached are comparatively less familiar and difficult to develop compared to583the organic ones and require more experience and better guidance and creativity. Eg: Compilers or584different Embedded Systems can be considered of Semi-Detached type.585586`scc --cocomo-project-type "semi-detached,3.0,1.12,2.5,0.35"`587588Embedded – A software project with requiring the highest level of complexity, creativity, and experience589requirement fall under this category. Such software requires a larger team size than the other two models590and also the developers need to be sufficiently experienced and creative to develop such complex models.591592`scc --cocomo-project-type "embedded,3.6,1.20,2.5,0.32"`593594### LOCOMO595596LOCOMO (LLM Output COst MOdel) estimates the cost to regenerate a codebase using a large language model. It is the LLM-era counterpart to COCOMO - a rough ballpark estimator, not a project planning tool.597598Note: LOCOMO was developed as part of `scc` and is not an industry-standard model. Unlike COCOMO, which is based on decades of empirical research by Barry Boehm, LOCOMO is an experimental heuristic designed to give a useful order-of-magnitude estimate for LLM-assisted development costs. Treat its output as a conversation starter, not a definitive answer.599600**Important distinction:** LOCOMO estimates the cost to **regenerate** known code - essentially "given this exact codebase, how much would it cost to have an LLM produce it?" This is fundamentally different from the cost to **create** something from scratch, which involves exploration, architectural decisions, dead ends, debugging, and iteration that can cost orders of magnitude more. COCOMO estimates the human *creation* cost; LOCOMO estimates the LLM *regeneration* cost. They answer different questions.601602LOCOMO is opt-in. Enable it with `--locomo` or use `--cost-comparison` to display both COCOMO and LOCOMO side by side.603604```605$ scc --locomo .606...607LOCOMO LLM Cost Estimate (medium)608 Tokens Required (in/out) 3.0M / 0.7M609 Cost to Generate $20610 Estimated Cycles 2.1611 Generation Time (serial) 3.9 hours612 Human Review Time 5.9 hours613 Disclaimer: rough ballpark for regenerating code using a LLM.614 Does not account for context reuse, test generation, or heavy debugging.615```616617#### How it works618619LOCOMO uses SLOC and complexity data that `scc` already computes. The model works per-file and aggregates:6206211. **Output tokens** - each line of code maps to ~10 LLM output tokens (configurable).6222. **Input tokens** - estimated prompting cost, scaled by code complexity. More complex code (higher branch density) requires more detailed prompts. Scales to prevent runaway estimates.6233. **Iteration factor** - LLMs rarely produce correct code on the first try. A retry multiplier scales with complexity, also scales.6244. **Dollar cost** - input and output tokens multiplied by per-token pricing.6255. **Generation time** - total serial output tokens divided by tokens-per-second throughput.6266. **Human review time** - estimated per-line overhead for planning, review, testing, and integration.627628#### Model presets629630Presets are tier-based rather than tied to specific models, so they don't go stale as models are retired or renamed. Use `--locomo-preset` to select a tier:631632| Preset | Represents | Input $/1M | Output $/1M | TPS |633|--------|-----------|-----------|-------------|-----|634| `large` | Frontier models (Opus, GPT-5.3, Gemini 3.1 Pro, etc.) | 10.00 | 30.00 | 30 |635| `medium` (default) | Balanced models (Sonnet, Gemini Flash, etc.) | 3.00 | 15.00 | 50 |636| `small` | Fast/cheap models (Haiku, GPT-4o-mini, etc.) | 0.50 | 2.00 | 100 |637| `local` | Self-hosted models (Llama, Mistral, Qwen etc.) | 0.00 | 0.00 | 15 |638639For `local`, cost is $0 but generation time is still reported to capture the compute/time investment. Preset pricing reflects approximate tier rates as of early 2026 and can be overridden with explicit flags.640641```642scc --locomo --locomo-preset large .643scc --locomo --locomo-preset local .644```645646#### Overriding preset values647648You can override individual preset values for pricing or throughput:649650```651scc --locomo --locomo-input-price 1.0 --locomo-output-price 5.0 .652scc --locomo --locomo-tps 100 .653```654655#### Human review time656657The `--locomo-review` flag controls estimated human review minutes per line of code (default: 0.01, i.e. 0.6 seconds per line). This is intentionally optimistic and assumes light oversight.658659For mission-critical, security-sensitive, or complex algorithmic code you should increase this:660661```662scc --locomo --locomo-review 0.05 .663scc --locomo --locomo-review 0.1 .664```665666#### Power-user configuration667668The five internal model parameters can be overridden with a single comma-separated config string:669670```671scc --locomo --locomo-config "tokensPerLine,inputPerLine,complexityWeight,iterations,iterationWeight"672```673674The defaults are `"10,20,5,1.5,2"`. Here is what each parameter controls:675676| Position | Name | Default | Description |677|----------|------|---------|-------------|678| 1 | tokensPerLine | 10 | Average LLM output tokens per line of code |679| 2 | inputPerLine | 20 | Base LLM input (prompt) tokens per output line |680| 3 | complexityWeight | 5 | How much complexity density scales input tokens: `inputFactor = 1 + sqrt(density) * weight` |681| 4 | iterations | 1.5 | Base iteration/retry cycles before complexity adjustment |682| 5 | iterationWeight | 2 | How much complexity density adds extra cycles: `cycles = iterations + sqrt(density) * weight` |683684The iteration factor (cycles) scales both input and output tokens - it represents how many generation attempts the LLM needs. Simple code (~0.05 complexity density) produces ~1.9 cycles; complex code (~0.3 density) produces ~2.6 cycles. Use `--locomo-cycles` to override this with a fixed value.685686For example, to model a cheaper/faster LLM that needs fewer tokens but more retries:687688```689scc --locomo --locomo-config "8,15,3,2.0,1.5"690```691692#### Comparing COCOMO and LOCOMO693694Use `--cost-comparison` to show both estimates side by side. This enables COCOMO (if it was disabled) and LOCOMO together:695696```697scc --cost-comparison .698```699700#### What LOCOMO does not account for701702LOCOMO is a rough estimator with known limitations:703704- **No context reuse.** Real LLM-assisted development shares context across files. The per-file model overestimates input tokens for large projects with shared patterns.705- **Boilerplate vs algorithmic code.** A 500-line CRUD controller and a 500-line compression algorithm have very different real costs, but the model only differentiates them via complexity density.706- **Code that LLMs can't write well.** Complex concurrency, platform-specific edge cases, and security-critical crypto need human authoring, not just review.707- **No test generation cost.** The model estimates source code generation only, not test suites.708- **Pricing changes.** LLM pricing drops rapidly. Preset defaults will become stale - use explicit price flags for current estimates.709710#### All LOCOMO flags711712| Flag | Default | Description |713|------|---------|-------------|714| `--locomo` | false | Enable LOCOMO output |715| `--cost-comparison` | false | Show COCOMO + LOCOMO side by side |716| `--locomo-preset` | medium | Model tier preset for pricing and throughput |717| `--locomo-input-price` | (preset) | Override: cost per 1M input tokens ($) |718| `--locomo-output-price` | (preset) | Override: cost per 1M output tokens ($) |719| `--locomo-tps` | (preset) | Override: output tokens per second |720| `--locomo-review` | 0.01 | Human review minutes per line of code |721| `--locomo-cycles` | (calculated) | Override estimated LLM iteration cycles |722| `--locomo-config` | 10,20,5,1.5,2 | Power-user config: tokensPerLine, inputPerLine, complexityWeight, iterations, iterationWeight |723724### Git Insight Reports725726In addition to counting the working tree, `scc` can run four git-aware reports over recent commit history. Each is selected by a flag and rendered as `tabular` (default), `csv`, or `json` via `--format`. All four are derived from one in-process walk of the repository - there is no `exec("git")`, so the `git` binary does not need to be on `PATH`.727728> **Note:** these reports are **slower** than a normal `scc` run. They walk the repository history (one diff per commit using pure-Go Myers diff via [go-git](https://github.com/go-git/go-git)) instead of just counting the current working tree. Runtime scales with `--depth` (the commit window size, default `1000`; `0` means entire history). On large repositories with deep history, expect runtimes measured in seconds to minutes rather than the millisecond-scale you get from a plain `scc` run. Use `--depth` to bound the window.729730When no report flag is set, `scc` behaves exactly as today, these flags are strictly opt-in.731732| Flag | Report | Answers |733|---|---|---|734| `--hotspots` | Hotspots | Which files are defect-prone - high complexity × high churn. |735| `--by-author` | Author rollup | Bus factor - who last-touched the surviving code. |736| `--by-author --timeline` | Author timeline | How each author's activity rises and falls over time. |737| `--timeline` | Languages over time | How the language mix shifts - rewrites, migrations. |738739Shared flags for these reports:740741| Flag | Default | Purpose |742|---|---|---|743| `--depth N` | 1000 | Commit window size (newest N commits). `0` walks the entire history (slow on big repos). Negative values are rejected. |744| `--buckets N` | 60 | Time-bucket resolution for timeline reports. Must be `>= 1` when `--timeline` is set. CSV/JSON always emit full-resolution; tabular sparklines downsample to fit. |745| `-w, --wide` | - | 109-column variant of any report (extra columns where applicable). |746| `--no-fold-authors` | off | Disable the name + email-domain identity folding fallback applied after `.mailmap`. |747748`--hotspots` is mutually exclusive with `--by-author` / `--timeline`; combining them is an error. With `--by-author` set, `--timeline` switches from the author rollup to the author timeline. Alone, `--timeline` renders the languages timeline.749750#### Hotspots - `--hotspots`751752Ranks files by defect-proneness: complexity × change frequency over the window. Surfaces *where to review*, not a defect probability.753754```text755$ scc --hotspots756───────────────────────────────────────────────────────────────────────────────757Hotspots · last 500 commits · 2024-01-09 → 2026-05-20758───────────────────────────────────────────────────────────────────────────────759File Lang Cmplx Commits Lines± Authrs Hotspot760───────────────────────────────────────────────────────────────────────────────761processor/workers.go Go 488 62 7,240 9 100.0762processor/processor.go Go 402 41 3,910 7 71.4763processor/formatters.go Go 233 38 2,980 6 51.8764main.go Go 180 44 2,510 8 48.2765───────────────────────────────────────────────────────────────────────────────766 complexity × change-frequency, normalised · 20 of 142 files shown767───────────────────────────────────────────────────────────────────────────────768```769770Tabular output shows the top files (≈20). `--wide` adds a hotspot bar and an added-lines code-vs-comment split (`+Code%`). `--format csv|json` emits every file with a positive score along with the full per-file detail and window metadata.771772#### Author rollup - `--by-author`773774Bus factor and last-toucher attribution. Lines untouched in the window collect under the sentinel `(before window)` so percentages reconcile to 100%.775776```text777$ scc --by-author778───────────────────────────────────────────────────────────────────────────────779Authors · last 500 commits · 2024-01-09 → 2026-05-20780───────────────────────────────────────────────────────────────────────────────781Author Code Cmplx Files Owns Last seen782───────────────────────────────────────────────────────────────────────────────783Alice Smith 24,110 4,180 118 38.6% 2026-05-22784Bob Jones 15,447 1,902 74 24.7% 2026-03-14785Carol Lee 9,205 3,640 51 14.7% 2026-05-19786(before window) 6,540 810 29 10.4% -787others (12) 1,300 190 - 2.1% -788───────────────────────────────────────────────────────────────────────────────789Bus factor 2 · Alice + Bob last-touched 63% of in-window code790───────────────────────────────────────────────────────────────────────────────791```792793Bus factor is the fewest authors whose combined share of *in-window* code exceeds 50%. The `(before window)` sentinel is excluded from that denominator so the footer reflects who could realistically pick up recent work, not who's stamped on long-frozen lines. The `Owns` column on each row still uses the share-of-all denominator (sentinel included; rows reconcile to 100%).794795Identity folding is layered: `.mailmap` is honoured first; then, by default, two commits sharing a lowercased name *and* an email domain collapse to one author (a fallback for repos without a mailmap). Generic names (`root`, `admin`, `unknown`, …) are excluded from the heuristic to avoid false merges. Disable the fallback with `--no-fold-authors` if you'd rather see every email as its own row. `--wide` adds a Comment column.796797#### Author timeline - `--by-author --timeline`798799How each author's activity rises and falls across the window. The Activity column is a Unicode sparkline normalised per row; the trailing tag is `quiet Nmo` (recently silent) or `↑` (currently near peak).800801```text802$ scc --by-author --timeline803───────────────────────────────────────────────────────────────────────────────804Authors · last 500 commits · 2024-01-09 → 2026-05-20805───────────────────────────────────────────────────────────────────────────────806Author Activity Commits Code±807───────────────────────────────────────────────────────────────────────────────808Alice Smith ▂▃▅▇█▇▆▅▄▄▃▃ 210 +38k809Bob Jones ▇█▆▄▂▁▁▁▁▁▁▁ 142 +21k quiet 2mo810Carol Lee ▁▁▁▁▂▃▄▅▆▇██ 96 +14k ↑811───────────────────────────────────────────────────────────────────────────────812```813814CSV is long format (one row per `(author, bucket)`); JSON includes per-author full-resolution series. Under `--ci` or non-TTY output the sparkline falls back to ASCII.815816#### Languages over time - `--timeline`817818How the language mix shifts: rewrites, migrations (e.g. JS → TS), gradual additions. The Trend sparkline plots each language's **absolute** trajectory, not deltas - so "rising" means "more code in this language now than at window-start".819820```text821$ scc --timeline822───────────────────────────────────────────────────────────────────────────────823Languages · last 500 commits · 2024-01-09 → 2026-05-20824───────────────────────────────────────────────────────────────────────────────825Language Trend Code Share Change826───────────────────────────────────────────────────────────────────────────────827TypeScript ▁▁▂▃▄▅▆▇████ 36,840 58.0% +36,840828Go ▃▃▄▄▅▅▅▆▆▆▆▆ 24,110 38.0% +9,205829JavaScript ██▇▆▅▄▃▂▁▁▁▁ 2,540 4.0% -18,300830Markdown ▂▃▃▄▄▅▅▆▆▆▇▇ 1,204 1.9% +994831───────────────────────────────────────────────────────────────────────────────832```833834Totals reconcile with a plain `scc` against the current HEAD tree. CSV/JSON include every non-empty language with the full per-bucket series.835836#### Output format and caveats837838- Tabular is for humans (sparklines, bars, ASCII fallback under `--ci`). CSV/JSON carry raw numbers only - no presentation glyphs - and include a `window` object (depth, commit count, date range) so downstream tools can reproduce the slice.839- `.gitignore` is already applied by git when each commit was recorded; `.ignore` / `.sccignore` are honoured by the engine (disable with `--no-ignore` / `--no-scc-ignore`).840- Merge commits are diffed against their first parent (`git log --first-parent` semantics).841- Rename detection uses go-git's similarity heuristic; large renames may inflate hotspot churn and reset blame attribution. Shallow clones produce a clear error rather than a panic.842- `Lines±` is the sum of added and removed lines, so files rewritten in place count twice the displaced size.843- Symlinks are skipped (v1). Binary detection is unchanged.844845### HTML Report846847`scc --report` writes a self-contained, infographic-style HTML page summarising the codebase: overview metrics, language breakdown, line-length histogram, hotspots, author rollup, language and author timelines, COCOMO / LOCOMO cost estimates, and a per-file table. The page bundles its own CSS and inline SVG — no external network requests, no JavaScript runtime dependencies — so it can be opened locally, committed to a repo, attached to a release, or hosted as a static artifact.848849```text850$ scc --report # writes scc-report.html (prompts before overwriting)851$ scc --report=docs/code.html # explicit path; overwrites silently852```853854A bare `--report` is non-destructive: if `scc-report.html` already exists in the current directory, `scc` prompts before clobbering it. Naming the file explicitly (`--report=path/out.html`) is treated as consent and overwrites without asking.855856| Flag | Purpose |857|---|---|858| `--report[=path]` | Write the HTML report. Bare flag writes `scc-report.html`; explicit path overwrites silently. |859| `--report-title NAME` | Override the repo name shown in the report banner. Defaults to the `origin` remote name or the directory basename. |860| `--report-skip LIST` | Comma-separated sections to omit: `cocomo`, `locomo`, `hotspots`, `authors`, `timeline`, `files`, `uloc`, `linelength`, `card`. |861862The git-history sections (hotspots, authors, timelines) only render when the directory is a git repository; outside a repo they're omitted gracefully. The report embeds an OpenGraph share card as a `data:` URL so links unfurl on most social platforms — pass `--report-skip card` to drop it.863864### Large File Detection865866You can have `scc` exclude large files from the output.867868The option to do so is `--no-large` which by default will exclude files over 1,000,000 bytes or 40,000 lines.869870You can control the size of either value using `--large-byte-count` or `--large-line-count`.871872For example to exclude files over 1,000 lines and 50kb you could use the following,873874`scc --no-large --large-byte-count 50000 --large-line-count 1000`875876### Minified/Generated File Detection877878You can have `scc` identify and optionally remove files identified as being minified or generated from the output.879880You can do so by enabling the `-z` flag like so `scc -z` which will identify any file with an average line byte size >= 255 (by default) as being minified.881882Minified files appear like so in the output.883884```text885$ scc --no-cocomo -z ./examples/minified/jquery-3.1.1.min.js886───────────────────────────────────────────────────────────────────────────────887Language Files Lines Blanks Comments Code Complexity888───────────────────────────────────────────────────────────────────────────────889JavaScript (min) 1 4 0 1 3 17890───────────────────────────────────────────────────────────────────────────────891Total 1 4 0 1 3 17892───────────────────────────────────────────────────────────────────────────────893Processed 86709 bytes, 0.087 megabytes (SI)894───────────────────────────────────────────────────────────────────────────────895```896897Minified files are indicated with the text `(min)` after the language name.898899Generated files are indicated with the text `(gen)` after the language name.900901You can control the average line byte size using `--min-gen-line-length` such as `scc -z --min-gen-line-length 1`. Please note you need `-z` as modifying this value does not imply minified detection.902903You can exclude minified files from the count totally using the flag `--no-min-gen`. Files which match the minified check will be excluded from the output.904905### Remapping906907Some files may not have an extension. They will be checked to see if they are a #! file. If they are then the language will be remapped to the908correct language. Otherwise, it will not process.909910However, you may have the situation where you want to remap such files based on a string inside it. To do so you can use `--remap-unknown`911912```bash913 scc --remap-unknown "-*- C++ -*-":"C Header"914```915916The above will inspect any file with no extension looking for the string `-*- C++ -*-` and if found remap the file to be counted using the C Header rules.917You can have multiple remap rules if required,918919```bash920 scc --remap-unknown "-*- C++ -*-":"C Header","other":"Java"921```922923There is also the `--remap-all` parameter which will remap all files.924925Note that in all cases if the remap rule does not apply normal #! rules will apply.926927### Counting files as a custom category928929Sometimes you want to break out a subset of files into their own reporting category without changing how they are counted.930A common example is test files such as Ruby specs (`*_spec.rb`) or JavaScript tests (`*.test.js`), which are still Ruby or931JavaScript but which you would like to see called out separately.932933The `--count-as-pattern` flag matches files by their path and counts them as a new named category, while borrowing the934counting rules (comments, strings, complexity) of an existing base language. The format is `[engine:]pattern:name:baselang`.935936**Patterns are globs by default**, so you usually do not need a prefix:937938```bash939 scc --count-as-pattern '*_spec.rb:Ruby Spec:Ruby'940```941942The above counts every file whose path matches the glob `*_spec.rb` as a new `Ruby Spec` category, counted using the Ruby943rules. The original Ruby files are unaffected and remain in the `Ruby` row. Globs support `*` (any characters) and `?`944(single character) and are matched as a full match against the path.945946For more control you can opt into a regular expression with the `re:` prefix, which is matched anywhere in the path (use `^`947and `$` to anchor it yourself). You can also write `glob:` explicitly if you prefer:948949```bash950 scc --count-as-pattern 're:\.test\.js$:JavaScript Tests:JavaScript'951```952953Glob and regex are kept as separate modes rather than being inferred, because the same pattern can be valid in both with954different meaning (for example `foo.rb` matches only `foo.rb` as a glob, but also `fooXrb` as a regex), so guessing the engine955could silently match the wrong files.956957The flag is repeatable, with the first matching rule winning:958959```bash960 scc --count-as-pattern 'glob:*_spec.rb:Ruby Spec:Ruby' --count-as-pattern 'glob:*.test.js:JavaScript Tests:JavaScript'961```962963The pattern is matched against the path exactly as supplied to `scc`, with no normalisation, so on Windows you must account964for the path separators yourself. A rule with an unknown base language, an invalid pattern, or missing fields is reported on965stderr and skipped.966967If you want to break a monorepo down by sub-project directory, run `scc` once per directory and combine the results yourself968using the `csv`, `json`, or `sql` output formats.969970### Output Formats971972By default `scc` will output to the console. However, you can produce output in other formats if you require.973974The different options are `tabular, wide, json, csv, csv-stream, cloc-yaml, html, html-table, sql, sql-insert, openmetrics`.975976Note that you can write `scc` output to disk using the `-o, --output` option. This allows you to specify a file to977write your output to. For example `scc -f html -o output.html` will run `scc` against the current directory, and output978the results in html to the file `output.html`.979980You can also write to multiple output files, or multiple types to stdout if you want using the `--format-multi` option. This is981most useful when working in CI/CD systems where you want HTML reports as an artifact while also displaying the counts in stdout.982983```bash984scc --format-multi "tabular:stdout,html:output.html,csv:output.csv"985```986987The above will run against the current directory, outputting to standard output the default output, as well as writing988to output.html and output.csv with the appropriate formats.989990#### Tabular991992This is the default output format when scc is run.993994#### Wide995996Wide produces some additional information which is the complexity/lines metric. This can be useful when trying to997identify the most complex file inside a project based on the complexity estimate.998999#### JSON10001001JSON produces JSON output. Mostly designed to allow `scc` to feed into other programs.10021003Note that this format will give you the byte size of every file `scc` reads allowing you to get a breakdown of the1004number of bytes processed.10051006#### CSV10071008CSV as an option is good for importing into a spreadsheet for analysis.10091010Note that this format will give you the byte size of every file `scc` reads allowing you to get a breakdown of the1011number of bytes processed. Also note that CSV respects `--by-file` and as such will return a summary by default.10121013#### CSV-Stream10141015csv-stream is an option useful for processing very large repositories where you are likely to run into memory issues. It's output format is 100% the same as CSV.10161017Note that you should not use this with the `format-multi` option as it will always print to standard output, and because of how it works will negate the memory saving it normally gains.1018savings that this option provides. Note that there is no sort applied with this option.10191020#### cloc-yaml10211022Is a drop in replacement for cloc using its yaml output option. This is quite often used for passing into other1023build systems and can help with replacing cloc if required.10241025```text1026$ scc -f cloc-yml processor1027# https://github.com/boyter/scc/1028header:1029 url: https://github.com/boyter/scc/1030 version: 2.11.01031 elapsed_seconds: 0.0081032 n_files: 211033 n_lines: 65621034 files_per_second: 26251035 lines_per_second: 8202501036Go:1037 name: Go1038 code: 51861039 comment: 2731040 blank: 11031041 nFiles: 211042SUM:1043 code: 51861044 comment: 2731045 blank: 11031046 nFiles: 2110471048$ cloc --yaml processor1049 21 text files.1050 21 unique files.1051 0 files ignored.10521053---1054# http://cloc.sourceforge.net1055header :1056 cloc_url : http://cloc.sourceforge.net1057 cloc_version : 1.601058 elapsed_seconds : 0.1969728469848631059 n_files : 211060 n_lines : 65621061 files_per_second : 106.6136796084071062 lines_per_second : 33314.23645668411063Go:1064 nFiles: 211065 blank: 11371066 comment: 6061067 code: 48191068SUM:1069 blank: 11371070 code: 48191071 comment: 6061072 nFiles: 211073```10741075#### HTML and HTML-TABLE10761077The HTML output options produce a minimal html report using a table that is either standalone `html` or as just a table `html-table`1078which can be injected into your own HTML pages. The only difference between the two is that the `html` option includes1079html head and body tags with minimal styling.10801081The markup is designed to allow your own custom styles to be applied. An example report1082[is here to view](SCC-OUTPUT-REPORT.html).10831084Note that the HTML options follow the command line options, so you can use `scc --by-file -f html` to produce a report with every1085file and not just the summary.10861087Note that this format if it has the `--by-file` option will give you the byte size of every file `scc` reads allowing you to get a breakdown of the1088number of bytes processed.10891090#### SQL and SQL-Insert10911092The SQL output format "mostly" compatible with cloc's SQL output format <https://github.com/AlDanial/cloc#sql->10931094While all queries on the cloc documentation should work as expected, you will not be able to append output from `scc` and `cloc` into the same database. This is because the table format is slightly different1095to account for scc including complexity counts and bytes.10961097The difference between `sql` and `sql-insert` is that `sql` will include table creation while the latter will only have the insert commands.10981099Usage is 100% the same as any other `scc` command but sql output will always contain per file details. You can compute totals yourself using SQL, however COCOMO calculations will appear against the metadata table as the columns `estimated_cost` `estimated_schedule_months` and `estimated_people`.11001101The below will run scc against the current directory, name the output as the project scc and then pipe the output to sqlite to put into the database code.db11021103```bash1104scc --format sql --sql-project scc . | sqlite3 code.db1105```11061107Assuming you then wanted to append another project11081109```bash1110scc --format sql-insert --sql-project redis . | sqlite3 code.db1111```11121113You could then run SQL against the database,11141115```bash1116sqlite3 code.db 'select project,file,max(nCode) as nL from t1117 group by project order by nL desc;'1118```11191120See the cloc documentation for more examples.11211122#### OpenMetrics11231124[OpenMetrics](https://openmetrics.io/) is a metric reporting format specification extending the Prometheus exposition text format.11251126The produced output is natively supported by [Prometheus](https://prometheus.io/) and [GitLab CI](https://docs.gitlab.com/ee/ci/testing/metrics_reports.html)11271128Note that OpenMetrics respects `--by-file` and as such will return a summary by default.11291130The output includes a metadata header containing definitions of the returned metrics:11311132```text1133# TYPE scc_files count1134# HELP scc_files Number of sourcecode files.1135# TYPE scc_lines count1136# UNIT scc_lines lines1137# HELP scc_lines Number of lines.1138# TYPE scc_code count1139# HELP scc_code Number of lines of actual code.1140# TYPE scc_comments count1141# HELP scc_comments Number of comments.1142# TYPE scc_blanks count1143# HELP scc_blanks Number of blank lines.1144# TYPE scc_complexity count1145# HELP scc_complexity Code complexity.1146# TYPE scc_bytes count1147# UNIT scc_bytes bytes1148# HELP scc_bytes Size in bytes.1149```11501151The header is followed by the metric data in either language summary form:11521153```text1154scc_files{language="Go"} 11155scc_lines{language="Go"} 10001156scc_code{language="Go"} 10001157scc_comments{language="Go"} 10001158scc_blanks{language="Go"} 10001159scc_complexity{language="Go"} 10001160scc_bytes{language="Go"} 10001161```11621163or, if `--by-file` is present, in per file form:11641165```text1166scc_lines{language="Go",file="./bbbb.go"} 10001167scc_code{language="Go",file="./bbbb.go"} 10001168scc_comments{language="Go",file="./bbbb.go"} 10001169scc_blanks{language="Go",file="./bbbb.go"} 10001170scc_complexity{language="Go",file="./bbbb.go"} 10001171scc_bytes{language="Go",file="./bbbb.go"} 10001172```11731174### Performance11751176Generally `scc` will the fastest code counter compared to any I am aware of and have compared against. The below comparisons are taken from the fastest alternative counters. See `Other similar projects` above to see all of the other code counters compared against. It is designed to scale to as many CPU's cores as you can provide.11771178However, if you want greater performance and you have RAM to spare you can disable the garbage collector like the following on Linux `GOGC=-1 scc .` which should speed things up considerably. For some repositories turning off the code complexity calculation via `-c` can reduce runtime as well.11791180Benchmarks are run on fresh 32 Core CPU Optimised Vultr Ocean Virtual Machine 2026/03/05 all done using [hyperfine](https://github.com/sharkdp/hyperfine).11811182See <https://github.com/boyter/scc/blob/master/benchmark.sh> to see how the benchmarks are run.11831184#### Valkey <https://github.com/valkey-io/valkey>11851186```shell1187Benchmark 1: scc valkey1188 Time (mean ± σ): 27.7 ms ± 2.1 ms [User: 175.7 ms, System: 87.0 ms]1189 Range (min … max): 23.1 ms … 32.1 ms 96 runs1190 1191Benchmark 2: scc -c valkey1192 Time (mean ± σ): 23.0 ms ± 1.5 ms [User: 131.7 ms, System: 84.0 ms]1193 Range (min … max): 19.5 ms … 31.4 ms 130 runs1194 1195Benchmark 3: tokei valkey1196 Time (mean ± σ): 74.0 ms ± 13.0 ms [User: 394.2 ms, System: 245.1 ms]1197 Range (min … max): 49.1 ms … 92.5 ms 37 runs1198 1199Benchmark 4: polyglot valkey1200 Time (mean ± σ): 41.1 ms ± 1.2 ms [User: 54.2 ms, System: 103.3 ms]1201 Range (min … max): 37.5 ms … 47.0 ms 69 runs1202 1203Summary1204 scc -c valkey ran1205 1.20 ± 0.12 times faster than scc valkey1206 1.78 ± 0.13 times faster than polyglot valkey1207 3.21 ± 0.61 times faster than tokei valkey1208```12091210#### CPython <https://github.com/python/cpython>12111212```shell1213Benchmark 1: scc cpython1214 Time (mean ± σ): 80.8 ms ± 2.6 ms [User: 751.1 ms, System: 265.6 ms]1215 Range (min … max): 75.7 ms … 87.4 ms 36 runs1216 1217Benchmark 2: scc -c cpython1218 Time (mean ± σ): 70.5 ms ± 2.4 ms [User: 592.6 ms, System: 254.7 ms]1219 Range (min … max): 66.2 ms … 77.6 ms 40 runs1220 1221Benchmark 3: tokei cpython1222 Time (mean ± σ): 450.2 ms ± 36.1 ms [User: 1822.0 ms, System: 1246.9 ms]1223 Range (min … max): 378.6 ms … 491.2 ms 10 runs1224 1225Benchmark 4: polyglot cpython1226 Time (mean ± σ): 149.9 ms ± 5.8 ms [User: 199.2 ms, System: 326.2 ms]1227 Range (min … max): 138.3 ms … 164.1 ms 19 runs1228 1229Summary1230 scc -c cpython ran1231 1.15 ± 0.05 times faster than scc cpython1232 2.13 ± 0.11 times faster than polyglot cpython1233 6.39 ± 0.56 times faster than tokei cpython1234```12351236#### Linux Kernel <https://github.com/torvalds/linux>12371238```shell1239Benchmark 1: scc linux1240 Time (mean ± σ): 907.2 ms ± 17.1 ms [User: 13764.7 ms, System: 2957.0 ms]1241 Range (min … max): 878.2 ms … 925.0 ms 10 runs1242 1243Benchmark 2: scc -c linux1244 Time (mean ± σ): 842.5 ms ± 17.2 ms [User: 9363.3 ms, System: 2977.0 ms]1245 Range (min … max): 819.4 ms … 874.0 ms 10 runs1246 1247Benchmark 3: tokei linux1248 Time (mean ± σ): 1.422 s ± 0.089 s [User: 13.292 s, System: 9.582 s]1249 Range (min … max): 1.176 s … 1.471 s 10 runs1250 1251Benchmark 4: polyglot linux1252 Time (mean ± σ): 1.862 s ± 0.046 s [User: 3.802 s, System: 3.543 s]1253 Range (min … max): 1.800 s … 1.935 s 10 runs1254 1255Summary1256 scc -c linux ran1257 1.08 ± 0.03 times faster than scc linux1258 1.69 ± 0.11 times faster than tokei linux1259 2.21 ± 0.07 times faster than polyglot linux1260```12611262#### Sourcegraph <https://github.com/SINTEF/sourcegraph.git>12631264Sourcegraph has gone dark since I last ran these benchmarks hence using a clone taken before this occured.1265The reason for this is to track what appears to be a performance regression in tokei.12661267```shell1268Benchmark 1: scc sourcegraph1269 Time (mean ± σ): 108.2 ms ± 3.5 ms [User: 559.4 ms, System: 323.6 ms]1270 Range (min … max): 100.5 ms … 115.9 ms 26 runs1271 1272Benchmark 2: scc -c sourcegraph1273 Time (mean ± σ): 99.7 ms ± 4.2 ms [User: 503.1 ms, System: 316.8 ms]1274 Range (min … max): 91.4 ms … 109.4 ms 29 runs1275 1276Benchmark 3: tokei sourcegraph1277 Time (mean ± σ): 21.359 s ± 1.025 s [User: 57.252 s, System: 411.480 s]1278 Range (min … max): 19.371 s … 22.741 s 10 runs1279 1280Benchmark 4: polyglot sourcegraph1281 Time (mean ± σ): 135.1 ms ± 5.0 ms [User: 198.6 ms, System: 543.7 ms]1282 Range (min … max): 126.0 ms … 144.8 ms 21 runs1283 1284Summary1285 scc -c sourcegraph ran1286 1.08 ± 0.06 times faster than scc sourcegraph1287 1.36 ± 0.08 times faster than polyglot sourcegraph1288 214.26 ± 13.64 times faster than tokei sourcegraph1289```12901291If you enable duplicate detection expect performance to fall by about 20% in `scc`.12921293Performance is tracked for some releases and presented below.12941295[]1296The decrease in performance from the 3.3.0 release was due to accurate .gitignore, .ignore and .gitmodule support.1297Current work is focussed on resolving this.12981299### CI/CD Support13001301Some CI/CD systems which will remain nameless do not work very well with the box-lines used by `scc`. To support those systems better there is an option `--ci` which will change the default output to ASCII only.13021303```text1304$ scc --ci main.go1305-------------------------------------------------------------------------------1306Language Files Lines Blanks Comments Code Complexity1307-------------------------------------------------------------------------------1308Go 1 272 7 6 259 41309-------------------------------------------------------------------------------1310Total 1 272 7 6 259 41311-------------------------------------------------------------------------------1312Estimated Cost to Develop $6,5391313Estimated Schedule Effort 2.268839 months1314Estimated People Required 0.3414371315-------------------------------------------------------------------------------1316Processed 5674 bytes, 0.006 megabytes (SI)1317-------------------------------------------------------------------------------1318```13191320The `--format-multi` option is especially useful in CI/CD where you want to get multiple output formats useful for storage or reporting.13211322### Development13231324If you want to hack away feel free! PR's are accepted. Some things to keep in mind. If you want to change a language definition you need to update `languages.json` and then run `go generate` which will convert it into the `processor/constants.go` file.13251326For all other changes ensure you run all tests before submitting. You can do so using `go test ./...`. However, for maximum coverage please run `test-all.sh` which will run `gofmt`, unit tests, race detector and then all of the integration tests. All of those must pass to ensure a stable release.13271328### API Support13291330The core part of `scc` which is the counting engine is exposed publicly to be integrated into other Go applications. See <https://github.com/pinpt/ripsrc> for an example of how to do this.13311332It also powers all of the code calculations displayed in <https://searchcode.com/> such as <https://searchcode.com/file/169350674/main.go/> making it one of the more used code counters in the world.13331334However as a quick start consider the following,13351336Note that you must pass in the number of bytes in the content in order to ensure it is counted!13371338```go1339package main13401341import (1342 "fmt"1343 "io/ioutil"13441345 "github.com/boyter/scc/v3/processor"1346)13471348type statsProcessor struct{}13491350func (p *statsProcessor) ProcessLine(job *processor.FileJob, currentLine int64, lineType processor.LineType) bool {1351 switch lineType {1352 case processor.LINE_BLANK:1353 fmt.Println(currentLine, "lineType", "BLANK")1354 case processor.LINE_CODE:1355 fmt.Println(currentLine, "lineType", "CODE")1356 case processor.LINE_COMMENT:1357 fmt.Println(currentLine, "lineType", "COMMENT")1358 }1359 return true1360}13611362func main() {1363 bts, _ := ioutil.ReadFile("somefile.go") 1364 t := &statsProcessor{}1365 filejob := &processor.FileJob{1366 Filename: "test.go",1367 Language: "Go",1368 Content: bts,1369 Callback: t,1370 Bytes: int64(len(bts)),1371 } 1372 processor.ProcessConstants() // Required to load the language information and need only be done once1373 processor.CountStats(filejob)1374}1375```13761377#### Per-Byte Content Classification13781379For library consumers who need finer granularity than per-line classification, `scc` supports opt-in per-byte content classification. When enabled, `CountStats` populates a byte slice classifying every byte in the file as code, comment, string, or blank. This is useful for stripping comments from source files, extracting only comments, or building syntax-aware tools without reimplementing language parsing.13801381To enable it, set `ClassifyContent: true` on the `FileJob` before calling `CountStats`. When disabled (the default), there is zero performance impact.13821383```go1384package main13851386import (1387 "fmt"1388 "os"13891390 "github.com/boyter/scc/v3/processor"1391)13921393func main() {1394 processor.ProcessConstants()13951396 bts, _ := os.ReadFile("main.go")1397 filejob := &processor.FileJob{1398 Filename: "main.go",1399 Language: "Go",1400 Content: bts,1401 Bytes: int64(len(bts)),1402 ClassifyContent: true, // Enable per-byte classification1403 }1404 processor.CountStats(filejob)14051406 // ContentByteType has one entry per byte with values:1407 // processor.ByteTypeBlank (0) - blank lines / leading whitespace1408 // processor.ByteTypeCode (1) - code1409 // processor.ByteTypeComment (2) - comments (including docstrings)1410 // processor.ByteTypeString (3) - string literals14111412 // Example: extract only code, replacing everything else with spaces1413 codeOnly := filejob.FilterContentByType(processor.ByteTypeCode)1414 fmt.Println(string(codeOnly))14151416 // Example: extract only comments1417 commentsOnly := filejob.FilterContentByType(processor.ByteTypeComment)1418 fmt.Println(string(commentsOnly))14191420 // Example: keep both code and strings, strip comments1421 noComments := filejob.FilterContentByType(processor.ByteTypeCode, processor.ByteTypeString)1422 fmt.Println(string(noComments))1423}1424```14251426`FilterContentByType` returns a copy of the content with non-matching bytes replaced by spaces. Newlines are always preserved regardless of type, so the output maintains the same line structure as the original file. It returns `nil` if classification was not enabled.14271428Note that at syntax marker boundaries (e.g., `//`, `/*`, `"`), the first byte of the marker may be classified as the preceding state. This is a 1-byte approximation that is acceptable for content filtering use cases.14291430### MCP Server Mode14311432`scc` can run as an [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server over stdio, allowing LLM tools like Claude Desktop, Claude Code, Cursor, and others to use it as a code analysis tool.14331434```shell1435scc --mcp1436```14371438#### Claude Code Configuration14391440Run in your terminal for the current project:14411442```shell1443claude mcp add scc -- scc --mcp1444```14451446Or globally for all projects:14471448```shell1449claude mcp add scc --scope user -- scc --mcp1450```14511452Alternatively, add to your `.mcp.json`:14531454```json1455{1456 "mcpServers": {1457 "scc": {1458 "command": "scc",1459 "args": ["--mcp"]1460 }1461 }1462}1463```14641465#### Claude Desktop Configuration14661467Add to your `claude_desktop_config.json`:14681469```json1470{1471 "mcpServers": {1472 "scc": {1473 "command": "/path/to/scc",1474 "args": ["--mcp"]1475 }1476 }1477}1478```14791480#### Exposed Tools14811482The MCP server exposes one tool:14831484**`analyze`** - Count lines of code, comments, blanks and estimate complexity for a project directory or file.14851486| Parameter | Type | Required | Description |1487|---|---|---|---|1488| `path` | string | no | Directory or file path to analyze. Defaults to current directory. |1489| `sort` | string | no | Column to sort by: `files`, `name`, `lines`, `blanks`, `code`, `comments`, `complexity`, `bytes`. Default: `files`. |1490| `by_file` | boolean | no | If true, return per-file results instead of per-language summary. |1491| `include_ext` | string | no | Comma-separated file extensions to include (e.g. `go,java,js`). |1492| `exclude_ext` | string | no | Comma-separated file extensions to exclude (e.g. `json,xml`). |1493| `no_duplicates` | boolean | no | Remove duplicate files from stats. |1494| `no_min_gen` | boolean | no | Ignore minified or generated files. |1495| `locomo` | boolean | no | Include LOCOMO (LLM cost) estimation in results. |1496| `locomo_preset` | string | no | LOCOMO model preset: `large`, `medium`, `small`, `local`. Default: `medium`. |14971498Results are returned as JSON with per-language breakdown (files, lines, code, comments, blanks, complexity, bytes), totals, and COCOMO cost/schedule estimates. When `locomo` is enabled, LOCOMO estimates (token counts, cost, generation time, review hours) are also included.14991500### Adding/Modifying Languages15011502To add or modify a language you will need to edit the `languages.json` file in the root of the project, and then run `go generate` to build it into the application. You can then `go install` or `go build` as normal to produce the binary with your modifications.15031504### Issues15051506Its possible that you may see the counts vary between runs. This usually means one of two things. Either something is changing or locking the files under scc, or that you are hitting ulimit restrictions. To change the ulimit see the following links.15071508- <https://superuser.com/questions/261023/how-to-change-default-ulimit-values-in-mac-os-x-10-6#306555>1509- <https://unix.stackexchange.com/questions/108174/how-to-persistently-control-maximum-system-resource-consumption-on-mac/221988#221988>1510- <https://access.redhat.com/solutions/61334>1511- <https://serverfault.com/questions/356962/where-are-the-default-ulimit-values-set-linux-centos>1512- <https://www.tecmint.com/increase-set-open-file-limits-in-linux/>15131514To help identify this issue run scc like so `scc -v .` and look for the message `too many open files` in the output. If it is there you can rectify it by setting your ulimit to a higher value.15151516### Low Memory15171518If you are running `scc` in a low memory environment < 512 MB of RAM you may need to set `--file-gc-count` to a lower value such as `0` to force the garbage collector to be on at all times.15191520A sign that this is required will be `scc` crashing with panic errors.15211522### Tests15231524scc is pretty well tested with many unit, integration and benchmarks to ensure that it is fast and complete.15251526### Package15271528Packaging as of version v3.1.0 is done through <https://goreleaser.com/>15291530### Containers15311532Note if you plan to run `scc` in Alpine containers you will need to build with CGO_ENABLED=0.15331534See the below Dockerfile as an example on how to achieve this based on this issue <https://github.com/boyter/scc/issues/208>15351536```Dockerfile1537FROM golang as scc-get15381539ENV GOOS=linux \1540GOARCH=amd64 \1541CGO_ENABLED=015421543ARG VERSION1544RUN git clone --branch $VERSION --depth 1 https://github.com/boyter/scc1545WORKDIR /go/scc1546RUN go build -ldflags="-s -w"15471548FROM alpine1549COPY --from=scc-get /go/scc/scc /bin/1550ENTRYPOINT ["scc"]1551```15521553### Badges15541555You can use `scc` to provide badges on your github/bitbucket/gitlab/sr.ht/codeberg open repositories. For example, [](https://github.com/boyter/scc/)1556 The format to do so is,15571558<https://sloc.xyz/PROVIDER/USER/REPO>15591560An example of the badge for `scc` is included below, and is used on this page.15611562```Markdown1563[](https://github.com/boyter/scc/)1564```15651566By default the badge will show the repo's lines count. You can also specify for it to show a different category, by using the `?category=` query string.15671568Valid values include `code, blanks, lines, comments, cocomo, effort` and examples of the appearance are included below.15691570[](https://github.com/boyter/scc/)1571[](https://github.com/boyter/scc/)1572[](https://github.com/boyter/scc/)1573[](https://github.com/boyter/scc/)1574[](https://github.com/boyter/scc/)1575[](https://github.com/boyter/scc/)15761577For `cocomo` you can also set the `avg-wage` value similar to `scc` itself. For example,15781579<https://sloc.xyz/github/boyter/scc/?category=cocomo&avg-wage=1>1580<https://sloc.xyz/github/boyter/scc/?category=cocomo&avg-wage=100000>15811582Note that the avg-wage value must be a positive integer otherwise it will revert back to the default value of 56286.15831584You can also configure the look and feel of the badge using the following parameters,15851586- ?lower=true will lower the title text, so "Total lines" would be "total lines"15871588The below can control the colours of shadows, fonts and badges. Colors can be specified as either hex codes or named colors (similar to shields.io):15891590- ?font-color=fff1591- ?font-shadow-color=0101011592- ?top-shadow-accent-color=bbb1593- ?title-bg-color=5551594- ?badge-bg-color=4c115951596##### Named Colors15971598For convenience, you can use named colors instead of hex codes. The following named colors are supported:15991600**Shields.io colors:** `brightgreen`, `green`, `yellowgreen`, `yellow`, `orange`, `red`, `blue`, `lightgrey`, `blueviolet`16011602**Semantic aliases:** `success`, `important`, `critical`, `informational`, `inactive`16031604**CSS colors:** `white`, `black`, `silver`, `gray`, `maroon`, `purple`, `fuchsia`, `lime`, `olive`, `navy`, `teal`, `aqua`, `cyan`, `magenta`, `pink`, `coral`, `salmon`, `gold`, `khaki`, `violet`, `indigo`, `crimson`, `turquoise`, `tan`, `brown`, and many more standard CSS color names.16051606For example, instead of `?badge-bg-color=007ec6` you can use `?badge-bg-color=blue`.16071608An example of using some of these parameters to produce an admittedly ugly result16091610[](https://github.com/boyter/scc/)16111612An example using named colors for as a slightly nicer result16131614[](https://github.com/boyter/scc/)16151616*NB* it may not work for VERY large repositories (has been tested on Apache hadoop/spark without issue).16171618You can find the source code for badges in the repository at <https://github.com/boyter/scc/blob/master/cmd/badges/main.go>16191620#### A example for each supported provider16211622- Github - <https://sloc.xyz/github/boyter/scc/>1623- sr.ht - <https://sloc.xyz/sr.ht/~nektro/magnolia-desktop/>1624- Bitbucket - <https://sloc.xyz/bitbucket/boyter/decodingcaptchas>1625- Gitlab - <https://sloc.xyz/gitlab/esr/loccount>1626- Codeberg - <https://sloc.xyz/codeberg/NextBroomTeam/NextBroom>16271628### Languages16291630List of supported languages. The master version of `scc` supports 322 languages at last count. Note that this is always assumed that you built from master, and it might trail behind what is actually supported. To see what your version of `scc` supports run `scc --languages`16311632[Click here to view all languages supported by master](LANGUAGES.md)16331634### Citation16351636Please use the following Bib**La**TeX entry to cite scc in a publication:16371638```bib1639@Software{scc,1640 author = {Ben Boyter and {Contributors}},1641 title = {scc},1642 version = {vx.y.z},1643 year = {...},1644 month = {...},1645 repository = {https://github.com/boyter/scc},1646}1647```16481649You may need to check the release page <https://github.com/boyter/scc/releases> to find the correct year and month for the release you are using.16501651### Release Checklist16521653- Update version1654- Push code with release number1655- Tag off1656- Release via goreleaser1657- Update dockerfile
Findings
✓ No findings reported for this file.