File tree Expand file tree Collapse file tree 5 files changed +37
-7
lines changed Expand file tree Collapse file tree 5 files changed +37
-7
lines changed Original file line number Diff line number Diff line change 2
2
# github.com/docker/cli
3
3
#
4
4
5
- .PHONY : build clean cross
5
+ .PHONY : build clean cross test lint
6
6
7
7
# build the CLI
8
8
build : clean
17
17
test :
18
18
@go test -tags daemon -v $(shell go list ./... | grep -v /vendor/)
19
19
20
+ lint :
21
+ @gometalinter --config gometalinter.json ./...
22
+
20
23
# build the CLI for multiple architectures
21
24
cross : clean
22
25
@gox -output build/docker-{{.OS}}-{{.Arch}} \
Original file line number Diff line number Diff line change 7
7
steps :
8
8
- checkout
9
9
- setup_remote_docker
10
- - run : docker build -f dockerfiles/Dockerfile.ci .
10
+ - run :
11
+ name : " Lint"
12
+ command : |
13
+ docker build -f dockerfiles/Dockerfile.lint --tag cli-linter .
14
+ docker run cli-linter
15
+ - run :
16
+ name : " Build and Unit Test"
17
+ command : docker build -f dockerfiles/Dockerfile.ci .
Original file line number Diff line number Diff line change @@ -13,21 +13,21 @@ type arguments struct {
13
13
14
14
func TestParseExec (t * testing.T ) {
15
15
valids := map [* arguments ]* types.ExecConfig {
16
- & arguments {
16
+ {
17
17
execCmd : []string {"command" },
18
18
}: {
19
19
Cmd : []string {"command" },
20
20
AttachStdout : true ,
21
21
AttachStderr : true ,
22
22
},
23
- & arguments {
23
+ {
24
24
execCmd : []string {"command1" , "command2" },
25
25
}: {
26
26
Cmd : []string {"command1" , "command2" },
27
27
AttachStdout : true ,
28
28
AttachStderr : true ,
29
29
},
30
- & arguments {
30
+ {
31
31
options : execOptions {
32
32
interactive : true ,
33
33
tty : true ,
@@ -42,7 +42,7 @@ func TestParseExec(t *testing.T) {
42
42
Tty : true ,
43
43
Cmd : []string {"command" },
44
44
},
45
- & arguments {
45
+ {
46
46
options : execOptions {
47
47
detach : true ,
48
48
},
@@ -54,7 +54,7 @@ func TestParseExec(t *testing.T) {
54
54
Detach : true ,
55
55
Cmd : []string {"command" },
56
56
},
57
- & arguments {
57
+ {
58
58
options : execOptions {
59
59
tty : true ,
60
60
interactive : true ,
Original file line number Diff line number Diff line change
1
+ FROM golang:1.8-alpine
2
+
3
+ RUN apk add -U git
4
+
5
+ RUN go get -u gopkg.in/alecthomas/gometalinter.v1 && \
6
+ mv /go/bin/gometalinter.v1 /usr/local/bin/gometalinter && \
7
+ gometalinter --install
8
+
9
+ WORKDIR /go/src/github.com/docker/cli
10
+ COPY . .
11
+ ENTRYPOINT ["/usr/local/bin/gometalinter"]
12
+ CMD ["--config=gometalinter.json", "./..."]
Original file line number Diff line number Diff line change
1
+ {
2
+ "Vendor" : true ,
3
+ "Sort" : [" linter" , " severity" ],
4
+ "Exclude" : [" cli/compose/schema/bindata.go" ],
5
+
6
+ "DisableAll" : true ,
7
+ "Enable" : [" gofmt" , " vet" ]
8
+ }
You can’t perform that action at this time.
0 commit comments