-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (65 loc) · 2.42 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Linter
on:
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
check-links:
name: Markdown / Link
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
fetch-tags: true
- name: Run linkspector
uses: umbrelladocs/action-linkspector@fc382e19892aca958e189954912fe379a8df270c # v1.2.4
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
fail_on_error: true
golint:
name: Go
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
issues: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
fetch-tags: true
- name: Requirements
uses: reviewdog/action-golangci-lint@7708105983c614f7a2725e2172908b7709d1c3e4 # v2.6.2
with:
github_token: ${{ secrets.github_token }}
golangci_lint_flags: "--fix --timeout 2m0s --disable-all -E asciicheck,bidichk,bodyclose,canonicalheader,dogsled,exhaustive,gocheckcompilerdirectives,gofmt,durationcheck,errname,errorlint,fatcontext,goheader,inamedparam,interfacebloat,intrange,makezero,mirror,misspell,noctx,nonamedreturns,prealloc,predeclared,tenv,testifylint,unconvert,usestdlibvars,wastedassign"
reporter: github-pr-review
tool_name: Go Lint Issues
fail_on_error: true
cache: false
filter_mode: added
- name: Suggestions
uses: reviewdog/action-golangci-lint@7708105983c614f7a2725e2172908b7709d1c3e4 # v2.6.2
if: success() || failure()
with:
github_token: ${{ secrets.github_token }}
golangci_lint_flags: "--fix --timeout 2m0s -E dupl,gocritic,maintidx,mnd,perfsprint,revive,stylecheck"
reporter: github-pr-review
tool_name: Go Lint Suggestions
level: warning
fail_on_error: false
cache: false
filter_mode: file
- uses: reviewdog/action-suggester@db4abb16fbaabe386831e5addb7be1485d0d63d3 # v1.18.0
if: success() || failure()
with:
tool_name: Go Lint Issues
github_token: ${{ secrets.github_token }}