Skip to content

Instantly share code, notes, and snippets.

@sminnee
Created September 19, 2023 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sminnee/b134819d7cf9608f2c9f070147718a9a to your computer and use it in GitHub Desktop.
Save sminnee/b134819d7cf9608f2c9f070147718a9a to your computer and use it in GitHub Desktop.
Example of a script that calls cloc on a codebase to get a useful result
cloc --exclude-dir=node_modules,migrations,build,.mypy_cache --fullpath --not-match-d=server/app/static --not-match-f=package-lock.json --exclude-ext=csv,svg .
echo "
---- TESTS ONLY (INLCUDED IN ABOVE) ----
"
cloc --exclude-dir=node_modules,migrations,build,.mypy_cache --fullpath --not-match-d=server/app/static --match-f="(tests/)|(test_[^/]*.py)|(\.test\.ts)|(\.cy\.ts)" .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment