7 # lookfor ( $1=what, $2=reason, $3=source module exception )
10 darcs query manifest
--repodir="$ROOT" |
grep '\.l\?hs$' |
while read f
; do
11 grep -FHnwe "$1" "$ROOT/$f" |
grep -v "$3\.$1" | \
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!" \
29 B
# importing readFile from Data.ByteString as B, is allowed
31 lookfor hGetContents \
32 "hGetContents doesn't ensure the file is closed before it is deleted!"
34 # look for tabs in haskell source
36 darcs query manifest
--repodir="$ROOT" |
grep '\.l\?hs$' |
while read f
; do
37 grep -FHnwe " " "$ROOT/$f" >> "$RESULT"
39 if [ -s "$RESULT" ]; then
40 echo "Found the following lines with unwanted tabs:"
41 # ugly sed expresion to fix relative paths; think pretty cat
42 sed -e 's/[^:]*\/\.\///' "$RESULT"