-
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.
- Loading branch information
Showing
1 changed file
with
52 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,52 @@ | ||
name: reviewdog | ||
on: [pull_request] | ||
jobs: | ||
# NOTE: golangci-lint doesn't report multiple errors on the same line from | ||
# different linters and just report one of the errors? | ||
|
||
golangci-lint: | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
- name: golangci-lint | ||
uses: reviewdog/action-golangci-lint@v2 | ||
with: | ||
# optionally use a specific version of Go rather than the latest one | ||
go_version: "1.18" | ||
|
||
# Can pass --config flag to change golangci-lint behavior and target | ||
# directory. | ||
# golangci_lint_flags: "--config=.github/.golangci.yml ./testdata" | ||
# workdir: subdirectory/ | ||
|
||
# Use golint via golangci-lint binary with "warning" level. | ||
golint: | ||
name: golint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
- name: golint | ||
uses: reviewdog/action-golangci-lint@v2 | ||
with: | ||
go_version: "1.18" | ||
golangci_lint_flags: "--disable-all -E golint" | ||
tool_name: golint # Change reporter name. | ||
# level: warning # GitHub Status Check won't become failure with this level. | ||
|
||
# You can add more and more supported linters with different config. | ||
errcheck: | ||
name: errcheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
- name: errcheck | ||
uses: reviewdog/action-golangci-lint@v2 | ||
with: | ||
go_version: "1.18" | ||
golangci_lint_flags: "--disable-all -E errcheck" | ||
tool_name: errcheck | ||
level: info |