Repository: Konstantin8105/c4go
Pull request #319 (2019-03-16 10:01:32)

scripts: add neat projects

codecov[bot]: # [Codecov](https://codecov.io/gh/Konstantin8105/c4go/pull/319?src=pr&el=h1) Report
> Merging [#319](https://codecov.io/gh/Konstantin8105/c4go/pull/319?src=pr&el=desc) into [master](https://codecov.io/gh/Konstantin8105/c4go/commit/1366b199df780f78467f5ef25d2ed574c85de2b1?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/Konstantin8105/c4go/pull/319/graphs/tree.svg?width=650&token=esH2rHXlZ2&height=150&src=pr)](https://codecov.io/gh/Konstantin8105/c4go/pull/319?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master     #319   +/-   ##
=======================================
  Coverage   86.39%   86.39%           
=======================================
  Files         184      184           
  Lines       10456    10456           
=======================================
  Hits         9033     9033           
  Misses       1006     1006           
  Partials      417      417
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/Konstantin8105/c4go/pull/319?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/Konstantin8105/c4go/pull/319?src=pr&el=footer). Last update [1366b19...c8b83cc](https://codecov.io/gh/Konstantin8105/c4go/pull/319?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

codecov[bot]: # [Codecov](https://codecov.io/gh/Konstantin8105/c4go/pull/319?src=pr&el=h1) Report
> Merging [#319](https://codecov.io/gh/Konstantin8105/c4go/pull/319?src=pr&el=desc) into [master](https://codecov.io/gh/Konstantin8105/c4go/commit/1366b199df780f78467f5ef25d2ed574c85de2b1?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/Konstantin8105/c4go/pull/319/graphs/tree.svg?width=650&token=esH2rHXlZ2&height=150&src=pr)](https://codecov.io/gh/Konstantin8105/c4go/pull/319?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master     #319   +/-   ##
=======================================
  Coverage   86.39%   86.39%           
=======================================
  Files         184      184           
  Lines       10456    10456           
=======================================
  Hits         9033     9033           
  Misses       1006     1006           
  Partials      417      417
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/Konstantin8105/c4go/pull/319?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/Konstantin8105/c4go/pull/319?src=pr&el=footer). Last update [1366b19...c8b83cc](https://codecov.io/gh/Konstantin8105/c4go/pull/319?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Konstantin8105: See #325

Patch:
diff --git a/main.go b/main.go
index 765976a..641fb06 100644
--- a/main.go
+++ b/main.go
@@ -345,11 +345,6 @@ func generateAstLines(args ProgramArgs) (lines []string, filePP preprocessor.Fil
 		fmt.Fprintln(os.Stdout, "Start tanspiling ...")
 	}
 
-	if os.Getenv("GOPATH") == "" {
-		err = fmt.Errorf("The $GOPATH must be set")
-		return
-	}
-
 	// 1. Compile it first (checking for errors)
 	for _, in := range args.inputFiles {
 		_, err = os.Stat(in)
diff --git a/scripts/neat.sh b/scripts/neat.sh
deleted file mode 100755
index 863bf27..0000000
--- a/scripts/neat.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/bash
-
-set -e
-
-go build
-
-# prepare variables
-	export C4GO_DIR=$GOPATH/src/github.com/Konstantin8105/c4go
-	export C4GO=$C4GO_DIR/c4go
-	export NEAT_TEMP_FOLDER="/tmp/NEAT"
-
-# prepare C code
-    if [ ! -d $NEAT_TEMP_FOLDER ]; then
-		mkdir -p $NEAT_TEMP_FOLDER
-		git clone https://github.com/aligrudi/neateqn.git	$NEAT_TEMP_FOLDER/0
-		sed '90,103d' /tmp/NEAT/0/box.c > /tmp/NEAT/0/box.c
-		git clone https://github.com/aligrudi/neatrefer.git	$NEAT_TEMP_FOLDER/1
-		git clone https://github.com/aligrudi/neatpost.git	$NEAT_TEMP_FOLDER/2
-		sed '19,25d' 	/tmp/NEAT/2/dev.c 		> /tmp/NEAT/2/dev.c
-		sed '24d'    	/tmp/NEAT/2/post.c		> /tmp/NEAT/2/post.c
-		sed '754,756d' 	/tmp/NEAT/2/pdf.c		> /tmp/NEAT/2/pdf.c
-		sed '338,343d'	/tmp/NEAT/2/pdf.c		> /tmp/NEAT/2/pdf.c
-		git clone https://github.com/aligrudi/neatmkfn.git	$NEAT_TEMP_FOLDER/3
-		sed '20,24d'	/tmp/NEAT/3/afm.c		> /tmp/NEAT/3/afm.c
-		git clone https://github.com/aligrudi/neatroff.git	$NEAT_TEMP_FOLDER/4
-		sed '25,31d'	/tmp/NEAT/4/dev.c		> /tmp/NEAT/4/dev.c
-		sed '142,150d'	/tmp/NEAT/4/draw.c		> /tmp/NEAT/4/draw.c
-		sed '135,140d'	/tmp/NEAT/4/draw.c		> /tmp/NEAT/4/draw.c
-	fi
-
-# remove go files from last transpilation
-	echo "***** remove go files"
-	rm -f $NEAT_TEMP_FOLDER/*.go
-	rm -f $NEAT_TEMP_FOLDER/*.app
-
-# transpilation of all projects
-	COUNTER=0
-	for f in $NEAT_TEMP_FOLDER/*; do
-    	if [ -d ${f} ]; then
-			# iteration by C projects
-				echo "***** transpilation folder : $COUNTER"
-        	# Will not run if no directories are available
-				$C4GO transpile -s						\
-					-clang-flag="-DTROFFFDIR=\"MMM\""	\
-					-clang-flag="-DTROFFMDIR=\"WWW\""	\
-					-o="$NEAT_TEMP_FOLDER/$COUNTER.go" $f/*.c
-				let COUNTER=COUNTER+1
-    	fi
-	done
-
-# show warnings comments in Go source
-	echo "***** warnings"
-	WARNINGS=`cat $NEAT_TEMP_FOLDER/*.go | grep "^// Warning" | sort | uniq | wc -l`
-	echo "After transpiling : $WARNINGS warnings."
-
-# show other warnings
-for f in $NEAT_TEMP_FOLDER/*.go ; do
-	# iteration by Go files
-		echo "	file : $f"
-	# show amount error from `go build`:
-		WARNINGS_GO=`go build -o $f.app -gcflags="-e" $f 2>&1 | wc -l`
-		echo "		Go build : $WARNINGS_GO warnings"
-	# amount unsafe
-		UNSAFE=`cat $f | grep unsafe | wc -l`
-		echo "		Unsafe   : $UNSAFE"
-done
-
-
-# Arguments menu
-echo "    -s for show detail of Go build errors"
-if [ "$1" == "-s" ]; then
-	# show go build warnings	
-		for f in $NEAT_TEMP_FOLDER/*.go ; do
-			# iteration by Go files
-				echo "	file : $f"
-			# c4go warnings
-				cat $f | grep "^// Warning" | sort | uniq
-			# show amount error from `go build`:
-				go build -o $f.app -gcflags="-e" $f 2>&1 | sort 
-		done
-fi
diff --git a/scripts/neateqn.sh b/scripts/neateqn.sh
new file mode 100755
index 0000000..9ad98f7
--- /dev/null
+++ b/scripts/neateqn.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+set -e
+
+go build
+
+# prepare variables
+	export C4GO_DIR=$GOPATH/src/github.com/Konstantin8105/c4go
+	export C4GO=$C4GO_DIR/c4go
+	export GIT_SOURCE="https://github.com/aligrudi/neateqn.git"
+	export NAME="neateqn"
+	export TEMP_FOLDER="/tmp/$NAME"
+	export GO_FILE="$TEMP_FOLDER/$NAME.go"
+	export GO_APP="$TEMP_FOLDER/$NAME.app"
+
+# prepare C code
+    if [ ! -d $TEMP_FOLDER ]; then
+		mkdir -p $TEMP_FOLDER
+		git clone $GIT_SOURCE $TEMP_FOLDER
+		sed -i.bak -e '215,233d' /tmp/neateqn/eqn.c
+	fi
+
+# remove go files from last transpilation
+	echo "***** remove go files"
+	rm -f $TEMP_FOLDER/*.go
+	rm -f $TEMP_FOLDER/*.app
+
+# transpilation of all projects
+	echo "Transpile to $GO_FILE"
+	$C4GO transpile                         \
+		-clang-flag="-DTROFFFDIR=\"MMM\""	\
+		-clang-flag="-DTROFFMDIR=\"WWW\""	\
+		-o="$GO_FILE"                       \
+		$TEMP_FOLDER/*.c
+
+# show warnings comments in Go source
+	echo "Calculate warnings in file: $GO_FILE"
+	WARNINGS=`cat $GO_FILE | grep "^// Warning" | sort | uniq | wc -l`
+	echo "After transpiling : $WARNINGS warnings."
+
+# show other warnings
+	# show amount error from `go build`:
+		echo "Build to $GO_APP file"
+		WARNINGS_GO=`go build -o $GO_APP -gcflags="-e" $GO_FILE 2>&1 | wc -l`
+		echo "		Go build : $WARNINGS_GO warnings"
+	# amount unsafe
+		UNSAFE=`cat $GO_FILE | grep unsafe | wc -l`
+		echo "		Unsafe   : $UNSAFE"
+
+
+# Arguments menu
+echo "    -s for show detail of Go build errors"
+if [ "$1" == "-s" ]; then
+	# show go build warnings	
+		# c4go warnings
+			cat $GO_FILE | grep "^// Warning" | sort | uniq
+		# show amount error from `go build`:
+			go build -o $GO_APP -gcflags="-e" $GO_FILE 2>&1 | sort 
+fi
+
diff --git a/scripts/neatmkfn.sh b/scripts/neatmkfn.sh
new file mode 100755
index 0000000..0463fda
--- /dev/null
+++ b/scripts/neatmkfn.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+set -e
+
+go build
+
+# prepare variables
+	export C4GO_DIR=$GOPATH/src/github.com/Konstantin8105/c4go
+	export C4GO=$C4GO_DIR/c4go
+	export GIT_SOURCE="https://github.com/aligrudi/neatmkfn.git"
+	export NAME="neatmkfn"
+	export TEMP_FOLDER="/tmp/$NAME"
+	export GO_FILE="$TEMP_FOLDER/$NAME.go"
+	export GO_APP="$TEMP_FOLDER/$NAME.app"
+
+# prepare C code
+    if [ ! -d $TEMP_FOLDER ]; then
+		mkdir -p $TEMP_FOLDER
+		git clone $GIT_SOURCE $TEMP_FOLDER
+		sed -i.bak '53,57d' $TEMP_FOLDER/otf.c
+	fi
+
+# remove go files from last transpilation
+	echo "***** remove go files"
+	rm -f $TEMP_FOLDER/*.go
+	rm -f $TEMP_FOLDER/*.app
+
+# transpilation of all projects
+	echo "Transpile to $GO_FILE"
+	$C4GO transpile                         \
+		-clang-flag="-DTROFFFDIR=\"MMM\""	\
+		-clang-flag="-DTROFFMDIR=\"WWW\""	\
+		-o="$GO_FILE"                       \
+		$TEMP_FOLDER/*.c
+
+# show warnings comments in Go source
+	echo "Calculate warnings in file: $GO_FILE"
+	WARNINGS=`cat $GO_FILE | grep "^// Warning" | sort | uniq | wc -l`
+	echo "After transpiling : $WARNINGS warnings."
+
+# show other warnings
+	# show amount error from `go build`:
+		echo "Build to $GO_APP file"
+		WARNINGS_GO=`go build -o $GO_APP -gcflags="-e" $GO_FILE 2>&1 | wc -l`
+		echo "		Go build : $WARNINGS_GO warnings"
+	# amount unsafe
+		UNSAFE=`cat $GO_FILE | grep unsafe | wc -l`
+		echo "		Unsafe   : $UNSAFE"
+
+
+# Arguments menu
+echo "    -s for show detail of Go build errors"
+if [ "$1" == "-s" ]; then
+	# show go build warnings	
+		# c4go warnings
+			cat $GO_FILE | grep "^// Warning" | sort | uniq
+		# show amount error from `go build`:
+			go build -o $GO_APP -gcflags="-e" $GO_FILE 2>&1 | sort 
+fi
diff --git a/scripts/neatpost.sh b/scripts/neatpost.sh
new file mode 100755
index 0000000..f931b45
--- /dev/null
+++ b/scripts/neatpost.sh
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+set -e
+
+go build
+
+# prepare variables
+	export C4GO_DIR=$GOPATH/src/github.com/Konstantin8105/c4go
+	export C4GO=$C4GO_DIR/c4go
+	export GIT_SOURCE="https://github.com/aligrudi/neatpost.git"
+	export NAME="neatpost"
+	export TEMP_FOLDER="/tmp/$NAME"
+	export GO_FILE="$TEMP_FOLDER/$NAME.go"
+	export GO_APP="$TEMP_FOLDER/$NAME.app"
+
+# prepare C code
+    if [ ! -d $TEMP_FOLDER ]; then
+		mkdir -p $TEMP_FOLDER
+		git clone $GIT_SOURCE $TEMP_FOLDER
+		sed -i.bak '92,98d' $TEMP_FOLDER/font.c
+		sed -i.bak '163,173d;158,161d;152,156d;145,150d;139,143d;133,137d;128,131d;123,127d;109,121d;90,107d;80,88d;58,78d;47,56d;42,45d;33,40d;8d' $TEMP_FOLDER/ps.c
+		sed -i.bak '219,232d;212,217d;204,210d;196,202d;179,194d;175,177d;131,173d' $TEMP_FOLDER/ps.c
+		sed -i.bak '238,262d;123,129d;116,121d;109,114d;102,107d;95,100d;82,93d;73,80d;65,71d;57,63d' $TEMP_FOLDER/ps.c
+	fi
+
+# remove go files from last transpilation
+	echo "***** remove go files"
+	rm -f $TEMP_FOLDER/*.go
+	rm -f $TEMP_FOLDER/*.app
+
+# transpilation of all projects
+	echo "Transpile to $GO_FILE"
+	$C4GO transpile                         \
+		-clang-flag="-DTROFFFDIR=\"MMM\""	\
+		-clang-flag="-DTROFFMDIR=\"WWW\""	\
+		-o="$GO_FILE"                       \
+		$TEMP_FOLDER/*.c
+
+# show warnings comments in Go source
+	echo "Calculate warnings in file: $GO_FILE"
+	WARNINGS=`cat $GO_FILE | grep "^// Warning" | sort | uniq | wc -l`
+	echo "After transpiling : $WARNINGS warnings."
+
+# show other warnings
+	# show amount error from `go build`:
+		echo "Build to $GO_APP file"
+		WARNINGS_GO=`go build -o $GO_APP -gcflags="-e" $GO_FILE 2>&1 | wc -l`
+		echo "		Go build : $WARNINGS_GO warnings"
+	# amount unsafe
+		UNSAFE=`cat $GO_FILE | grep unsafe | wc -l`
+		echo "		Unsafe   : $UNSAFE"
+
+
+# Arguments menu
+echo "    -s for show detail of Go build errors"
+if [ "$1" == "-s" ]; then
+	# show go build warnings	
+		# c4go warnings
+			cat $GO_FILE | grep "^// Warning" | sort | uniq
+		# show amount error from `go build`:
+			go build -o $GO_APP -gcflags="-e" $GO_FILE 2>&1 | sort 
+fi
diff --git a/scripts/neatrefer.sh b/scripts/neatrefer.sh
new file mode 100755
index 0000000..a17c8ce
--- /dev/null
+++ b/scripts/neatrefer.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+set -e
+
+go build
+
+# prepare variables
+	export C4GO_DIR=$GOPATH/src/github.com/Konstantin8105/c4go
+	export C4GO=$C4GO_DIR/c4go
+	export GIT_SOURCE="https://github.com/aligrudi/neatrefer.git"
+	export NAME="neatrefer"
+	export TEMP_FOLDER="/tmp/$NAME"
+	export GO_FILE="$TEMP_FOLDER/$NAME.go"
+	export GO_APP="$TEMP_FOLDER/$NAME.app"
+
+# prepare C code
+    if [ ! -d $TEMP_FOLDER ]; then
+		mkdir -p $TEMP_FOLDER
+		git clone $GIT_SOURCE $TEMP_FOLDER
+	fi
+
+# remove go files from last transpilation
+	echo "***** remove go files"
+	rm -f $TEMP_FOLDER/*.go
+	rm -f $TEMP_FOLDER/*.app
+
+# transpilation of all projects
+	echo "Transpile to $GO_FILE"
+	$C4GO transpile                         \
+		-clang-flag="-DTROFFFDIR=\"MMM\""	\
+		-clang-flag="-DTROFFMDIR=\"WWW\""	\
+		-o="$GO_FILE"                       \
+		$TEMP_FOLDER/*.c
+
+# show warnings comments in Go source
+	echo "Calculate warnings in file: $GO_FILE"
+	WARNINGS=`cat $GO_FILE | grep "^// Warning" | sort | uniq | wc -l`
+	echo "After transpiling : $WARNINGS warnings."
+
+# show other warnings
+	# show amount error from `go build`:
+		echo "Build to $GO_APP file"
+		WARNINGS_GO=`go build -o $GO_APP -gcflags="-e" $GO_FILE 2>&1 | wc -l`
+		echo "		Go build : $WARNINGS_GO warnings"
+	# amount unsafe
+		UNSAFE=`cat $GO_FILE | grep unsafe | wc -l`
+		echo "		Unsafe   : $UNSAFE"
+
+
+# Arguments menu
+echo "    -s for show detail of Go build errors"
+if [ "$1" == "-s" ]; then
+	# show go build warnings	
+		# c4go warnings
+			cat $GO_FILE | grep "^// Warning" | sort | uniq
+		# show amount error from `go build`:
+			go build -o $GO_APP -gcflags="-e" $GO_FILE 2>&1 | sort 
+fi
+
diff --git a/scripts/neatroff.sh b/scripts/neatroff.sh
new file mode 100755
index 0000000..57aed33
--- /dev/null
+++ b/scripts/neatroff.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+set -e
+
+go build
+
+# prepare variables
+	export C4GO_DIR=$GOPATH/src/github.com/Konstantin8105/c4go
+	export C4GO=$C4GO_DIR/c4go
+	export GIT_SOURCE="https://github.com/aligrudi/neatroff.git"
+	export NAME="neatroff"
+	export TEMP_FOLDER="/tmp/$NAME"
+	export GO_FILE="$TEMP_FOLDER/$NAME.go"
+	export GO_APP="$TEMP_FOLDER/$NAME.app"
+
+# prepare C code
+    if [ ! -d $TEMP_FOLDER ]; then
+		mkdir -p $TEMP_FOLDER
+		git clone $GIT_SOURCE $TEMP_FOLDER
+		sed -i.bak '566,572d' $TEMP_FOLDER/font.c
+		sed -i.bak '66,81d'   $TEMP_FOLDER/out.c
+	fi
+
+# remove go files from last transpilation
+	echo "***** remove go files"
+	rm -f $TEMP_FOLDER/*.go
+	rm -f $TEMP_FOLDER/*.app
+
+# transpilation of all projects
+	echo "Transpile to $GO_FILE"
+	$C4GO transpile                         \
+		-clang-flag="-DTROFFFDIR=\"MMM\""	\
+		-clang-flag="-DTROFFMDIR=\"WWW\""	\
+		-o="$GO_FILE"                       \
+		$TEMP_FOLDER/*.c
+
+# show warnings comments in Go source
+	echo "Calculate warnings in file: $GO_FILE"
+	WARNINGS=`cat $GO_FILE | grep "^// Warning" | sort | uniq | wc -l`
+	echo "After transpiling : $WARNINGS warnings."
+
+# show other warnings
+	# show amount error from `go build`:
+		echo "Build to $GO_APP file"
+		WARNINGS_GO=`go build -o $GO_APP -gcflags="-e" $GO_FILE 2>&1 | wc -l`
+		echo "		Go build : $WARNINGS_GO warnings"
+	# amount unsafe
+		UNSAFE=`cat $GO_FILE | grep unsafe | wc -l`
+		echo "		Unsafe   : $UNSAFE"
+
+
+# Arguments menu
+echo "    -s for show detail of Go build errors"
+if [ "$1" == "-s" ]; then
+	# show go build warnings	
+		# c4go warnings
+			cat $GO_FILE | grep "^// Warning" | sort | uniq
+		# show amount error from `go build`:
+			go build -o $GO_APP -gcflags="-e" $GO_FILE 2>&1 | sort 
+fi
+
diff --git a/scripts/neatvi.sh b/scripts/neatvi.sh
new file mode 100755
index 0000000..c99de72
--- /dev/null
+++ b/scripts/neatvi.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+set -e
+
+go build
+
+# prepare variables
+	export C4GO_DIR=$GOPATH/src/github.com/Konstantin8105/c4go
+	export C4GO=$C4GO_DIR/c4go
+	export GIT_SOURCE="https://github.com/aligrudi/neatvi.git"
+	export NAME="neatvi"
+	export TEMP_FOLDER="/tmp/$NAME"
+	export GO_FILE="$TEMP_FOLDER/$NAME.go"
+	export GO_APP="$TEMP_FOLDER/$NAME.app"
+
+# prepare C code
+    if [ ! -d $TEMP_FOLDER ]; then
+		mkdir -p $TEMP_FOLDER
+		git clone $GIT_SOURCE $TEMP_FOLDER
+		sed -i.bak '635,642d'   $TEMP_FOLDER/vi.c
+		sed -i.bak 's/bufs/bufs_postfix/g'   $TEMP_FOLDER/reg.c
+		sed -i.bak 's/static\ //g'   $TEMP_FOLDER/regex.c
+		sed -i.bak '53,59d;9,24d'   $TEMP_FOLDER/uc.c
+	fi
+
+# remove go files from last transpilation
+	echo "***** remove go files"
+	rm -f $TEMP_FOLDER/*.go
+	rm -f $TEMP_FOLDER/*.app
+
+# transpilation of all projects
+	echo "Transpile to $GO_FILE"
+	$C4GO transpile                         \
+		-clang-flag="-DTROFFFDIR=\"MMM\""	\
+		-clang-flag="-DTROFFMDIR=\"WWW\""	\
+		-o="$GO_FILE"                       \
+		$TEMP_FOLDER/*.c
+
+# show warnings comments in Go source
+	echo "Calculate warnings in file: $GO_FILE"
+	WARNINGS=`cat $GO_FILE | grep "^// Warning" | sort | uniq | wc -l`
+	echo "After transpiling : $WARNINGS warnings."
+
+# show other warnings
+	# show amount error from `go build`:
+		echo "Build to $GO_APP file"
+		WARNINGS_GO=`go build -o $GO_APP -gcflags="-e" $GO_FILE 2>&1 | wc -l`
+		echo "		Go build : $WARNINGS_GO warnings"
+	# amount unsafe
+		UNSAFE=`cat $GO_FILE | grep unsafe | wc -l`
+		echo "		Unsafe   : $UNSAFE"
+
+
+# Arguments menu
+echo "    -s for show detail of Go build errors"
+if [ "$1" == "-s" ]; then
+	# show go build warnings	
+		# c4go warnings
+			cat $GO_FILE | grep "^// Warning" | sort | uniq
+		# show amount error from `go build`:
+			go build -o $GO_APP -gcflags="-e" $GO_FILE 2>&1 | sort 
+fi
+


Test patch:
diff --git a/main_test.go b/main_test.go
index db3c391..ab65c88 100644
--- a/main_test.go
+++ b/main_test.go
@@ -426,35 +426,6 @@ func TestStartPreprocess(t *testing.T) {
 	}
 }
 
-func TestGoPath(t *testing.T) {
-	gopath := "GOPATH"
-
-	existEnv := os.Getenv(gopath)
-	if existEnv == "" {
-		t.Errorf("$GOPATH is not set")
-	}
-
-	// return env.var.
-	defer func() {
-		err := os.Setenv(gopath, existEnv)
-		if err != nil {
-			t.Errorf("Cannot restore the value of $GOPATH")
-		}
-	}()
-
-	// reset value of env.var.
-	err := os.Setenv(gopath, "")
-	if err != nil {
-		t.Errorf("Cannot set value of $GOPATH")
-	}
-
-	// testing
-	err = Start(DefaultProgramArgs())
-	if err == nil {
-		t.Errorf(err.Error())
-	}
-}
-
 func TestMultifileTranspilation(t *testing.T) {
 	tcs := []struct {
 		source         []string