-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add golangci-lint configuration, fix discovered issues * add GitHub Actions test and build and linter run
- Loading branch information
Showing
9 changed files
with
78 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
tags: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: set up go 1.14 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14 | ||
id: go | ||
|
||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: build and test | ||
run: | | ||
go test -timeout=60s -race | ||
go build -race | ||
- name: install golangci-lint | ||
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.26.0 | ||
|
||
- name: run golangci-lint | ||
run: $GITHUB_WORKSPACE/golangci-lint run --out-format=github-actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
linters: | ||
enable: | ||
- megacheck | ||
- golint | ||
- govet | ||
- unconvert | ||
- megacheck | ||
- structcheck | ||
- gas | ||
- gocyclo | ||
- dupl | ||
- misspell | ||
- unparam | ||
- varcheck | ||
- deadcode | ||
- typecheck | ||
- ineffassign | ||
- varcheck | ||
- stylecheck | ||
- scopelint | ||
- gocritic | ||
- nakedret | ||
- gosimple | ||
- prealloc | ||
fast: false | ||
disable-all: true | ||
|
||
issues: | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- dupl | ||
exclude-use-default: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters