Skip to content

Commit

Permalink
Exclude manually verified modules from the report of check_raise
Browse files Browse the repository at this point in the history
  • Loading branch information
toton committed Dec 9, 2011
1 parent 7215e15 commit 477cdc5
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions check_raise
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,17 +27,35 @@ header "Interesting places:" \
#header "Needs source style:" \ #header "Needs source style:" \
# grep -n "Invalid_argument[[:space:]]\"" *.mli # grep -n "Invalid_argument[[:space:]]\"" *.mli


# Modules known to have documentation of exceptions OK
already_ok=$(mktemp)
echo "
batteriesHelp
batStack
batSplay
batReturn
batRef
batRandom
batQueue
batDeque
batConcurrent
batCharParser
" | sort >$already_ok

use_raise=$(mktemp) use_raise=$(mktemp)
doc_raise=$(mktemp) doc_raise=$(mktemp)
poor_doc_raise=$(mktemp) poor_doc_raise=$(mktemp)
to_be_verified=$(mktemp)


# Crude check for presence of exceptions in implementations and interfaces # Crude check for presence of exceptions in implementations and interfaces
grep -n "\(raise\|invalid_arg\|failwith\)" *.ml | cut -f1 -d. | uniq >$use_raise grep -n "\(raise\|invalid_arg\|failwith\)" *.ml | cut -f1 -d. | uniq | sort >$use_raise
grep -n @raise *.mli | cut -f1 -d. | uniq >$doc_raise grep -n @raise *.mli | cut -f1 -d. | uniq | sort >$doc_raise
grep -n raise *.mli | cut -f1 -d. | uniq >$poor_doc_raise grep -ni raise *.mli | cut -f1 -d. | uniq | sort >$poor_doc_raise

setminus $use_raise $already_ok >$to_be_verified


suspicious=$(mktemp) suspicious=$(mktemp)
setminus $use_raise $doc_raise >$suspicious setminus $to_be_verified $doc_raise >$suspicious


need_doc=$(mktemp) need_doc=$(mktemp)
setminus $suspicious $poor_doc_raise >$need_doc setminus $suspicious $poor_doc_raise >$need_doc
Expand Down

0 comments on commit 477cdc5

Please sign in to comment.