Skip to content

Commit 1276371

Browse files
chore(*): go modules and faster linting (#64)
1 parent 0a0cba3 commit 1276371

File tree

7 files changed

+513
-12
lines changed

7 files changed

+513
-12
lines changed

.conform.yaml

+14-7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pipeline:
4141
stages:
4242
test:
4343
artifacts:
44-
- source: /go/src/github.com/autonomy/conform/coverage.txt
44+
- source: /src/github.com/autonomy/conform/coverage.txt
4545
destination: coverage.txt
4646
tasks:
4747
- test
@@ -53,8 +53,8 @@ stages:
5353
tasks:
5454
binary:
5555
template: |
56-
FROM autonomy/golang:1.9 as {{ .Docker.CurrentStage }}
57-
WORKDIR $GOPATH/src/{{ index .Variables "gitRepository" }}
56+
FROM golang:1.11.1 AS {{ .Docker.CurrentStage }}
57+
WORKDIR /src/{{ index .Variables "gitRepository" }}
5858
COPY ./ ./
5959
{{ if and .Git.IsClean .Git.IsTag }}
6060
RUN go build -o {{ index .Variables "binaryPath" }} -ldflags "-X \"{{ index .Variables "gitRepository" }}/cmd.Tag={{ trimAll "v" .Git.Tag }}\" -X \"{{ index .Variables "gitRepository" }}/cmd.SHA={{ .Git.SHA }}\" -X \"{{ index .Variables "gitRepository" }}/cmd.Built={{ .Built }}\""
@@ -65,14 +65,21 @@ tasks:
6565
{{ end }}
6666
test:
6767
template: |
68-
FROM autonomy/golang:1.9 as {{ .Docker.CurrentStage }}
69-
WORKDIR $GOPATH/src/{{ index .Variables "gitRepository" }}
68+
FROM golang:1.11.1 AS {{ .Docker.CurrentStage }}
69+
ENV GO111MODULE auto
70+
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.10.1
71+
WORKDIR /src/{{ index .Variables "gitRepository" }}
7072
COPY ./ ./
71-
RUN test.sh
73+
RUN go mod download
74+
RUN go mod verify
75+
RUN chmod +x ./hack/test.sh
76+
RUN ./hack/test.sh --lint ./hack/golangci-lint.yaml
77+
RUN ./hack/test.sh --unit
78+
RUN ./hack/test.sh --coverage
7279
7380
image:
7481
template: |
75-
FROM alpine:3.6 as {{ .Docker.CurrentStage }}
82+
FROM alpine:3.6 AS {{ .Docker.CurrentStage }}
7683
LABEL maintainer="{{ index .Variables "maintainer" }}"
7784
RUN apk --update add bash \
7885
&& rm -rf /var/cache/apk/*

.dockerignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
*
22
!cmd
3-
!Gopkg*
3+
!go.mod
4+
!go.sum
5+
!hack
46
!main.go
57
!pkg
68
!scripts

README.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,8 @@ tasks:
5959
6060
In the same directory, run:
6161
```
62-
$ conform enforce
62+
$ conform build
6363
```
6464

65-
Developing Conform
66-
----------------
67-
6865
### License
6966
[![license](https://img.shields.io/github/license/autonomy/conform.svg?style=flat-square)](https://github.com/autonomy/conform/blob/master/LICENSE)

go.mod

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
module github.com/andrewrynhard/conform
2+
3+
require (
4+
9fans.net/go v0.0.0-20180727211846-5d4fa602e1e8 // indirect
5+
github.com/GoASTScanner/gas v0.0.0-20180828043407-7fd94463edcb // indirect
6+
github.com/Masterminds/semver v1.3.0
7+
github.com/Masterminds/sprig v0.0.0-20170516202909-9526be0327b2
8+
github.com/Microsoft/go-winio v0.4.2
9+
github.com/OpenPeeDeeP/depguard v0.0.0-20180806142446-a69c782687b2 // indirect
10+
github.com/Sirupsen/logrus v1.0.0
11+
github.com/acroca/go-symbols v0.0.0-20180523203557-953befd75e22 // indirect
12+
github.com/aokoli/goutils v1.0.1
13+
github.com/autonomy/conform v0.1.0-alpha.4
14+
github.com/client9/misspell v0.3.4 // indirect
15+
github.com/cosiner/argv v0.0.0-20170225145430-13bacc38a0a5 // indirect
16+
github.com/davidrjenni/reftools v0.0.0-20180509164333-3813a62570d2 // indirect
17+
github.com/derekparker/delve v1.1.0 // indirect
18+
github.com/docker/distribution v2.6.1+incompatible
19+
github.com/docker/docker v1.13.1
20+
github.com/docker/go-connections v0.2.1
21+
github.com/docker/go-units v0.3.1
22+
github.com/fatih/color v1.7.0 // indirect
23+
github.com/fatih/gomodifytags v0.0.0-20180826164257-7987f52a7108 // indirect
24+
github.com/fsnotify/fsnotify v1.4.2
25+
github.com/gobwas/glob v0.2.3 // indirect
26+
github.com/gogo/protobuf v1.1.1 // indirect
27+
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7 // indirect
28+
github.com/golang/protobuf v1.1.0
29+
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
30+
github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 // indirect
31+
github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3 // indirect
32+
github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d // indirect
33+
github.com/golangci/gofmt v0.0.0-20180506063654-2076e05ced53 // indirect
34+
github.com/golangci/golangci-lint v1.10.1 // indirect
35+
github.com/golangci/govet v0.0.0-20180818181408-44ddbe260190 // indirect
36+
github.com/golangci/ineffassign v0.0.0-20180808204949-2ee8f2867dde // indirect
37+
github.com/golangci/lint-1 v0.0.0-20180610141402-4bf9709227d1 // indirect
38+
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect
39+
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 // indirect
40+
github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039 // indirect
41+
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
42+
github.com/google/go-github v15.0.0+incompatible
43+
github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135
44+
github.com/hashicorp/hcl v0.0.0-20170509225359-392dba7d905e
45+
github.com/haya14busa/goplay v1.0.0 // indirect
46+
github.com/huandu/xstrings v0.0.0-20151130125119-3959339b3335
47+
github.com/imdario/mergo v0.0.0-20160216103600-3e95a51e0639
48+
github.com/inconshreveable/mousetrap v1.0.0
49+
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
50+
github.com/josharian/impl v0.0.0-20180228163738-3d0f908298c4 // indirect
51+
github.com/karrick/godirwalk v1.7.3 // indirect
52+
github.com/kevinburke/ssh_config v0.0.0-20170525151105-fa48d7ff1cfb
53+
github.com/magiconair/properties v1.7.2
54+
github.com/mattn/go-colorable v0.0.9 // indirect
55+
github.com/mattn/go-isatty v0.0.3 // indirect
56+
github.com/mdempsky/gocode v0.0.0-20180727200127-00e7f5ac290a // indirect
57+
github.com/mibk/dupl v1.0.0 // indirect
58+
github.com/mitchellh/go-homedir v0.0.0-20161203194507-b8bc1bf76747
59+
github.com/mitchellh/mapstructure v0.0.0-20170523030023-d0303fe80992
60+
github.com/nbutton23/zxcvbn-go v0.0.0-20180829150819-3cb5938f3fc9 // indirect
61+
github.com/opencontainers/runc v0.1.1
62+
github.com/pelletier/go-buffruneio v0.2.0
63+
github.com/pelletier/go-toml v1.0.0
64+
github.com/peterh/liner v1.1.0 // indirect
65+
github.com/pkg/errors v0.8.0
66+
github.com/ramya-rao-a/go-outline v0.0.0-20170803230019-9e9d089bb61a // indirect
67+
github.com/rogpeppe/godef v0.0.0-20170920080713-b692db1de522 // indirect
68+
github.com/satori/go.uuid v1.1.0
69+
github.com/securego/gosec v0.0.0-20180828043407-7fd94463edcb // indirect
70+
github.com/sergi/go-diff v0.0.0-20170409071739-feef008d51ad
71+
github.com/sirupsen/logrus v1.0.6 // indirect
72+
github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c // indirect
73+
github.com/sourcegraph/go-langserver v1.0.0 // indirect
74+
github.com/spf13/afero v0.0.0-20170217164146-9be650865eab
75+
github.com/spf13/cast v1.1.0
76+
github.com/spf13/cobra v0.0.0-20170629105234-8c6fa02d2225
77+
github.com/spf13/jwalterweatherman v0.0.0-20170523133247-0efa5202c046
78+
github.com/spf13/pflag v1.0.0
79+
github.com/spf13/viper v0.0.0-20170619124313-c1de95864d73
80+
github.com/sqs/goreturns v0.0.0-20180302073349-83e02874ec12 // indirect
81+
github.com/src-d/gcfg v1.3.0
82+
github.com/uudashr/gopkgs v1.3.2 // indirect
83+
github.com/xanzy/ssh-agent v0.1.0
84+
golang.org/x/arch v0.0.0-20180516175055-5de9028c2478 // indirect
85+
golang.org/x/crypto v0.0.0-20170703161049-69be088f8606
86+
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7 // indirect
87+
golang.org/x/net v0.0.0-20170629171032-1f9224279e98
88+
golang.org/x/oauth2 v0.0.0-20180620175406-ef147856a6dd
89+
golang.org/x/sys v0.0.0-20170703210155-94b76065f2d2
90+
golang.org/x/text v0.0.0-20170630100924-2bf8f2a19ec0
91+
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52 // indirect
92+
google.golang.org/appengine v1.1.0
93+
gopkg.in/src-d/go-billy.v4 v4.0.1
94+
gopkg.in/src-d/go-git.v4 v4.0.0
95+
gopkg.in/warnings.v0 v0.1.1
96+
gopkg.in/yaml.v2 v2.0.0-20170407172122-cd8b52f8269e
97+
honnef.co/go/tools v0.0.0-20180728063816-88497007e858 // indirect
98+
mvdan.cc/interfacer v0.0.0-20180326104626-822e100dd73a // indirect
99+
mvdan.cc/unparam v0.0.0-20180827003406-8eb9bf77f9de // indirect
100+
sourcegraph.com/sourcegraph/go-diff v0.0.0-20171119081133-3f415a150aec // indirect
101+
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 // indirect
102+
)

0 commit comments

Comments
 (0)