File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1
1
build :
2
2
go build -ldflags=" -s -w"
3
3
4
- tests :
4
+ .PHONY : test
5
+ test :
5
6
go test -count=1 ./...
7
+
8
+ format-lint :
9
+ errors=$$(gofmt -l . ) ; if [ " $$ {errors}" != " " ]; then echo " Format Lint Error Files:\n$$ {errors}" ; exit 1; fi
10
+
11
+ import-lint :
12
+ errors=$$(goimports -l . ) ; if [ " $$ {errors}" != " " ]; then echo " Import Lint Error Files:\n$$ {errors}" ; exit 1; fi
13
+
14
+ style-lint :
15
+ errors=$$(golint ./... ) ; if [ " $$ {errors}" != " " ]; then echo " Style Lint Error Files:\n$$ {errors}" ; exit 1; fi
16
+
17
+ lint : format-lint import-lint style-lint
Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ package main
2
2
3
3
import (
4
4
"fmt"
5
+ "os"
6
+
5
7
"github.com/RyanSiu1995/gcb-visualizer/cmd"
6
8
log "github.com/sirupsen/logrus"
7
- "os"
8
9
)
9
10
10
11
func init () {
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package util
3
3
import (
4
4
"bytes"
5
5
"fmt"
6
- "gopkg.in/yaml.v2"
7
6
"io/ioutil"
8
7
"os"
9
8
"path"
@@ -14,6 +13,7 @@ import (
14
13
graphviz "github.com/goccy/go-graphviz"
15
14
"github.com/goccy/go-graphviz/cgraph"
16
15
"github.com/stretchr/testify/assert"
16
+ "gopkg.in/yaml.v2"
17
17
)
18
18
19
19
var supportedFormat = []string {".yaml" , ".yml" , ".json" }
You can’t perform that action at this time.
0 commit comments