Skip to content

Commit e6dfc93

Browse files
committed
Run script/lint like every other repo
1 parent b7f1e77 commit e6dfc93

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ jobs:
3636
- uses: actions/setup-go@v5
3737
with:
3838
go-version-file: go.mod
39-
cache: false # for this job we rely on golangci-lint-action's cache
40-
- name: Lint (other)
39+
- run: go mod download
40+
- name: Lint
4141
run: script/lint
42-
- name: Lint (golangci-lint)
43-
uses: golangci/golangci-lint-action@v4
44-
with:
45-
version: v1.55.2
42+
- name: Formatting
43+
run: CHECKONLY=1 script/format

script/lint

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ set -eu
77
cd "$(dirname "$0")"
88
cd ..
99

10+
if [ "$GITHUB_ACTIONS" = "true" ]; then
11+
set -- "$@" --out-format=github-actions
12+
fi
13+
1014
go generate ./...
1115
if ! git diff --exit-code >/dev/null; then
1216
echo "Error: generated code is not up-to-date! Run 'go generate ./...' and update your branch." >&2
1317
exit 1
1418
fi
1519

16-
# On GitHub actions, this is run as a separate task
17-
if [ "$GITHUB_ACTIONS" != "true" ]; then
18-
exec go run github.com/golangci/golangci-lint/cmd/[email protected] run
19-
fi
20+
exec go run github.com/golangci/golangci-lint/cmd/[email protected] run "$@"

0 commit comments

Comments
 (0)