Skip to content

Commit

Permalink
Make check_raise show more suspicious places
Browse files Browse the repository at this point in the history
  • Loading branch information
toton committed Dec 9, 2011
1 parent 93f86eb commit 3567290
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions check_raise
Expand Up @@ -19,13 +19,12 @@ setminus() {
diff --new-line-format= --unchanged-line-format= $1 $2
}

# Look for mistakes
# Capitalized Raise should be rare
header "Interesting places:" \
grep -n Raise *

header "@raises instead of @raise:" \
grep -n @raises *

header Typos: \
grep -n "\(Invalid_arg[[:space:]]\|Invald_argument\)" `find . -not -name batDynArray\*`
#header "Needs source style:" \
# grep -n "Invalid_argument[[:space:]]\"" *.mli

use_raise=$(mktemp)
doc_raise=$(mktemp)
Expand All @@ -42,10 +41,20 @@ setminus $use_raise $doc_raise >$suspicious
need_doc=$(mktemp)
setminus $suspicious $poor_doc_raise >$need_doc

echo "The following modules need raised exceptions to be documented (quite likely):"
cat $need_doc
echo
header "Documentation of the following modules mentions exceptions and awaits formal @raise clauses:" \
setminus $suspicious $need_doc

header "The following modules need raised exceptions to be documented (quite likely):" \
cat $need_doc

# Look for mistakes

header "@raises instead of @raise:" \
grep -n @raises *

echo Documentation of the following modules mentions exceptions and awaits formal @raise clauses:
setminus $suspicious $need_doc
header Typos: \
grep -n "Invalid_arg[[:space:]]" `find . -not -name batDynArray\*`

header Typos: \
grep -n Invald_argument *

0 comments on commit 3567290

Please sign in to comment.