-
Notifications
You must be signed in to change notification settings - Fork 39
/
sl
executable file
·26 lines (21 loc) · 817 Bytes
/
sl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /usr/bin/env bash
LAST_DIR="$PWD"
cd "$(dirname "$0")/.." || exit 1
SLOC=$(tool/sloc)
SLOCT=$(tool/sloct)
SLOD=$(tool/slod)
SLODT=$(tool/slodt)
echo "\
lines of code: $SLOC
lines of documentation: $SLOD
lines of code and documentation: $((SLOC + SLOD))
ratio of code to documentation: $(echo "scale=1; $SLOC/$SLOD" | bc)
lines of test code: $SLOCT
lines of test documentation: $SLODT
lines of test code and test documentation: $((SLOCT + SLODT))
ratio of test code to test documentation: $(echo "scale=1; $SLOCT/$SLODT" | bc)
lines of all code: $((SLOC + SLOCT))
lines of all documentation: $((SLOD + SLODT))
lines of all code and all documentation: $((SLOC + SLOD + SLOCT + SLODT))
ratio of all code to all documentation: $(echo "scale=1; $((SLOC + SLOCT))/$((SLOD + SLODT))" | bc)"
cd "$LAST_DIR" || exit 1