-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use golangci and goreleaser (#22)
* chore: improve CI using golangci and CD using goreleaser * chore: delete go.yaml * chore: fix typo * chore: fix golangci lint issues
- Loading branch information
1 parent
fc3700f
commit d479ebb
Showing
7 changed files
with
80 additions
and
32 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,27 @@ | ||
name: CI | ||
|
||
on: pull_request | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
cache: false | ||
- name: Build | ||
run: go build -v ./... | ||
- name: Run linters | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
skip-pkg-cache: true | ||
skip-build-cache: true | ||
- name: Run tests | ||
run: go test -v ./... |
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Visit https://golangci-lint.run/ for usage documentation and information on other useful linters | ||
issues: | ||
max-per-linter: 0 | ||
max-same-issues: 0 | ||
|
||
exclude-rules: | ||
# disable funlen for test funcs | ||
- source: "^func Test" | ||
linters: | ||
- funlen | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- bidichk | ||
- durationcheck | ||
- decorder | ||
- dogsled | ||
- errcheck | ||
- exportloopref | ||
- forcetypeassert | ||
- funlen | ||
- godot | ||
- godox | ||
- gofmt | ||
- gosimple | ||
- goconst | ||
- ineffassign | ||
- makezero | ||
- misspell | ||
- nilerr | ||
- predeclared | ||
- staticcheck | ||
- tenv | ||
- unconvert | ||
- unparam | ||
- unused | ||
- vet |
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