misc/wt
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 03 Nov 2022 09:55:11 +0000
changeset 431 ef68136b9a96
parent 341 e9d5287c3107
permissions -rwxr-xr-x
updated jars
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
341
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     1
#!/bin/sh
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     2
###set -e
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     3
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     4
trap "exit" INT
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     5
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     6
files=${1:-assignment2019scala-*/Part10}
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     7
name="bf.scala"
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     8
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     9
for sd in $files; do
e9d5287c3107 updated
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
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    11
   ts=$(( $? )) 
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    12
   if [ $ts -ne 0 ]
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    13
   then
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    14
     echo $sd  
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    15
     echo $ts
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    16
   fi  
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    17
done
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    18
e9d5287c3107 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    19