-
Notifications
You must be signed in to change notification settings - Fork 45
37 lines (30 loc) · 918 Bytes
/
static_analysis.yml
File metadata and controls
37 lines (30 loc) · 918 Bytes
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
name: Static Analysis
on:
push:
branches: [ main, develop ]
pull_request:
workflow_dispatch:
jobs:
static-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.23
- name: Install lint tools
run: |
go install golang.org/x/lint/golint@latest
go install github.com/gordonklaus/ineffassign@latest
go install github.com/client9/misspell/cmd/misspell@latest
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
- name: Check gofmt
run: test -z "$(gofmt -l .)" || (echo "Code is not gofmt'ed" && exit 1)
- name: Run go vet
run: go vet ./...
- name: Run gocyclo
run: gocyclo -over 15 .
- name: Run ineffassign
run: ineffassign ./...
- name: Run misspell
run: misspell -error ./...