-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f2ab9c
commit cab7ec9
Showing
2 changed files
with
74 additions
and
0 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,35 @@ | ||
name: golangci-lint | ||
|
||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: '**' | ||
|
||
jobs: | ||
golangci: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, windows-latest, ubuntu-latest] | ||
name: lint | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.20.4' | ||
|
||
- run: make deps | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
skip-pkg-cache: true | ||
|
||
# Run again as a workaround for https://github.com/golangci/golangci-lint-action/issues/362 | ||
- name: golangci-lint | ||
if: ${{ always() }} | ||
run: golangci-lint run |
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,39 @@ | ||
run: | ||
skip-dirs: | ||
- test-cmds | ||
timeout: 5m | ||
|
||
linters: | ||
enable: | ||
- bodyclose | ||
- unused | ||
- gofmt | ||
- govet | ||
- misspell | ||
- nakedret | ||
- unconvert | ||
- paralleltest | ||
disable: | ||
- errcheck | ||
- gosec | ||
- gosimple | ||
- ineffassign | ||
- interfacer | ||
- maligned | ||
- noctx | ||
- staticcheck | ||
- structcheck | ||
- varcheck | ||
|
||
linters-settings: | ||
errcheck: | ||
ignore: github.com/go-kit/kit/log:Log | ||
gofmt: | ||
simplify: false | ||
|
||
issues: | ||
exclude-rules: | ||
# False positive: https://github.com/kunwardeep/paralleltest/issues/8. | ||
- linters: | ||
- paralleltest | ||
text: "does not use range value in test Run" |