-
Notifications
You must be signed in to change notification settings - Fork 5k
36 lines (32 loc) · 1021 Bytes
/
static-analysis.yaml
File metadata and controls
36 lines (32 loc) · 1021 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
---
name: Static Analysis
permissions:
contents: read
pull-requests: read
on:
pull_request:
types: ['opened', 'synchronize']
paths:
- '.github/workflows/static-analysis.yaml'
- 'vendor/**'
- 'internal/**.go'
concurrency:
group: 'staticAnalysys-${{ github.head_ref }}'
cancel-in-progress: true
jobs:
detect:
runs-on: custom-linux-small
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: ./.go-version
- run: bash ./scripts/run-static-analysis.sh
- name: Guidance on failure
if: failure()
run: |
echo "::error::Static Analysis failed."
echo ""
echo "Run 'bash ./scripts/run-static-analysis.sh' locally to reproduce."
echo "This check looks for common code patterns that may indicate bugs or"
echo "deviations from project conventions."