File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 37
37
with :
38
38
go-version-file : go.mod
39
39
cache : false # for this job we rely on golangci-lint-action's cache
40
- - name : Lint
40
+ - name : Lint (other)
41
+ run : script/lint
42
+ - name : Lint (golangci-lint)
41
43
uses : golangci/golangci-lint-action@v3
42
44
with :
43
45
version : v1.52
Original file line number Diff line number Diff line change 2
2
3
3
set -eu
4
4
5
+ : " ${GITHUB_ACTIONS:= } "
6
+
5
7
cd " $( dirname " $0 " ) "
6
8
cd ..
7
9
8
- exec go run github.com/golangci/golangci-lint/cmd/golangci-lint run
10
+ go generate ./...
11
+ if ! git diff --exit-code > /dev/null; then
12
+ echo " Error: generated code is not up-to-date! Run 'go generate ./...' and update your branch." >&2
13
+ exit 1
14
+ fi
15
+
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/golangci-lint run
19
+ fi
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const (
26
26
// Don't forget to rerun `go generate ./...` if you add or remove values from
27
27
// the DetailLevel or SampleMode enums.
28
28
//
29
- //go:generate stringer -type=DetailLevel,SampleMode -output=tracestate_string.go
29
+ //go:generate go run golang.org/x/tools/cmd/ stringer -type=DetailLevel,SampleMode -output=tracestate_string.go
30
30
type DetailLevel int
31
31
type SampleMode int
32
32
You can’t perform that action at this time.
0 commit comments