-
Notifications
You must be signed in to change notification settings - Fork 20
42 lines (34 loc) · 1.08 KB
/
static_analysis.yml
File metadata and controls
42 lines (34 loc) · 1.08 KB
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
name: Static Analysis
on: [push, pull_request]
permissions:
contents: read
jobs:
static_analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version: "stable"
- name: Install analysis tools
run: |
go install mvdan.cc/gofumpt@latest
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/mattn/goveralls@latest
go install lucor.dev/lian@latest
- name: Vet
run: go vet ./...
- name: Formatting
run: |
gofumpt -d -e .
test -z "$(goimports -e -d . | tee /dev/stderr)"
- name: Gocyclo
run: gocyclo -over 30 .
- name: Staticcheck
run: staticcheck ./...
- name: Check license of dependencies
run: lian -d --allowed="Apache-2.0, BSD-2-Clause, BSD-3-Clause, MIT, ISC"