Permalink
Browse files
A shell function to count non-comment/blank lines using cloc.
Less than 8500 lines, plus ~300 lines of ASDL schemas.
Unrelated:
- Mark command_.test.sh as green.
- Loading branch information...
Showing
with
16 additions
and
3 deletions.
-
+15
−2
scripts/count.sh
-
+1
−1
test/spec.sh
|
|
@@ -13,6 +13,20 @@ filter-py() { |
|
|
grep -E -v '__init__.py$|_test.py$'
|
|
|
}
|
|
|
|
|
|
oil-core-files() {
|
|
|
{ ls {bin,osh,core}/*.py native/*.c osh/osh.asdl core/runtime.asdl; } |
|
|
|
filter-py | grep -E -v '_gen.py$|test_lib.py'
|
|
|
}
|
|
|
|
|
|
cloc-oil-core() {
|
|
|
oil-core-files | xargs cloc
|
|
|
|
|
|
# cloc doesn't understand ASDL files.
|
|
|
echo
|
|
|
echo 'ASDL SCHEMAS'
|
|
|
wc -l core/runtime.asdl osh/osh.asdl
|
|
|
}
|
|
|
|
|
|
# TODO: Sum up all the support material. It's more than Oil itself! Turn
|
|
|
# everything into an array. An hash table of arrays would be useful here.
|
|
|
all() {
|
|
|
@@ -69,8 +83,7 @@ all() { |
|
|
echo
|
|
|
|
|
|
echo 'OIL'
|
|
|
{ ls {bin,osh,core}/*.py native/*.c osh/osh.asdl core/runtime.asdl; } |
|
|
|
filter-py | grep -E -v '_gen.py$|test_lib.py' |
|
|
|
oil-core-files |
|
|
|
xargs wc -l | sort --numeric
|
|
|
echo
|
|
|
|
|
|
|
|
|
@@ -330,7 +330,7 @@ command-sub() { |
|
|
}
|
|
|
|
|
|
command_() {
|
|
|
sh-spec spec/command_.test.sh --osh-failures-allowed 1 \
|
|
|
sh-spec spec/command_.test.sh \
|
|
|
${REF_SHELLS[@]} $OSH "$@"
|
|
|
}
|
|
|
|
|
|
|
0 comments on commit
5af17e1