Skip to content

Commit

Permalink
scripts/stats: unsafeCoerces: … | doctests: … | operators: … | module…
Browse files Browse the repository at this point in the history
…s: …
  • Loading branch information
liyang committed Mar 12, 2013
1 parent 34e0a28 commit 1c8a09e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -13,6 +13,7 @@ install:

script:
- $script && hlint src --cpp-define HLINT
- scripts/stats

notifications:
irc:
Expand Down
12 changes: 12 additions & 0 deletions scripts/stats
@@ -0,0 +1,12 @@
#! /bin/bash

g() { git grep --basic-regexp "$@" src | wc -l ; }
cd "$(git rev-parse --show-toplevel)"

unsafe="$(g '\<unsafeCoerce\>')"
doc="$(g -e '--\s\+>>>\s\+[^:]' --and --not -e '--\s\+>>>\s\+\(import\|let\)')"
ops="$(g '^(.\+)\s*::')"
mod="$(find src -name '*.hs' | wc -l)"

echo "unsafeCoerces: $unsafe | doctests: $doc | operators: $ops | modules: $mod"

0 comments on commit 1c8a09e

Please sign in to comment.