# HG changeset patch # User Christian Urban # Date 1598630089 -3600 # Node ID e9d5287c310741640a9f161c55f0df753e5839d1 # Parent 9eeab89d0671c0f25165371c4aedd5a01615ceb2 updated diff -r 9eeab89d0671 -r e9d5287c3107 README --- 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 ====================== diff -r 9eeab89d0671 -r e9d5287c3107 cws/cw05.pdf Binary file cws/cw05.pdf has changed diff -r 9eeab89d0671 -r e9d5287c3107 misc/sf --- /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 + + + diff -r 9eeab89d0671 -r e9d5287c3107 misc/smeta.sc --- /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 diff -r 9eeab89d0671 -r e9d5287c3107 misc/wt --- /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 + +