Handlers renamed (#88) #123
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
name: "reviewdog Scan" | |
on: | |
push: | |
pull_request: | |
jobs: | |
reviewdog-github-check: | |
permissions: | |
checks: write | |
contents: read | |
pull-requests: write | |
name: reviewdog (github-check) | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: WillAbides/setup-go-faster@v1.14.0 | |
with: | |
go-version-file: "go.mod" | |
- name: Install linters | |
run: go install golang.org/x/lint/golint@latest | |
- name: Setup reviewdog | |
uses: reviewdog/action-setup@v1 | |
with: | |
reviewdog_version: latest | |
- name: Run reviewdog | |
env: | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
golint ./... | reviewdog -f=golint -name=golint-github-check -reporter=github-check -level=warning | |
reviewdog-pr: | |
permissions: | |
checks: write | |
contents: read | |
pull-requests: write | |
if: github.event_name == 'pull_request' | |
name: reviewdog on Pull Request | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: WillAbides/setup-go-faster@v1.14.0 | |
with: | |
go-version-file: "go.mod" | |
- name: Install linters | |
run: go install golang.org/x/lint/golint@latest | |
- name: Setup reviewdog | |
uses: reviewdog/action-setup@v1 | |
with: | |
reviewdog_version: latest | |
- name: Run reviewdog (github-pr-check) | |
continue-on-error: true | |
env: | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
reviewdog -reporter=github-pr-check -runners=golint,govet -fail-on-error | |
- name: Run reviewdog (github-pr-review with tee) | |
env: | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
echo "::remove-matcher owner=go::" | |
golint ./... | reviewdog -f=golint -name=golint-pr-review -reporter=github-pr-review -tee | |
- name: Run reviewdog (github-pr-check with -filter-mode=file) | |
env: | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
golint | reviewdog -f=golint -name=golint-pr-check-filter-mode-file -reporter=github-pr-check -filter-mode=file -level=warning | |
- name: Run reviewdog (github-pr-review -filter-mode=nofilter) | |
env: | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
reviewdog -f=golint -name=golint-pr-review-nofilter -reporter=github-pr-review -filter-mode=nofilter -fail-on-error || EXIT_CODE=$? | |
test "${EXIT_CODE}" = 1 | |
- name: gofmt -s with reviewdog | |
env: | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gofmt -s -d . | \ | |
reviewdog -name="gofmt" -f=diff -f.diff.strip=0 -reporter=github-pr-review | |
golangci-lint: | |
permissions: | |
checks: write | |
contents: read | |
pull-requests: write | |
if: github.event_name == 'pull_request' | |
name: runner / golangci-lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: reviewdog/action-golangci-lint@v2 | |
with: | |
github_token: ${{ secrets.github_token }} | |
golangci_lint_flags: "--timeout 2m" | |
level: "warning" | |
reporter: github-pr-check | |
staticcheck: | |
permissions: | |
checks: write | |
contents: read | |
pull-requests: write | |
if: github.event_name == 'pull_request' | |
name: runner / staticcheck | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- uses: reviewdog/action-staticcheck@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-review | |
filter_mode: nofilter | |
fail_on_error: true | |
# workdir: ./_testdata/ | |
misspell: | |
name: runner / misspell | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: reviewdog/action-misspell@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
locale: "US" | |
reporter: github-check | |
path: | | |
cmd | |
pkg | |
templates | |
languagetool: | |
name: runner / languagetool | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: reviewdog/action-languagetool@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-check | |
level: info | |
patterns: | | |
**/*.md | |
!**/testdata/** | |
shellcheck: | |
if: github.event_name == 'pull_request' | |
name: runner / shellcheck | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: reviewdog/action-shellcheck@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-review | |
alex: | |
name: runner / alex | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: reviewdog/action-alex@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-check | |
level: info |