File tree Expand file tree Collapse file tree 2 files changed +5
-36
lines changed
Expand file tree Collapse file tree 2 files changed +5
-36
lines changed Original file line number Diff line number Diff line change @@ -57,46 +57,21 @@ jobs:
5757 - name : Publish test coverage
5858 uses : codecov/codecov-action@v4
5959
60- fmt :
60+ golangci :
61+ name : lint
6162 runs-on : ubuntu-latest
62-
6363 steps :
64- - name : Checkout
65- uses : actions/checkout@v4
66-
67- - name : Setup Go
68- uses : actions/setup-go@v5
64+ - uses : actions/checkout@v4
65+ - uses : actions/setup-go@v5
6966 with :
7067 go-version : 1.23.2
71-
72- # No need to download cached dependencies when running gofmt.
73- cache : false
74-
75- - name : Install goimports
76- run : |
77- go install golang.org/x/tools/cmd/goimports@latest
78-
79- - name : Run make fmt
80- run : |
81- make fmt
82-
8368 - name : Run go mod tidy
8469 run : |
8570 go mod tidy
86-
8771 - name : Fail on differences
8872 run : |
8973 # Exit with status code 1 if there are differences (i.e. unformatted files)
9074 git diff --exit-code
91-
92- golangci :
93- name : lint
94- runs-on : ubuntu-latest
95- steps :
96- - uses : actions/checkout@v4
97- - uses : actions/setup-go@v5
98- with :
99- go-version : 1.23.2
10075 - name : golangci-lint
10176 uses : golangci/golangci-lint-action@v6
10277 with :
Original file line number Diff line number Diff line change 11default : build
22
3- fmt :
4- @echo " ✓ Formatting source code with goimports ..."
5- @goimports -w $(shell find . -type f -name '* .go' -not -path "./vendor/* ")
6- @echo " ✓ Formatting source code with gofmt ..."
7- @gofmt -w $(shell find . -type f -name '* .go' -not -path "./vendor/* ")
8-
93lint : vendor
104 @echo " ✓ Linting source code with https://golangci-lint.run/ (with --fix)..."
115 @golangci-lint run --fix ./...
@@ -43,4 +37,4 @@ schema:
4337 @echo " ✓ Generating json-schema ..."
4438 @go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema.json
4539
46- .PHONY : fmt lint lintcheck test testonly coverage build snapshot vendor integration schema
40+ .PHONY : lint lintcheck test testonly coverage build snapshot vendor integration schema
You can’t perform that action at this time.
0 commit comments