diff --git a/Makefile b/Makefile index 40419c1..53fa369 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ TESTS:= \ CamelCase \ Parentheses \ +export OOC_LINE_LENGTH=120 all: prove --exec="rock -r -sourcepath=../ooc-codingstd/source" $(TESTS) diff --git a/source/LineLength.ooc b/source/LineLength.ooc index be5dc93..00ce068 100644 --- a/source/LineLength.ooc +++ b/source/LineLength.ooc @@ -1,10 +1,12 @@ import io/FileReader +import os/Env import os/Process import structs/ArrayList import text/StringTokenizer -MAX := const 132 +var := Env get("OOC_LINE_LENGTH") +MAX := const (var != null) ? var toInt() : 132 main: func(args: ArrayList) { progname := args removeAt(0)