-
Notifications
You must be signed in to change notification settings - Fork 219
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
74e5143
commit d97d7bd
Showing
3 changed files
with
62 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,15 @@ | ||
name: golangci-lint | ||
on: [push, pull_request] | ||
permissions: | ||
contents: read | ||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v2 | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: v1.45.2 |
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,17 @@ | ||
name: test | ||
on: [push, pull_request] | ||
permissions: | ||
contents: read | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
go-version: [1.17.x, 1.18.x] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- uses: actions/checkout@v3 | ||
- run: go test ./... |
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,30 @@ | ||
run: | ||
timeout: 30s | ||
|
||
issues: | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 | ||
|
||
linters-settings: | ||
depguard: | ||
include-go-root: true | ||
packages: | ||
- "io/ioutil" | ||
|
||
linters: | ||
enable: | ||
# Enable some extra linters | ||
- gofmt | ||
- goimports | ||
- gocritic | ||
- revive | ||
# stylecheck warns about errors starting with a capital letter, which should be fixed in the next major release | ||
# - stylecheck | ||
- unconvert | ||
- durationcheck | ||
- wastedassign | ||
- depguard | ||
- bodyclose | ||
- gosec | ||
- misspell | ||
- prealloc |