1+ name : reviewdog
2+ on : [push,pull_request]
3+ jobs :
4+ # NOTE: golangci-lint doesn't report multiple errors on the same line from
5+ # different linters and just report one of the errors?
6+
7+ golangci-lint :
8+ name : runner / golangci-lint
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Check out code into the Go module directory
12+ uses : actions/checkout@v1
13+ - name : golangci-lint
14+ uses : docker://reviewdog/action-golangci-lint:v1.0.4 # Pre-built image
15+ # uses: reviewdog/action-golangci-lint@v1 # Build with Dockerfile
16+ # uses: docker://reviewdog/action-golangci-lint:v1.0.2 # Can use specific version.
17+ # uses: reviewdog/[email protected] # Can use specific version. 18+ with :
19+ github_token : ${{ secrets.github_token }}
20+ # Can pass --config flag to change golangci-lint behavior and target
21+ # directory.
22+ golangci_lint_flags : " --config=.github/.golangci.yml ./testdata"
23+
24+ # Use golint via golangci-lint binary with "warning" level.
25+ golint :
26+ name : runner / golint
27+ runs-on : ubuntu-latest
28+ steps :
29+ - name : Check out code into the Go module directory
30+ uses : actions/checkout@v1
31+ - name : golint
32+ uses : docker://reviewdog/action-golangci-lint:v1.0.4 # Pre-built image
33+ with :
34+ github_token : ${{ secrets.github_token }}
35+ golangci_lint_flags : " --disable-all -E golint --exclude-use-default=false"
36+ tool_name : golint # Change reporter name.
37+ level : warning # GitHub Status Check won't become failure with this level.
38+
39+ # You can add more and more supported linters with different config.
40+ errcheck :
41+ name : runner / errcheck
42+ runs-on : ubuntu-latest
43+ steps :
44+ - name : Check out code into the Go module directory
45+ uses : actions/checkout@v1
46+ - name : errcheck
47+ uses : docker://reviewdog/action-golangci-lint:v1.0.4 # Pre-built image
48+ with :
49+ github_token : ${{ secrets.github_token }}
50+ golangci_lint_flags : " --disable-all -E errcheck"
51+ tool_name : errcheck
52+ level : info
0 commit comments