341
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
1 |
#!/bin/sh
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
2 |
###set -e
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
3 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
4 |
trap "exit" INT
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
5 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
6 |
files=${1:-assignment2019scala-*/Part10}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
7 |
name="bf.scala"
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
8 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
9 |
for sd in $files; do
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
10 |
wartremover -traverser org.wartremover.warts.Return -traverser org.wartremover.warts.Var -traverser org.wartremover.warts.MutableDataStructures $sd/$name 2> /dev/null 1> /dev/null
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
11 |
ts=$(( $? ))
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
12 |
if [ $ts -ne 0 ]
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
13 |
then
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
14 |
echo $sd
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
15 |
echo $ts
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
16 |
fi
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
17 |
done
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
18 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
19 |
|