-
Notifications
You must be signed in to change notification settings - Fork 30
35 lines (33 loc) · 905 Bytes
/
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
name: Goimports, Revive and Gosec
on:
push:
branches:
- main
- release-*
pull_request:
branches:
- main
- release-*
jobs:
format:
name: lint
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@v0.1.11
- name: Checkout code
uses: actions/checkout@v2
- run: goimports -d .
- name: Run Linter with Revive Action
uses: morphy2k/revive-action@v2.3.1
with:
config: ./config.toml
path: ./...
- name: Install Gosec Security Scanner
run: curl -sfL https://raw.githubusercontent.com/securego/gosec/v2.12.0/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.12.0
- name: Run Gosec Security Scanner
run: gosec ./...