Skip to content

Commit

Permalink
ci: add lint job with config from fxamacker/cbor
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Guthe committed May 6, 2020
1 parent 105492c commit e9a4a50
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,35 @@ jobs:
command: |
source $HOME/.cargo/env
make ci
"lint":
docker:
- image: circleci/golang:1.14
working_directory: /go/src/go.mozilla.org/cose/
environment:
- GO111MODULE: "on" # yaml sees an unquoted on value as "true" but go checks for "on"
steps:
- checkout
- run:
name: install golangci-lint
command: |
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.26.0
- run:
name: print debugging info about go env
command: go env GOPATH
- run:
name: print debugging info about golangci-lint
command: which golangci-lint
- run:
name: Run required linters in .golangci.yml plus hard-coded ones here
command: $(go env GOPATH)/bin/golangci-lint run --timeout=3m
- run:
name: Run optional linters (not required to pass)
command : $(go env GOPATH)/bin/golangci-lint run --timeout=3m --issues-exit-code=0 -E dupl -E gocritic -E gosimple -E lll -E prealloc

workflows:
version: 2
build:
jobs:
- "lint"
- "golang-1.13"
- "golang-1.14"

0 comments on commit e9a4a50

Please sign in to comment.