7 # lookfor ( $1=what, $2=reason )
10 darcs query manifest
--repodir="$ROOT" |
grep '\.l\?hs$' |
while read f
; do
11 grep -FHnwe "$1" "$ROOT/$f" | \
12 grep -v ":[0-9]\+:import " |
grep -Fv "ratify $1: " >> "$RESULT"
14 if [ -s "$RESULT" ]; then
15 echo "Found the following unratified uses of $1:"
16 # ugly sed expresion to fix relative paths; think pretty cat
17 sed -e 's/[^:]*\/\.\///' "$RESULT"
19 echo "Comment 'ratify $1: <why>' on the same line to allow it"
28 "readFile doesn't ensure the file is closed before it is deleted!"
30 lookfor hGetContents \
31 "hGetContents doesn't ensure the file is closed before it is deleted!"
33 lookfor HopefullyPrivate \
34 "HopefullyPrivate should not be imported anywhere but Hopefully. It's private!"
36 # look for tabs in haskell source
38 darcs query manifest
--repodir="$ROOT" |
grep '\.l\?hs$' |
while read f
; do
39 grep -FHnwe " " "$ROOT/$f" >> "$RESULT"
41 if [ -s "$RESULT" ]; then
42 echo "Found the following lines with unwanted tabs:"
43 # ugly sed expresion to fix relative paths; think pretty cat
44 sed -e 's/[^:]*\/\.\///' "$RESULT"