2025-03-14 21:59:59 -06:00
|
|
|
# cloc
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
> Count lines of code.
|
|
|
|
|
> More information: <https://github.com/AlDanial/cloc#options->.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Count all the lines of code in a directory:
|
|
|
|
|
|
|
|
|
|
`cloc {{path/to/directory}}`
|
|
|
|
|
|
|
|
|
|
- Compare 2 directory structures and count the differences between them:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`cloc --diff {{path/to/directory1}} {{path/to/directory2}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Ignore files that are ignored by VCS, such as files specified in `.gitignore`:
|
|
|
|
|
|
|
|
|
|
`cloc --vcs git {{path/to/directory}}`
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
- Display the results for each file instead of each language:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`cloc --by-file {{path/to/directory}}`
|