Skip to content

Commit

Permalink
chore(*): go modules and faster linting (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrynhard authored Oct 4, 2018
1 parent 0a0cba3 commit 1276371
Show file tree
Hide file tree
Showing 7 changed files with 513 additions and 12 deletions.
21 changes: 14 additions & 7 deletions .conform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pipeline:
stages:
test:
artifacts:
- source: /go/src/github.com/autonomy/conform/coverage.txt
- source: /src/github.com/autonomy/conform/coverage.txt
destination: coverage.txt
tasks:
- test
Expand All @@ -53,8 +53,8 @@ stages:
tasks:
binary:
template: |
FROM autonomy/golang:1.9 as {{ .Docker.CurrentStage }}
WORKDIR $GOPATH/src/{{ index .Variables "gitRepository" }}
FROM golang:1.11.1 AS {{ .Docker.CurrentStage }}
WORKDIR /src/{{ index .Variables "gitRepository" }}
COPY ./ ./
{{ if and .Git.IsClean .Git.IsTag }}
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 }}\""
Expand All @@ -65,14 +65,21 @@ tasks:
{{ end }}
test:
template: |
FROM autonomy/golang:1.9 as {{ .Docker.CurrentStage }}
WORKDIR $GOPATH/src/{{ index .Variables "gitRepository" }}
FROM golang:1.11.1 AS {{ .Docker.CurrentStage }}
ENV GO111MODULE auto
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.10.1
WORKDIR /src/{{ index .Variables "gitRepository" }}
COPY ./ ./
RUN test.sh
RUN go mod download
RUN go mod verify
RUN chmod +x ./hack/test.sh
RUN ./hack/test.sh --lint ./hack/golangci-lint.yaml
RUN ./hack/test.sh --unit
RUN ./hack/test.sh --coverage
image:
template: |
FROM alpine:3.6 as {{ .Docker.CurrentStage }}
FROM alpine:3.6 AS {{ .Docker.CurrentStage }}
LABEL maintainer="{{ index .Variables "maintainer" }}"
RUN apk --update add bash \
&& rm -rf /var/cache/apk/*
Expand Down
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
*
!cmd
!Gopkg*
!go.mod
!go.sum
!hack
!main.go
!pkg
!scripts
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,8 @@ tasks:
In the same directory, run:
```
$ conform enforce
$ conform build
```

Developing Conform
----------------

### License
[![license](https://img.shields.io/github/license/autonomy/conform.svg?style=flat-square)](https://github.com/autonomy/conform/blob/master/LICENSE)
102 changes: 102 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
module github.com/andrewrynhard/conform

require (
9fans.net/go v0.0.0-20180727211846-5d4fa602e1e8 // indirect
github.com/GoASTScanner/gas v0.0.0-20180828043407-7fd94463edcb // indirect
github.com/Masterminds/semver v1.3.0
github.com/Masterminds/sprig v0.0.0-20170516202909-9526be0327b2
github.com/Microsoft/go-winio v0.4.2
github.com/OpenPeeDeeP/depguard v0.0.0-20180806142446-a69c782687b2 // indirect
github.com/Sirupsen/logrus v1.0.0
github.com/acroca/go-symbols v0.0.0-20180523203557-953befd75e22 // indirect
github.com/aokoli/goutils v1.0.1
github.com/autonomy/conform v0.1.0-alpha.4
github.com/client9/misspell v0.3.4 // indirect
github.com/cosiner/argv v0.0.0-20170225145430-13bacc38a0a5 // indirect
github.com/davidrjenni/reftools v0.0.0-20180509164333-3813a62570d2 // indirect
github.com/derekparker/delve v1.1.0 // indirect
github.com/docker/distribution v2.6.1+incompatible
github.com/docker/docker v1.13.1
github.com/docker/go-connections v0.2.1
github.com/docker/go-units v0.3.1
github.com/fatih/color v1.7.0 // indirect
github.com/fatih/gomodifytags v0.0.0-20180826164257-7987f52a7108 // indirect
github.com/fsnotify/fsnotify v1.4.2
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.1.1 // indirect
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7 // indirect
github.com/golang/protobuf v1.1.0
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 // indirect
github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3 // indirect
github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d // indirect
github.com/golangci/gofmt v0.0.0-20180506063654-2076e05ced53 // indirect
github.com/golangci/golangci-lint v1.10.1 // indirect
github.com/golangci/govet v0.0.0-20180818181408-44ddbe260190 // indirect
github.com/golangci/ineffassign v0.0.0-20180808204949-2ee8f2867dde // indirect
github.com/golangci/lint-1 v0.0.0-20180610141402-4bf9709227d1 // indirect
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 // indirect
github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039 // indirect
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
github.com/google/go-github v15.0.0+incompatible
github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135
github.com/hashicorp/hcl v0.0.0-20170509225359-392dba7d905e
github.com/haya14busa/goplay v1.0.0 // indirect
github.com/huandu/xstrings v0.0.0-20151130125119-3959339b3335
github.com/imdario/mergo v0.0.0-20160216103600-3e95a51e0639
github.com/inconshreveable/mousetrap v1.0.0
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
github.com/josharian/impl v0.0.0-20180228163738-3d0f908298c4 // indirect
github.com/karrick/godirwalk v1.7.3 // indirect
github.com/kevinburke/ssh_config v0.0.0-20170525151105-fa48d7ff1cfb
github.com/magiconair/properties v1.7.2
github.com/mattn/go-colorable v0.0.9 // indirect
github.com/mattn/go-isatty v0.0.3 // indirect
github.com/mdempsky/gocode v0.0.0-20180727200127-00e7f5ac290a // indirect
github.com/mibk/dupl v1.0.0 // indirect
github.com/mitchellh/go-homedir v0.0.0-20161203194507-b8bc1bf76747
github.com/mitchellh/mapstructure v0.0.0-20170523030023-d0303fe80992
github.com/nbutton23/zxcvbn-go v0.0.0-20180829150819-3cb5938f3fc9 // indirect
github.com/opencontainers/runc v0.1.1
github.com/pelletier/go-buffruneio v0.2.0
github.com/pelletier/go-toml v1.0.0
github.com/peterh/liner v1.1.0 // indirect
github.com/pkg/errors v0.8.0
github.com/ramya-rao-a/go-outline v0.0.0-20170803230019-9e9d089bb61a // indirect
github.com/rogpeppe/godef v0.0.0-20170920080713-b692db1de522 // indirect
github.com/satori/go.uuid v1.1.0
github.com/securego/gosec v0.0.0-20180828043407-7fd94463edcb // indirect
github.com/sergi/go-diff v0.0.0-20170409071739-feef008d51ad
github.com/sirupsen/logrus v1.0.6 // indirect
github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c // indirect
github.com/sourcegraph/go-langserver v1.0.0 // indirect
github.com/spf13/afero v0.0.0-20170217164146-9be650865eab
github.com/spf13/cast v1.1.0
github.com/spf13/cobra v0.0.0-20170629105234-8c6fa02d2225
github.com/spf13/jwalterweatherman v0.0.0-20170523133247-0efa5202c046
github.com/spf13/pflag v1.0.0
github.com/spf13/viper v0.0.0-20170619124313-c1de95864d73
github.com/sqs/goreturns v0.0.0-20180302073349-83e02874ec12 // indirect
github.com/src-d/gcfg v1.3.0
github.com/uudashr/gopkgs v1.3.2 // indirect
github.com/xanzy/ssh-agent v0.1.0
golang.org/x/arch v0.0.0-20180516175055-5de9028c2478 // indirect
golang.org/x/crypto v0.0.0-20170703161049-69be088f8606
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7 // indirect
golang.org/x/net v0.0.0-20170629171032-1f9224279e98
golang.org/x/oauth2 v0.0.0-20180620175406-ef147856a6dd
golang.org/x/sys v0.0.0-20170703210155-94b76065f2d2
golang.org/x/text v0.0.0-20170630100924-2bf8f2a19ec0
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52 // indirect
google.golang.org/appengine v1.1.0
gopkg.in/src-d/go-billy.v4 v4.0.1
gopkg.in/src-d/go-git.v4 v4.0.0
gopkg.in/warnings.v0 v0.1.1
gopkg.in/yaml.v2 v2.0.0-20170407172122-cd8b52f8269e
honnef.co/go/tools v0.0.0-20180728063816-88497007e858 // indirect
mvdan.cc/interfacer v0.0.0-20180326104626-822e100dd73a // indirect
mvdan.cc/unparam v0.0.0-20180827003406-8eb9bf77f9de // indirect
sourcegraph.com/sourcegraph/go-diff v0.0.0-20171119081133-3f415a150aec // indirect
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 // indirect
)
Loading

0 comments on commit 1276371

Please sign in to comment.