-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (32 loc) · 939 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
36
37
name: Lint
on:
pull_request:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.22.x
- name: Install Golines and GoFumpt
run: |
go install github.com/segmentio/golines@latest
go install mvdan.cc/gofumpt@latest
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout 5m0s --verbose
- name: Verify formatting
run: |
make lint
if [[ -n "$(git status --porcelain | grep -v 'argo-cd\|gitops-engine')" ]]; then
echo "The following files have formatting issues:"
git status --porcelain
echo "Please run 'make lint' locally and commit the changes"
exit 1
fi