Skip to content

Commit

Permalink
Add gofumports step to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
johanbrandhorst committed Dec 26, 2019
1 parent 5d940d8 commit e88df38
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@ jobs:
steps:
- checkout
- run: go build ./...
format:
docker:
- image: golang:latest
steps:
- checkout
- run:
name: Install gofumports outside local module
command: |
cd $(mktemp -d) &&
go mod init tmp &&
go get mvdan.cc/gofumpt/gofumports@latest
- run:
name: Run gofumports on all non-generated files
command: grep -L -R "^\/\/ Code generated .* DO NOT EDIT\.$" --exclude-dir=.git --exclude-dir=vendor --include="*.go" | xargs -n 1 gofumports -w -local github.com/johanbrandhorst/certify
- run:
name: Check for any changes
command: git diff --exit-code
vendor:
docker:
- image: golang:latest
Expand Down Expand Up @@ -59,6 +76,7 @@ workflows:
all:
jobs:
- build
- format
- vendor
- generate
- test
Expand Down

0 comments on commit e88df38

Please sign in to comment.