From 3af318138a2d598f53eb29f7953dbdad78163eee Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Fri, 15 Jul 2022 15:40:04 +0200 Subject: [PATCH 1/7] chore: quick cleaning --- .../goanalysis/runner_loadingpackage.go | 10 ++++++++- .../goanalysis/runner_loadingpackage_ti.go | 21 ------------------- .../runner_loadingpackage_ti_go117.go | 20 ------------------ pkg/lint/linter/linter.go | 4 ++-- test/linters_test.go | 13 ++++-------- 5 files changed, 15 insertions(+), 53 deletions(-) delete mode 100644 pkg/golinters/goanalysis/runner_loadingpackage_ti.go delete mode 100644 pkg/golinters/goanalysis/runner_loadingpackage_ti_go117.go diff --git a/pkg/golinters/goanalysis/runner_loadingpackage.go b/pkg/golinters/goanalysis/runner_loadingpackage.go index 0a9653b8d20c..a5b5cccfeef7 100644 --- a/pkg/golinters/goanalysis/runner_loadingpackage.go +++ b/pkg/golinters/goanalysis/runner_loadingpackage.go @@ -121,7 +121,15 @@ func (lp *loadingPackage) loadFromSource(loadMode LoadMode) error { pkg.IllTyped = true - pkg.TypesInfo = newTypesInfo() + pkg.TypesInfo = &types.Info{ + Types: make(map[ast.Expr]types.TypeAndValue), + Instances: make(map[*ast.Ident]types.Instance), + Defs: make(map[*ast.Ident]types.Object), + Uses: make(map[*ast.Ident]types.Object), + Implicits: make(map[ast.Node]types.Object), + Scopes: make(map[ast.Node]*types.Scope), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + } importer := func(path string) (*types.Package, error) { if path == unsafePkgName { diff --git a/pkg/golinters/goanalysis/runner_loadingpackage_ti.go b/pkg/golinters/goanalysis/runner_loadingpackage_ti.go deleted file mode 100644 index 798add627074..000000000000 --- a/pkg/golinters/goanalysis/runner_loadingpackage_ti.go +++ /dev/null @@ -1,21 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -package goanalysis - -import ( - "go/ast" - "go/types" -) - -func newTypesInfo() *types.Info { - return &types.Info{ - Types: make(map[ast.Expr]types.TypeAndValue), - Instances: make(map[*ast.Ident]types.Instance), - Defs: make(map[*ast.Ident]types.Object), - Uses: make(map[*ast.Ident]types.Object), - Implicits: make(map[ast.Node]types.Object), - Scopes: make(map[ast.Node]*types.Scope), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - } -} diff --git a/pkg/golinters/goanalysis/runner_loadingpackage_ti_go117.go b/pkg/golinters/goanalysis/runner_loadingpackage_ti_go117.go deleted file mode 100644 index 096ac97c5f07..000000000000 --- a/pkg/golinters/goanalysis/runner_loadingpackage_ti_go117.go +++ /dev/null @@ -1,20 +0,0 @@ -//go:build go1.17 && !go1.18 -// +build go1.17,!go1.18 - -package goanalysis - -import ( - "go/ast" - "go/types" -) - -func newTypesInfo() *types.Info { - return &types.Info{ - Types: make(map[ast.Expr]types.TypeAndValue), - Defs: make(map[*ast.Ident]types.Object), - Uses: make(map[*ast.Ident]types.Object), - Implicits: make(map[ast.Node]types.Object), - Scopes: make(map[ast.Node]*types.Scope), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - } -} diff --git a/pkg/lint/linter/linter.go b/pkg/lint/linter/linter.go index 01e2196911e0..7d3b2260a519 100644 --- a/pkg/lint/linter/linter.go +++ b/pkg/lint/linter/linter.go @@ -21,8 +21,8 @@ type Noop struct { } func (n Noop) Run(_ context.Context, lintCtx *Context) ([]result.Issue, error) { - lintCtx.Log.Warnf("%s is disabled because of go1.18."+ - " You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.", n.name) + lintCtx.Log.Warnf("%s is disabled because of generics."+ + " You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.", n.name) return nil, nil } diff --git a/test/linters_test.go b/test/linters_test.go index a5d2a3c0ab7b..9e5d641f5edd 100644 --- a/test/linters_test.go +++ b/test/linters_test.go @@ -312,15 +312,10 @@ func extractRunContextFromComments(t *testing.T, sourcePath string) *runContext require.Failf(t, "invalid prefix of comment line %s", line) } - // TODO(ldez) replace that by strings.Cut when we will drop go1.17 - var before string - var after string - if i := strings.Index(line, " "); i >= 0 { - before = line[:i] - after = strings.TrimSpace(line[i+len(" "):]) - } else { - require.Failf(t, "invalid prefix of comment line %s", line) - } + before, after, found := strings.Cut(line, " ") + require.Truef(t, found, "invalid prefix of comment line %s", line) + + after = strings.TrimSpace(after) switch before { case "//golangcitest:args": From 513e8d45458ececfe5dba294ea735fd3bfb0cfe1 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Fri, 15 Jul 2022 15:48:38 +0200 Subject: [PATCH 2/7] chore: update Go versions --- .github/workflows/post-release.yml | 4 ++-- .github/workflows/pr-extra.yml | 4 ++-- .github/workflows/pr.yml | 16 ++++++++-------- .github/workflows/tag.yml | 8 ++++---- .golangci.reference.yml | 6 +++--- build/Dockerfile | 4 ++-- build/Dockerfile.alpine | 4 ++-- go.mod | 2 +- netlify.toml | 6 +++--- 9 files changed, 27 insertions(+), 27 deletions(-) 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 29651c09992e..f442bfebf1e8 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 d58286101034..8e7ecf225aa6 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" From 11fef987d731d6c58d062c5557da28056e9e910d Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Mon, 1 Aug 2022 16:08:27 +0200 Subject: [PATCH 3/7] compatibility with previous version of golangci-lint --- .github/workflows/pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 18d04b7bcb6c..4a5770747999 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -35,7 +35,8 @@ jobs: 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-rc.1). - go-version: ${{ env.GO_VERSION }} +# go-version: ${{ env.GO_VERSION }} + go-version: 1.18 - name: lint uses: golangci/golangci-lint-action@v3.2.0 with: From fb963b1b8af4b5e9913a0505cdf9a17a1fc78626 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Mon, 1 Aug 2022 16:11:33 +0200 Subject: [PATCH 4/7] netlify: downgrade Go version --- netlify.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index dcd0c45f1cf1..59107f9176f4 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,5 +1,5 @@ [context.production.environment] - GO_VERSION = "1.19" + GO_VERSION = "1.18" 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.19" + GO_VERSION = "1.18" 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.19" + GO_VERSION = "1.18" NODE_VERSION = "17" # TODO https://github.com/golangci/golangci-lint/pull/2904#issuecomment-1146870535 # NPM_FLAGS = "--legacy-peer-deps" From 8b175acb88ac6a0e0ec75ab290adbf6b89ffa7fc Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Mon, 1 Aug 2022 16:19:22 +0200 Subject: [PATCH 5/7] go1.19 fmt --- pkg/golinters/staticcheck_common.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/golinters/staticcheck_common.go b/pkg/golinters/staticcheck_common.go index 35d473883940..b421d30c1059 100644 --- a/pkg/golinters/staticcheck_common.go +++ b/pkg/golinters/staticcheck_common.go @@ -98,6 +98,7 @@ func staticCheckConfig(settings *config.StaticCheckSettings) *scconfig.Config { } // https://github.com/dominikh/go-tools/blob/9bf17c0388a65710524ba04c2d821469e639fdc2/lintcmd/lint.go#L437-L477 +// //nolint:gocritic // Keep the original source code. func filterAnalyzerNames(analyzers []string, checks []string) map[string]bool { allowedChecks := map[string]bool{} From b635b3c4a3acfa37bf2a7364cdb09026a806f540 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 3 Aug 2022 09:20:43 +0200 Subject: [PATCH 6/7] chore: bump to stable version --- .github/workflows/post-release.yml | 4 ++-- .github/workflows/pr-extra.yml | 4 ++-- .github/workflows/pr.yml | 18 +++++++++--------- .github/workflows/tag.yml | 8 ++++---- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index f491442224ca..c9ab5754f93e 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-rc.1). - go-version: 1.19.0-rc.2 + # 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 - 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 b285e0232e58..131f841092c6 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-rc.1). - go-version: 1.19.0-rc.2 + # 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 - 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 4a5770747999..0b705120417a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -6,7 +6,7 @@ on: pull_request: env: - GO_VERSION: 1.19.0-rc.2 + GO_VERSION: 1.19 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-rc.1). + # 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,8 +34,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-rc.1). -# go-version: ${{ env.GO_VERSION }} + # 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 }} # todo(ldez) uncomment after the next release v1.48.0 go-version: 1.18 - name: lint uses: golangci/golangci-lint-action@v3.2.0 @@ -53,7 +53,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-rc.1). + # 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 @@ -67,7 +67,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-rc.1). + # 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 @@ -79,13 +79,13 @@ jobs: matrix: golang: - 1.18 - - 1.19.0-rc.2 + - 1.19 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-rc.1). + # 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: @@ -109,7 +109,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-rc.1). + # 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 cd8e48c6fe86..0b4b05e57229 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-rc.1). - go-version: 1.19.0-rc.2 + # 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 - 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-rc.1). - go-version: 1.19.0-rc.2 + # 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 - name: Unshallow run: git fetch --prune --unshallow From d20f50359f9f9dc617f2adc6eae91d97402f81ce Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 3 Aug 2022 19:57:16 +0200 Subject: [PATCH 7/7] doc: improve comments --- .github/workflows/post-release.yml | 4 +++- .github/workflows/pr-extra.yml | 4 +++- .github/workflows/pr.yml | 24 ++++++++++++++++++------ .github/workflows/tag.yml | 8 ++++++-- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index c9ab5754f93e..91da23b43b00 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -14,7 +14,9 @@ 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-rc.1). + # Keep the following comment to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + # https://github.com/actions/setup-go#supported-version-syntax + # stable: 'false' go-version: 1.19 - name: Update GitHub action config diff --git a/.github/workflows/pr-extra.yml b/.github/workflows/pr-extra.yml index 131f841092c6..1552d4ea194e 100644 --- a/.github/workflows/pr-extra.yml +++ b/.github/workflows/pr-extra.yml @@ -13,7 +13,9 @@ 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-rc.1). + # Keep the following comment to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + # https://github.com/actions/setup-go#supported-version-syntax + # stable: 'false' go-version: 1.19 - name: Run go list run: go list -json -m all > go.list diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0b705120417a..cd3ea3b151f0 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -16,7 +16,9 @@ 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-rc.1). + # Keep the following comment to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + # https://github.com/actions/setup-go#supported-version-syntax + # stable: 'false' go-version: ${{ env.GO_VERSION }} - name: Checkout code uses: actions/checkout@v3 @@ -34,7 +36,9 @@ 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-rc.1). + # Keep the following comment to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + # https://github.com/actions/setup-go#supported-version-syntax + # stable: 'false' # go-version: ${{ env.GO_VERSION }} # todo(ldez) uncomment after the next release v1.48.0 go-version: 1.18 - name: lint @@ -53,7 +57,9 @@ 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-rc.1). + # Keep the following comment to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + # https://github.com/actions/setup-go#supported-version-syntax + # stable: 'false' go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI - name: Run tests run: make.exe test @@ -67,7 +73,9 @@ 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-rc.1). + # Keep the following comment to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + # https://github.com/actions/setup-go#supported-version-syntax + # stable: 'false' go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI - name: Run tests run: make test @@ -85,7 +93,9 @@ 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-rc.1). + # Keep the following comment to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + # https://github.com/actions/setup-go#supported-version-syntax + # stable: 'false' go-version: ${{ matrix.golang }} - uses: actions/cache@v3 with: @@ -109,7 +119,9 @@ 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-rc.1). + # Keep the following comment to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + # https://github.com/actions/setup-go#supported-version-syntax + # stable: 'false' 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 0b4b05e57229..b31c82bbdf73 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -14,7 +14,9 @@ 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-rc.1). + # Keep the following comment to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + # https://github.com/actions/setup-go#supported-version-syntax + # stable: 'false' go-version: 1.19 - name: Unshallow run: git fetch --prune --unshallow @@ -41,7 +43,9 @@ 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-rc.1). + # Keep the following comment to be able to use rc and beta version of Go (ex: 1.18.0-rc.1). + # https://github.com/actions/setup-go#supported-version-syntax + # stable: 'false' go-version: 1.19 - name: Unshallow