chore: add lint check

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2019-03-04 16:11:12 +08:00
parent fe8e5e3483
commit f8a64791a4
3 changed files with 37 additions and 19 deletions
+11
View File
@@ -18,6 +18,17 @@ steps:
- name: gopath
path: /go
- name: lint
pull: always
image: golang:1.12
commands:
- make lint
environment:
GO111MODULE: on
volumes:
- name: gopath
path: /go
- name: misspell
pull: always
image: golang:1.12
+9 -2
View File
@@ -36,7 +36,7 @@ Copy files and artifacts via SSH using a binary, docker or [Drone CI](http://doc
The pre-compiled binaries can be downloaded from [release page](https://github.com/appleboy/drone-scp/releases). Support the following OS type.
* Windows amd64/386
* Linux amd64/386
* Linux arm/amd64/386
* Darwin amd64/386
With `Go` installed
@@ -48,7 +48,14 @@ $ go get -u -v github.com/appleboy/drone-scp
or build the binary with the following command:
```
$ make build
$ export GOOS=linux
$ export GOARCH=amd64
$ export CGO_ENABLED=0
$ export GO111MODULE=on
$ go test -cover ./...
$ go build -v -a -tags netgo -o release/linux/amd64/drone-scp .
```
## Docker
+17 -17
View File
@@ -24,23 +24,23 @@
},
],
},
// {
// name: 'lint',
// image: 'golang:1.12',
// pull: 'always',
// environment: {
// GO111MODULE: 'on',
// },
// commands: [
// 'make lint',
// ],
// volumes: [
// {
// name: 'gopath',
// path: '/go',
// },
// ],
// },
{
name: 'lint',
image: 'golang:1.12',
pull: 'always',
environment: {
GO111MODULE: 'on',
},
commands: [
'make lint',
],
volumes: [
{
name: 'gopath',
path: '/go',
},
],
},
{
name: 'misspell',
image: 'golang:1.12',