diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index 9a4da2a1a3f2..f491442224ca 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -14,8 +14,8 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - # stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1). - go-version: 1.18 + stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + go-version: 1.19.0-rc.2 - name: Update GitHub action config run: make assets/github-action-config.json diff --git a/.github/workflows/pr-extra.yml b/.github/workflows/pr-extra.yml index 53f705d675c4..b285e0232e58 100644 --- a/.github/workflows/pr-extra.yml +++ b/.github/workflows/pr-extra.yml @@ -13,8 +13,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - # stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1). - go-version: 1.18 + stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + go-version: 1.19.0-rc.2 - name: Run go list run: go list -json -m all > go.list - name: Nancy diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c5ba44d72632..18d04b7bcb6c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -6,7 +6,7 @@ on: pull_request: env: - GO_VERSION: 1.18 + GO_VERSION: 1.19.0-rc.2 jobs: # Check if there any dirty change for go mod tidy @@ -16,7 +16,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - # stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1). + stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). go-version: ${{ env.GO_VERSION }} - name: Checkout code uses: actions/checkout@v3 @@ -34,7 +34,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - # stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1). + stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). go-version: ${{ env.GO_VERSION }} - name: lint uses: golangci/golangci-lint-action@v3.2.0 @@ -52,7 +52,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - # stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1). + stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI - name: Run tests run: make.exe test @@ -66,7 +66,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - # stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1). + stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI - name: Run tests run: make test @@ -77,14 +77,14 @@ jobs: strategy: matrix: golang: - - 1.17 - 1.18 + - 1.19.0-rc.2 steps: - uses: actions/checkout@v3 - name: Install Go uses: actions/setup-go@v3 with: - # stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1). + stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). go-version: ${{ matrix.golang }} - uses: actions/cache@v3 with: @@ -108,7 +108,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - # stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1). + stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). go-version: ${{ env.GO_VERSION }} - name: Check generated files are up to date run: make fast_check_generated diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 2575bf925ae4..cd8e48c6fe86 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -14,8 +14,8 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - # stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1). - go-version: 1.18 + stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + go-version: 1.19.0-rc.2 - name: Unshallow run: git fetch --prune --unshallow @@ -41,8 +41,8 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - # stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1). - go-version: 1.18 + stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + go-version: 1.19.0-rc.2 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.golangci.reference.yml b/.golangci.reference.yml index bff571126a43..63c3b9cda263 100644 --- a/.golangci.reference.yml +++ b/.golangci.reference.yml @@ -68,9 +68,9 @@ run: allow-parallel-runners: false # Define the Go version limit. - # Mainly related to generics support in go1.18. - # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.17 - go: '1.18' + # Mainly related to generics support since go1.18. + # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.18 + go: '1.19' # output configuration options diff --git a/build/Dockerfile b/build/Dockerfile index 86c1de1506e2..0bf96710448d 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,5 +1,5 @@ # stage 1 building the code -FROM golang:1.18 as builder +FROM golang:1.19 as builder ARG VERSION ARG SHORT_COMMIT @@ -10,7 +10,7 @@ WORKDIR /golangci RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$VERSION -X main.commit=$SHORT_COMMIT -X main.date=$DATE" -o golangci-lint ./cmd/golangci-lint/main.go # stage 2 -FROM golang:1.18 +FROM golang:1.19 # don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume COPY --from=builder /golangci/golangci-lint /usr/bin/ CMD ["golangci-lint"] diff --git a/build/Dockerfile.alpine b/build/Dockerfile.alpine index a0b15faf71e4..37e97695d1a0 100644 --- a/build/Dockerfile.alpine +++ b/build/Dockerfile.alpine @@ -1,5 +1,5 @@ # stage 1 building the code -FROM golang:1.18-alpine as builder +FROM golang:1.19-alpine as builder ARG VERSION ARG SHORT_COMMIT @@ -15,7 +15,7 @@ RUN apk --no-cache add gcc musl-dev git mercurial RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$VERSION -X main.commit=$SHORT_COMMIT -X main.date=$DATE" -o golangci-lint ./cmd/golangci-lint/main.go # stage 2 -FROM golang:1.18-alpine +FROM golang:1.19-alpine # gcc is required to support cgo; # git and mercurial are needed most times for go get`, etc. # See https://github.com/docker-library/golang/issues/80 diff --git a/go.mod b/go.mod index 9b94befa14cb..b0f6931ddc17 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/golangci/golangci-lint -go 1.18 +go 1.19 require ( 4d63.com/gochecknoglobals v0.1.0 diff --git a/netlify.toml b/netlify.toml index 59107f9176f4..dcd0c45f1cf1 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,5 +1,5 @@ [context.production.environment] - GO_VERSION = "1.18" + GO_VERSION = "1.19" NODE_VERSION = "17" # TODO https://github.com/golangci/golangci-lint/pull/2904#issuecomment-1146870535 # NPM_FLAGS = "--legacy-peer-deps" @@ -7,7 +7,7 @@ NPM_VERSION = "8.5.5" [context.deploy-preview.environment] - GO_VERSION = "1.18" + GO_VERSION = "1.19" NODE_VERSION = "17" # TODO https://github.com/golangci/golangci-lint/pull/2904#issuecomment-1146870535 # NPM_FLAGS = "--legacy-peer-deps" @@ -15,7 +15,7 @@ NPM_VERSION = "8.5.5" [context.branch-deploy.environment] - GO_VERSION = "1.18" + GO_VERSION = "1.19" NODE_VERSION = "17" # TODO https://github.com/golangci/golangci-lint/pull/2904#issuecomment-1146870535 # NPM_FLAGS = "--legacy-peer-deps"