--- a/README Wed Aug 26 02:07:46 2020 +0100
+++ b/README Fri Aug 28 16:54:49 2020 +0100
@@ -8,7 +8,17 @@
git clone https://github.com/wartremover/wartremover.git
sbt "++ 2.13.1" core/assembly
+======================
+scalafix
+https://scalacenter.github.io/scalafix/docs/users/installation.html
+https://gabro.github.io/scalafix/docs/installation/cli.html
+
+
+=====================
+bash cheatsheet
+
+https://devhints.io/bash
======================
Binary file cws/cw05.pdf has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/sf Fri Aug 28 16:54:49 2020 +0100
@@ -0,0 +1,35 @@
+#!/bin/sh
+###set -e
+
+trap "exit" INT
+
+function scala_compile {
+ (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala "$1" 2> /dev/null 1> /dev/null)
+}
+
+
+
+files=${1:-assignment2019scala-*/Part10}
+
+name="bf.scala"
+
+for sd in $files; do
+ scalafix -r DisableSyntax --settings.DisableSyntax.noVars=true --settings.DisableSyntax.noReturns=true --settings.DisableSyntax.noWhileLoops=true $sd/$name 2> /dev/null 1> /dev/null
+ ts=$(( $? ))
+ if [ $ts -ne 0 ]
+ then
+ echo $sd
+ echo $ts
+ else
+ if (scala_compile $sd/$name)
+ then
+ ts=$(( 0 ))
+ else
+ echo $sd
+ echo $ts
+ fi
+ fi
+done
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/smeta.sc Fri Aug 28 16:54:49 2020 +0100
@@ -0,0 +1,6 @@
+import $ivy.`org.scalameta::scalameta:4.3.21`
+
+import scala.meta._
+
+println("a + b".parse[Stat].get.structure)
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/wt Fri Aug 28 16:54:49 2020 +0100
@@ -0,0 +1,19 @@
+#!/bin/sh
+###set -e
+
+trap "exit" INT
+
+files=${1:-assignment2019scala-*/Part10}
+name="bf.scala"
+
+for sd in $files; do
+ wartremover -traverser org.wartremover.warts.Return -traverser org.wartremover.warts.Var -traverser org.wartremover.warts.MutableDataStructures $sd/$name 2> /dev/null 1> /dev/null
+ ts=$(( $? ))
+ if [ $ts -ne 0 ]
+ then
+ echo $sd
+ echo $ts
+ fi
+done
+
+