-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up workflow for golangci (#2020)
- Loading branch information
Showing
3 changed files
with
52 additions
and
1 deletion.
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,19 @@ | ||
on: [push, pull_request] | ||
name: linter | ||
|
||
jobs: | ||
lint: | ||
strategy: | ||
matrix: | ||
go-version: [1.x] | ||
platform: [ubuntu-latest] | ||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@5c56cd6c9dc07901af25baab6f2b0d9f3b7c3018 #v2.5.2 | ||
with: | ||
version: v1.41 | ||
args: --verbose |
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 @@ | ||
linters: | ||
# TODO: fix errors so that all of the linters below pass. | ||
# The linters that are commented out, as well as those explicitly disabled, | ||
# are currently failing. We should fix those failures or define exclusion | ||
# rules, and then enable those linters. | ||
enable: | ||
- dogsled | ||
- dupl | ||
- gofmt | ||
- goimports | ||
# - gosec | ||
- misspell | ||
- nakedret | ||
# - stylecheck | ||
# - unconvert | ||
# - unparam | ||
# - whitespace | ||
disable: | ||
- errcheck | ||
- gosimple | ||
- staticcheck | ||
- ineffassign | ||
- unused | ||
issues: | ||
exclude-rules: | ||
- linters: | ||
- dogsled | ||
text: "declaration has 3 blank identifiers" | ||
path: _test\.go | ||
- linters: | ||
- dupl | ||
path: _test\.go |
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