-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (28 loc) · 1.17 KB
/
scan-lint.yaml
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
name: Validate Lint
on: pull_request
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup golang
uses: ./.github/actions/golang
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Install golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
- name: Run pre-commit
uses: pre-commit/action@576ff52938d158a24ac7e009dfa94b1455e7df99 #
with:
extra_args: --all-files --verbose # pre-commit run --all-files --verbose
- name: Run Revive Action by pulling pre-built image
uses: docker://morphy/revive-action:v2@sha256:793c4e8bac339d7dcfccb0c35c9dbc623f5b0956515fcce9efd78162c084e8e0
with:
config: revive.toml
# Exclude patterns, separated by semicolons (optional)
exclude: "src/cmd/viper.go;src/config/lang/lang.go"
# Path pattern (default: ./...)
path: "./src/..."