diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index ed8bc099..07f3d8ba 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -16,14 +16,15 @@ jobs: uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: go-version-file: 'go.mod' cache: true - - name: Install golangci-lint - run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.5.0 + - name: golangci-lint + uses: golangci/golangci-lint-action@v9 + with: + version: v2.12.2 - name: Check formatting run: | diff --git a/.golangci.yml b/.golangci.yml index dbab8885..8330b89c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,6 @@ # golangci-lint configuration for roxie -version: 2 +version: "2" run: timeout: 5m @@ -15,6 +15,10 @@ linters: - ineffassign # Detect ineffectual assignments - misspell # Find commonly misspelled words + settings: + staticcheck: + checks: ["all", "-SA4009", "-ST1000", "-ST1003", "-ST1020"] + # Disable noisy linters disable: - errcheck # Too many false positives for cleanup code @@ -22,16 +26,12 @@ linters: - revive # Style linter is too opinionated - unparam # Often flags valid parameter flexibility -linters-settings: - staticcheck: - checks: ["all", "-SA4009"] # Disable "argument is overwritten" check - issues: # Don't limit the number of issues max-issues-per-linter: 0 max-same-issues: 0 output: - print-issued-lines: true - print-linter-name: true - sort-results: true + formats: + text: + path: stdout diff --git a/Dockerfile b/Dockerfile index 2c40af0e..a26c41c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,7 @@ ARG TARGETARCH WORKDIR /build USER root +ENV GOTOOLCHAIN=auto # Copy go mod files first for better layer caching COPY go.mod go.sum ./ diff --git a/go.mod b/go.mod index 03e0c77a..b1b60748 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/stackrox/roxie -go 1.25.6 +go 1.26 require ( dario.cat/mergo v1.0.2