This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
Files
srv/.github/workflows/reviewdog.yml
2020-04-05 19:33:36 -04:00

53 lines
2.0 KiB
YAML

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: runner / golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: golangci-lint
uses: docker://reviewdog/action-golangci-lint:v1 # Pre-built image
# uses: reviewdog/action-golangci-lint@v1 # Build with Dockerfile
# uses: docker://reviewdog/action-golangci-lint:v1.0.2 # Can use specific version.
# uses: reviewdog/action-golangci-lint@v1.0.2 # Can use specific version.
with:
github_token: ${{ secrets.github_token }}
# Can pass --config flag to change golangci-lint behavior and target
# directory.
golangci_lint_flags: "--config=.github/.golangci.yml ./testdata"
# Use golint via golangci-lint binary with "warning" level.
golint:
name: runner / golint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: golint
uses: reviewdog/action-golangci-lint@v1
with:
github_token: ${{ secrets.github_token }}
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: runner / errcheck
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: errcheck
uses: reviewdog/action-golangci-lint@v1
with:
github_token: ${{ secrets.github_token }}
golangci_lint_flags: "--disable-all -E errcheck"
tool_name: errcheck
level: info