Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade go to 1.23.2 #68

Merged
merged 2 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21.6'
go-version: '1.23.2'
id: go

- name: Check out code into the Go module directory
Expand Down
16 changes: 6 additions & 10 deletions .golangci.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@
"nolintlint",
"depguard",
"goconst",
"maligned",
"structcheck",
"varcheck",
"nosnakecase",
"interfacer",
"golint",
"scopelint",
"exhaustivestruct",
"ifshort",
"deadcode"
"exportloopref",
"mnd",
"copyloopvar",
"execinquery",
"govet",
"intrange"
]
},
"linters-settings": {
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
GOLANG_CI_LINT_VER:=v1.55.2
GOLANG_CI_LINT_VER:=v1.61.0
COVER_PACKAGES=${shell go list ./... | grep -Ev 'test|cmd' | tr '\n' ','}

all: lint test
.PHONY: all

lint: bin/golangci-lint
./bin/golangci-lint run
lint: bin/golangci-lint-$(GOLANG_CI_LINT_VER)
./bin/golangci-lint-$(GOLANG_CI_LINT_VER) run
.PHONY: lint

test:
Expand All @@ -27,11 +27,12 @@ tidy:
go mod tidy
.PHONY: vendor

bin/golangci-lint:
bin/golangci-lint-$(GOLANG_CI_LINT_VER):
curl \
-sSfL \
https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
| sh -s $(GOLANG_CI_LINT_VER)
mv bin/golangci-lint bin/golangci-lint-$(GOLANG_CI_LINT_VER)

build:
go build -o ./bin/rex ./cmd/generator/main.go
1 change: 1 addition & 0 deletions pkg/dialect/base/helper_number_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func TestNumberRange_broot(t *testing.T) {

for i := -100; i < 100; i++ {
for j := i; j < 100; j++ {
// nolint: gosec // It's a test, and range is defined in the loop.
newNumberRangeTestCase(int32(i), int32(j)).Run(t, 100)
}
}
Expand Down
1 change: 1 addition & 0 deletions pkg/dialect/base/helper_web_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ func FuzzIPv4(f *testing.F) {

expected := net.ParseIP(fuzzIP) != nil
actual := re.MatchString(fuzzIP)

if expected != actual {
t.Errorf("Actual: %v, Expected: %v", actual, expected)
}
Expand Down
Loading