Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add script to print lines of code #4991

Merged
merged 2 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .tokeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
docs
scripts

# aztec_macros is explicitly considered OOS for Noir audit
aztec_macros

# config files
*.toml
*.md
*.json
*.txt
*.config.mjs
33 changes: 33 additions & 0 deletions scripts/count_loc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -eu

# Run relative to repo root
cd $(dirname "$0")/../

if ! command -v "tokei" >/dev/null 2>&1; then
echo "Error: tokei is required but not installed." >&2
echo "Error: Run \`cargo install --git https://github.com/TomAFrench/tokei --branch tf/add-noir-support tokei\`" >&2

exit 1
fi

echo ""
echo "Total:"

tokei ./ --sort code

echo ""
echo "ACIR/ACVM:"
tokei ./acvm-repo --sort code

echo ""
echo "Compiler:"
tokei ./compiler --sort code

echo ""
echo "Tooling:"
tokei ./tooling --sort code

echo ""
echo "Standard Library:"
tokei ./noir_stdlib --sort code
Loading