-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from meian/96-apply-linter-on-ci
#96 Apply linter on CI
- Loading branch information
Showing
21 changed files
with
149 additions
and
88 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,42 @@ | ||
run: | ||
timeout: 1m | ||
issue-exit-code: 1 | ||
tests: true | ||
skip-dirs-use-default: true | ||
allow-parallel-runners: true | ||
go: "1.18" | ||
linters: | ||
enable-all: true | ||
disable: | ||
# deprecated | ||
- deadcode | ||
- exhaustivestruct | ||
- golint | ||
- ifshort | ||
- interfacer | ||
- maligned | ||
- nosnakecase | ||
- scopelint | ||
- structcheck | ||
- varcheck | ||
# ignore for generics | ||
- rowserrcheck | ||
- sqlclosecheck | ||
- wastedassign | ||
# unused rules | ||
- gofumpt | ||
- gomnd | ||
- ireturn | ||
- nlreturn | ||
- paralleltest | ||
- wsl | ||
fast: false | ||
issues: | ||
exclude-rules: | ||
- path: _test.go | ||
linters: | ||
- cyclop | ||
- dupl | ||
- funlen | ||
- gocognit | ||
- varnamelen |
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,28 @@ | ||
name: reviewdog | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "**.go" | ||
- ".github/config/.golangci.yml" | ||
- ".github/workflows/lint.yml" | ||
|
||
jobs: | ||
# NOTE: golangci-lint doesn't report multiple errors on the same line from | ||
# different linters and just report one of the errors? | ||
|
||
golangci: | ||
name: golangci | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
- name: golangci | ||
uses: reviewdog/action-golangci-lint@v2 | ||
with: | ||
# optionally use a specific version of Go rather than the latest one | ||
go_version: "1.18" | ||
fail_on_error: true | ||
|
||
# Can pass --config flag to change golangci-lint behavior and target directory. | ||
golangci_lint_flags: "--config=.github/config/.golangci.yml" |
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
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
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
Oops, something went wrong.