diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1946c89..53ef5d2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,9 +14,8 @@ on: - main - release-* env: - GO_VERSION: "1.22" - GO_RELEASER_VERSION: "v1.24.0" - GO_LANGCI_LINT_VERSION: "v1.56.2" + GO_VERSION: "1.23" + GO_LANGCI_LINT_VERSION: "v1.61.0" GO_TESTSUM_VERSION: "1.11.0" jobs: diff --git a/.golangci.yaml b/.golangci.yaml index a23e79a..c9dc009 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,6 +1,8 @@ --- # golangci.com configuration # https://github.com/golangci/golangci/wiki/Configuration +run: + timeout: 5m linters-settings: depguard: @@ -16,7 +18,7 @@ linters-settings: lines: 120 statements: 80 gci: - local-prefixes: github.com/golangci/golangci-lint + prefix: github.com/golangci/golangci-lint goconst: min-len: 2 min-occurrences: 2 @@ -39,17 +41,8 @@ linters-settings: local-prefixes: github.com/golangci/golangci-lint golint: min-confidence: 0 - gomnd: - settings: - mnd: - # don't include the "operation" and "assign" - checks: - - argument - - case - - condition - - return govet: - check-shadowing: true + shadow: true settings: printf: funcs: @@ -74,8 +67,7 @@ linters: - asciicheck - bodyclose - dogsled - - errcheck - - exportloopref + - errcheck - exhaustive - funlen - gochecknoinits @@ -152,9 +144,4 @@ issues: - gocritic - text: "G404" linters: - - gosec - -run: - timeout: 5m - skip-dirs: - - pkg/testharness/testdata \ No newline at end of file + - gosec \ No newline at end of file diff --git a/go.mod b/go.mod index 68f8197..56207c5 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module github.com/aserto-dev/runtime go 1.21 +toolchain go1.23.2 + require ( github.com/aserto-dev/logger v0.0.6 github.com/fsnotify/fsnotify v1.7.0 diff --git a/makefile b/makefile index a53d19e..c866636 100644 --- a/makefile +++ b/makefile @@ -14,15 +14,17 @@ EXT_DIR := ./.ext EXT_BIN_DIR := ${EXT_DIR}/bin EXT_TMP_DIR := ${EXT_DIR}/tmp +GO_VER := 1.23 GOTESTSUM_VER := 1.11.0 -GOLANGCI-LINT_VER := 1.56.2 +GOLANGCI-LINT_VER := 1.61.0 WIRE_VER := 0.6.0 .DEFAULT_GOAL := test .PHONY: deps -deps: info install-golangci-lint install-gotestsum install-wire +deps: info install-golangci-lint install-gotestsum install-wire @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @(go env GOVERSION | grep "go${GO_VER}") || (echo "go version check failed expected go${GO_VER} got $$(go env GOVERSION)"; exit 1) .PHONY: generate generate: