File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# github.com/docker/cli
33#
44
5- .PHONY : build clean cross
5+ .PHONY : build clean cross test lint
66
77# build the CLI
88build : clean
1717test :
1818 @go test -tags daemon -v $(shell go list ./... | grep -v /vendor/)
1919
20+ lint :
21+ @gometalinter --config gometalinter.json ./...
22+
2023# build the CLI for multiple architectures
2124cross : clean
2225 @gox -output build/docker-{{.OS}}-{{.Arch}} \
Original file line number Diff line number Diff line change 77 steps :
88 - checkout
99 - 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 {
1313
1414func TestParseExec (t * testing.T ) {
1515 valids := map [* arguments ]* types.ExecConfig {
16- & arguments {
16+ {
1717 execCmd : []string {"command" },
1818 }: {
1919 Cmd : []string {"command" },
2020 AttachStdout : true ,
2121 AttachStderr : true ,
2222 },
23- & arguments {
23+ {
2424 execCmd : []string {"command1" , "command2" },
2525 }: {
2626 Cmd : []string {"command1" , "command2" },
2727 AttachStdout : true ,
2828 AttachStderr : true ,
2929 },
30- & arguments {
30+ {
3131 options : execOptions {
3232 interactive : true ,
3333 tty : true ,
@@ -42,7 +42,7 @@ func TestParseExec(t *testing.T) {
4242 Tty : true ,
4343 Cmd : []string {"command" },
4444 },
45- & arguments {
45+ {
4646 options : execOptions {
4747 detach : true ,
4848 },
@@ -54,7 +54,7 @@ func TestParseExec(t *testing.T) {
5454 Detach : true ,
5555 Cmd : []string {"command" },
5656 },
57- & arguments {
57+ {
5858 options : execOptions {
5959 tty : true ,
6060 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