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

x/tools/internal/typesinternal/: regression inside v0.19.0 related to ReceiverNamed #66259

Closed
ldez opened this issue Mar 12, 2024 · 11 comments
Closed
Assignees
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@ldez
Copy link

ldez commented Mar 12, 2024

Go version

go version go1.22.1 linux/amd64

Output of go env in your module/workspace:

GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/ldez/.cache/go-build'
GOENV='/home/ldez/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/ldez/sources/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/ldez/sources/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/ldez/sources/go/src/github.com/golangci/golangci-lint/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1404820727=/tmp/go-build -gno-record-gcc-switches'

What did you do?

Using httpresponse pass through golangci-lint (current master branch) on this project golangci-repro-4482

./golangci-lint run ./tools/cmd/debug/...

Related to golangci/golangci-lint#4482

I bisected x/tools and the first commit with this problem is c111c4dfa

the value of n in n, ok := aliases.Unalias(t).(*types.Named) (inside IsNamedType) is nil and ok is true.

I think the problem is related to named, _ = aliases.Unalias(t).(*types.Named) inside ReceiverNamed.

The type assertion is "forcing" the type of named.

I'm still trying to find a minimal reproducible example, but if I extract the code the panic disappears.

What did you see happen?

A panic:

runtime/debug.Stack()
        /usr/lib/go/src/runtime/debug/stack.go:24 +0x5e
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
        /home/ldez/sources/go/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:108 +0x277
panic({0x169eda0?, 0x22c2360?})
        /usr/lib/go/src/runtime/panic.go:770 +0x132
go/types.(*Named).Obj(...)
        /usr/lib/go/src/go/types/named.go:295
golang.org/x/tools/go/analysis/passes/internal/analysisutil.IsNamedType({0x1aa5cf0?, 0x0?}, {0x180ef88, 0x8}, {0xc0022d7af8, 0x1, 0x6c61562a5d5b2073?})
        /home/ldez/sources/go/pkg/mod/golang.org/x/tools@v0.19.0/go/analysis/passes/internal/analysisutil/util.go:123 +0x49
golang.org/x/tools/go/analysis/passes/httpresponse.isHTTPFuncOrMethodOnClient(0xc015ef7380, 0xc0022d7ba0?)
        /home/ldez/sources/go/pkg/mod/golang.org/x/tools@v0.19.0/go/analysis/passes/httpresponse/httpresponse.go:122 +0xfb
golang.org/x/tools/go/analysis/passes/httpresponse.run.func1({0x1aa5110?, 0xc01642f700?}, 0x10?, {0xc007030200, 0x6, 0x20})
        /home/ldez/sources/go/pkg/mod/golang.org/x/tools@v0.19.0/go/analysis/passes/httpresponse/httpresponse.go:62 +0x73
golang.org/x/tools/go/ast/inspector.(*Inspector).WithStack(0xc0164ed200, {0xc0022d7cb8?, 0x22ee1c0?, 0xc001208008?}, 0xc002155cc8)
        /home/ldez/sources/go/pkg/mod/golang.org/x/tools@v0.19.0/go/ast/inspector/inspector.go:148 +0x188
golang.org/x/tools/go/analysis/passes/httpresponse.run(0xc01e3fc0d0)
        /home/ldez/sources/go/pkg/mod/golang.org/x/tools@v0.19.0/go/analysis/passes/httpresponse/httpresponse.go:57 +0x112
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0xc00128e7e0)
        /home/ldez/sources/go/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:190 +0xa02
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
        /home/ldez/sources/go/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:112 +0x17
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc001b5c3c0, {0x18596d7, 0xc}, 0xc002138f48)
        /home/ldez/sources/go/src/github.com/golangci/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x44
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0xc001037e60?)
        /home/ldez/sources/go/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:111 +0x7a
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0xc00128e7e0)
        /home/ldez/sources/go/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xa8
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze in goroutine 204
        /home/ldez/sources/go/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x205 
WARN [runner] Can't run linter goanalysis_metalinter: goanalysis_metalinter: httpresponse: package "main" (isInitialPkg: true, needAnalyzeSource: true): runtime error: invalid memory address or nil pointer dereference

What did you expect to see?

No panic.

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Mar 12, 2024
@gopherbot gopherbot added this to the Unreleased milestone Mar 12, 2024
@ldez ldez changed the title x/tools/internal/typesinternal/: regression inside v0.19.0 related to typesinternal.ReceiverNamed x/tools/internal/typesinternal/: regression inside v0.19.0 related to aliases.Unalias Mar 12, 2024
@timothy-king timothy-king self-assigned this Mar 12, 2024
@ldez ldez changed the title x/tools/internal/typesinternal/: regression inside v0.19.0 related to aliases.Unalias x/tools/internal/typesinternal/: regression inside v0.19.0 related to ReceiverNamed Mar 12, 2024
@ldez
Copy link
Author

ldez commented Mar 12, 2024

The problem comes from here:

func ReceiverNamed(recv *types.Var) (isPtr bool, named *types.Named) { // <---
	t := recv.Type()
	if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok {
		isPtr = true
		t = ptr.Elem()
	}
	named, _ = aliases.Unalias(t).(*types.Named) // <---
	return
}

If I replace the call to this function inside httpresponse by:

func ReceiverNamedTemp(recv *types.Var) (isPtr bool, named types.Type) {
	t := recv.Type()
	if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok {
		isPtr = true
		t = ptr.Elem()
	}

	named, ok := aliases.Unalias(t).(*types.Named)
	if !ok {
		named = aliases.Unalias(t)
	}

	return
}

The problem disappears.

The type assertion, inside ReceiverNamed, is forcing the type of named, and then when IsNamedType checks the same assertion the result is true instead of false.

https://go.dev/play/p/woJnLMGAgdR

package typesinternal

import (
	"fmt"
	"go/token"
	"go/types"
	"testing"

	"golang.org/x/tools/internal/aliases"
)

func Test_ReceiverNamed(t *testing.T) {
	v := types.NewVar(token.NoPos, nil, "", types.NewPointer(types.NewArray(types.Typ[types.Int], 10)))
	ptr, named := ReceiverNamed(v)

	println(ptr)
	fmt.Printf("%T\n", named)

	// true
	// *types.Named

	_, ok := aliases.Unalias(named).(*types.Named)

	println(ok)

	// true
}

func Test_ReceiverNamedTemp(t *testing.T) {
	v := types.NewVar(token.NoPos, nil, "", types.NewPointer(types.NewArray(types.Typ[types.Int], 10)))
	ptr, named := ReceiverNamedTemp(v)

	println(ptr)
	fmt.Printf("%T\n", named)

	// true
	// *types.Array

	_, ok := aliases.Unalias(named).(*types.Named)

	println(ok)

	// false
}

func ReceiverNamedTemp(recv *types.Var) (isPtr bool, named types.Type) {
	t := recv.Type()
	if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok {
		isPtr = true
		t = ptr.Elem()
	}

	named, ok := aliases.Unalias(t).(*types.Named)
	if !ok {
		named = aliases.Unalias(t)
	}

	return
}

The problem affects at least httpresponse, httpmux, loopclosure.

@ldez
Copy link
Author

ldez commented Mar 12, 2024

The problem is the function itself because it's designed to return a *types.Named.
I don't know what the right solution is. 🤔

@ldez
Copy link
Author

ldez commented Mar 12, 2024

It's a critical problem for, at least, us (golangci-lint maintainers) and, I think, for go vet.

I cannot downgrade because some dependencies already use v0.19.0 and I cannot use replace directive because go install doesn't support it.

I will postpone the release of golangci-lint for now.

I am interested in creating a fix, but I think this should be discussed before doing something.

@timothy-king
Copy link
Contributor

timothy-king commented Mar 12, 2024

If ReceiverNamedTemp is helping, that looks like a *types.Named to a types.Type conversion might be happening.

If this is the case, the desired solution is probably to audit the users of the function. Not update the signature.

@ldez
Copy link
Author

ldez commented Mar 12, 2024

ReceiverNamedTemp was just an example to illustrate the problem, not a suggestion.

I think you suggest that the root of the problem is not here, but at least, the expectations of the function seem optimistic about the type.
Maybe panic can be added?

@ldez
Copy link
Author

ldez commented Mar 12, 2024

I compiled the unitchecker from v0.19.0.

$ go vet -vettool=unitchecker ./tools/cmd/debug/...                                
# gitlab.com/accumulatenetwork/accumulate/tools/cmd/debug
# [gitlab.com/accumulatenetwork/accumulate/tools/cmd/debug]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x68c589]

goroutine 53 [running]:
go/types.(*Named).Obj(...)
        /usr/lib/go/src/go/types/named.go:295
golang.org/x/tools/go/analysis/passes/internal/analysisutil.IsNamedType({0x7b6958?, 0x0?}, {0x73cd99, 0x8}, {0xc002718a48, 0x1, 0x10?})
        ../../golangci-lint/x-tools/go/analysis/passes/internal/analysisutil/util.go:123 +0x49
golang.org/x/tools/go/analysis/passes/httpresponse.isHTTPFuncOrMethodOnClient(0xc00051ce40, 0xc002718af0?)
        ../../golangci-lint/x-tools/go/analysis/passes/httpresponse/httpresponse.go:122 +0xfb
golang.org/x/tools/go/analysis/passes/httpresponse.run.func1({0x7b6548?, 0xc0003b3800?}, 0x18?, {0xc002d4e000, 0x5, 0x20})
        ../../golangci-lint/x-tools/go/analysis/passes/httpresponse/httpresponse.go:62 +0x73
golang.org/x/tools/go/ast/inspector.(*Inspector).WithStack(0xc0025e96b0, {0xc002718c08?, 0x9688e0?, 0xc000600008?}, 0xc002718c18)
        ../../golangci-lint/x-tools/go/ast/inspector/inspector.go:148 +0x188
golang.org/x/tools/go/analysis/passes/httpresponse.run(0xc002d3a0d0)
        ../../golangci-lint/x-tools/go/analysis/passes/httpresponse/httpresponse.go:57 +0x112
golang.org/x/tools/go/analysis/unitchecker.run.func2.1()
        ../../golangci-lint/x-tools/go/analysis/unitchecker/unitchecker.go:382 +0x8ce
sync.(*Once).doSlow(0x6edb40?, 0xc001f72ff0?)
        /usr/lib/go/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
        /usr/lib/go/src/sync/once.go:65
golang.org/x/tools/go/analysis/unitchecker.run.func2(0x9676e0)
        ../../golangci-lint/x-tools/go/analysis/unitchecker/unitchecker.go:333 +0x19e
golang.org/x/tools/go/analysis/unitchecker.run.func3.1(0x0?)
        ../../golangci-lint/x-tools/go/analysis/unitchecker/unitchecker.go:404 +0x23
created by golang.org/x/tools/go/analysis/unitchecker.run.func3 in goroutine 1
        ../../golangci-lint/x-tools/go/analysis/unitchecker/unitchecker.go:403 +0x4

@gopherbot
Copy link

Change https://go.dev/cl/571057 mentions this issue: all: audit ReceiverNamed usage

@ldez
Copy link
Author

ldez commented Mar 12, 2024

A minimal reproducer
.
├── base.go
├── go.mod
├── go.sum
└── pkg
    └── json.go

base.go

package main

import (
	"net/http"

	"github.com/golangci/sandbox/pkg"
)

func Bar(_ *http.Server) {
	pkg.ChainFromJSON()
}

json.go

package pkg

func ChainFromJSON() (*[32]byte, error) {
	return nil, nil
}
$ go vet -vettool=unitchecker .
# github.com/golangci/sandbox
# [github.com/golangci/sandbox]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x68c649]

goroutine 55 [running]:
go/types.(*Named).Obj(...)
        /usr/lib/go/src/go/types/named.go:295
golang.org/x/tools/go/analysis/passes/internal/analysisutil.IsNamedType({0x7b6978?, 0x0?}, {0x73cd9d, 0x8}, {0xc0000a2a48, 0x1, 0x10?})
        ../../../..langci-lint/x-tools/go/analysis/passes/internal/analysisutil/util.go:129 +0x49
golang.org/x/tools/go/analysis/passes/httpresponse.isHTTPFuncOrMethodOnClient(0xc0000005b0, 0xc0000a2af0?)
        ../../../..langci-lint/x-tools/go/analysis/passes/httpresponse/httpresponse.go:139 +0xff
golang.org/x/tools/go/analysis/passes/httpresponse.run.func1({0x7b6568?, 0xc0001d2e40?}, 0x18?, {0xc00003a100, 0x5, 0x8})
        ../../../..langci-lint/x-tools/go/analysis/passes/httpresponse/httpresponse.go:65 +0x6f
golang.org/x/tools/go/ast/inspector.(*Inspector).WithStack(0xc0003b04c8, {0xc0000a2c08?, 0x9688e0?, 0xc000700008?}, 0xc0000a2c18)
        ../../../..langci-lint/x-tools/go/ast/inspector/inspector.go:148 +0x188
golang.org/x/tools/go/analysis/passes/httpresponse.run(0xc0000005b0)
        ../../../..langci-lint/x-tools/go/analysis/passes/httpresponse/httpresponse.go:57 +0x112
golang.org/x/tools/go/analysis/unitchecker.run.func2.1()
        ../../../..langci-lint/x-tools/go/analysis/unitchecker/unitchecker.go:382 +0x8ce
sync.(*Once).doSlow(0x6edb40?, 0xc0003bb230?)
        /usr/lib/go/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
        /usr/lib/go/src/sync/once.go:65
golang.org/x/tools/go/analysis/unitchecker.run.func2(0x9676e0)
        ../../../..langci-lint/x-tools/go/analysis/unitchecker/unitchecker.go:333 +0x19e
golang.org/x/tools/go/analysis/unitchecker.run.func3.1(0x0?)
        ../../../..langci-lint/x-tools/go/analysis/unitchecker/unitchecker.go:404 +0x23
created by golang.org/x/tools/go/analysis/unitchecker.run.func3 in goroutine 1
        ../../../..langci-lint/x-tools/go/analysis/unitchecker/unitchecker.go:403 +0x47

Maybe you will be able to use it inside a test.

@ldez
Copy link
Author

ldez commented Mar 13, 2024

It looks like a bug that comes from somewhere else because the type of the return parameter depends on the position of the function:

  • if the function ChainFromJSON is inside the base.go the type is *types.Named
  • if the function ChainFromJSON is inside another package the type is *types.Array

Maybe I missed something but it's an unexpected behavior.

@timothy-king
Copy link
Contributor

I can reproduce the stack trace for httpresponse. The proposed CL fixes it.

Do you have stack traces for httpmux or loopclosure? I can make both more cautious when using ReceiverNamed, but I do not yet have an example that crashes.

@ldez
Copy link
Author

ldez commented Mar 14, 2024

My assumptions were only based on the successive call to ReceiverNamed and IsNamedType.

But now, I think that only httpresponse can panic inside these 3 passes.

httpresponse has a problem because it uses return parameters, which can be a pointer to an unnamed element.

loopclosure and httpmux are using the receiver, then it cannot panic, because, except if I miss something, a receiver cannot be a pointer on an unnamed element. (e.g. a method on this kind of type type foo *struct{})

Not sure if you are interested in it but the problem happened on:

  • pointer on a buildin type
  • pointer on a slice/array of buildin type or anonymous struct
  • pointer on a map of buildin type or anonymous struct
  • pointer on anonymous structure

This is what I call "unnamed".

alecthomas pushed a commit to TBD54566975/scaffolder that referenced this issue Mar 25, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [golangci-lint](https://togithub.com/golangci/golangci-lint) | minor |
`1.56.2` -> `1.57.1` |

---

### Release Notes

<details>
<summary>golangci/golangci-lint (golangci-lint)</summary>

###
[`v1.57.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1571)

1.  Fixes:
    -   Ignore issues with invalid position (e.g. `contextcheck`).

###
[`v1.57.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1570)

1.  New linters
    -   `copyloopvar`: https://github.com/karamaru-alpha/copyloopvar
    -   `intrange`: https://github.com/ckaznocha/intrange
2.  Updated linters
    -   `dupword`: from 0.0.13 to 0.0.14
    -   `gci`: from 0.12.1 to 0.12.3
- `ginkgolinter`: from 0.15.2 to 0.16.1 (new option `force-expect-to`,
`validate-async-intervals`, and `forbid-spec-pollution`)
    -   `go-critic`: from 0.11.1 to 0.11.2
    -   `go-critic`: support of `enable-all` and `disable-all` options
    -   `go-spancheck`: from 0.5.2 to 0.5.3
    -   `gomodguard`: from 1.3.0 to 1.3.1
    -   `govet`: deprecation of `check-shadowing` ⚠️
- `govet`: disable temporarily `httpresponse` because of a bug
[golang/go#66259
    -   `misspell`: add `extra-words`
    -   `musttag`: from 0.8.0 to 0.9.0
    -   `nakedret`: from 2.0.2 to 2.0.4
    -   `paralleltest`: from 1.0.9 to 1.0.10
    -   `perfsprint`: from 0.6.0 to 0.7.1 (new option `strconcat`)
    -   `protogetter`: from 0.3.4 to 0.3.5
    -   `revive`: add `exclude` option
    -   `sloglint`: from 0.4.0 to 0.5.0 (new option `no-global`)
    -   `staticcheck`: from 0.4.6 to 0.4.7
    -   `testifylint`: from 1.1.2 to 1.2.0 (new option `bool-compare`)
    -   `unconvert`: to HEAD (new options `fast-math` and `safe`)
    -   `wrapcheck`: from 2.8.1 to 2.8.3
    -   Disable `copyloopvar` and `intrange` on Go < 1.22
3.  Enhancements
- 🧩 New custom linters system
https://golangci-lint.run/plugins/module-plugins/
- 🎉 Allow running only a specific linter without modifying the file
configuration (`--enable-only`)
    -   Allow custom sort order for the reports (`output.sort-order`)
- Automatically adjust the maximum concurrency to the container CPU
quota if `run.concurrency=0`
- Add `verify` command to check the configuration against the JSON
Schema
- Option to strictly follow Go generated file convention
(`issues.exclude-generated-strict`)
    -   Syntax to not override `severity` from linters (`@linter`)
    -   Use severities from `gosec`
    -   Create automatically directory related to `output.formats.path`
- Use the first issue without inline on `mergeLineIssues` on multiple
issues
4.  Misc.
- ⚠️ Inactivate deprecated linters (`deadcode`, `exhaustivestruct`,
`golint`, `ifshort`, `interfacer`, `maligned`, `nosnakecase`,
`scopelint`, `structcheck`, `varcheck`)
- ⚠️ Deprecated CLI flags have been removed (deprecated since 2018)
- ⚠️ Move `show-stats` option from `run` to `output` configuration
section
- ⚠️ Replace `run.skip-xxx` options by `issues.exclude-xxx` options
- ⚠️ Replace `output.format` by `output.formats` with a new file
configuration syntax
    -   Internal rewrite of the CLI
    -   Improve 'no go files to analyze' message
    -   Use `GOTOOLCHAIN=auto` inside the Docker images
5.  Documentation
- ⚠️ Define the linter deprecation cycle
https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
- 🎉 Use information from the previous release to create linter pages
- 🎉 Publish JSON schema on
https://golangci-lint.run/jsonschema/golangci.jsonschema.json
    -   Reorganize documentation pages
- Add an explanation about the configuration file inside golangci-lint
repository

**⚠️ Important ⚠️**

1. Deprecated linters are inactivated, you still need to disable them if
you are using `enable-all`.
2. Deprecated CLI flags (about linter settings and `deadline`) have been
removed.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/TBD54566975/scaffolder).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
kodiakhq bot pushed a commit to cloudquery/filetypes that referenced this issue Apr 1, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | minor | `v1.56.2` -> `v1.57.2` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>golangci/golangci-lint (golangci/golangci-lint)</summary>

### [`v1.57.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1572)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.1...v1.57.2)

1.  Updated linters
    -   `contextcheck`: from 1.1.4 to 1.1.5
    -   `copyloopvar`: from 1.0.8 to 1.0.10
    -   `ginkgolinter`: from 0.16.1 to 0.16.2
    -   `goconst`: from 1.7.0 to 1.7.1
    -   `gomoddirectives`: from 0.2.3 to 0.2.4
    -   `intrange`: from 0.1.0 to 0.1.1
2.  Misc.
    -   fix: display warnings on deprecated linter options
    -   fix: missing `colored-tab` output format
    -   fix: TeamCity `inspectionType` service message
3.  Documentation
    -   Remove invalid example about mixing files and directory
    -   Improve linters page

### [`v1.57.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1571)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.0...v1.57.1)

1.  Fixes:
    -   Ignore issues with invalid position (e.g. `contextcheck`).

### [`v1.57.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1570)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.2...v1.57.0)

1.  New linters
    -   `copyloopvar`: https://github.com/karamaru-alpha/copyloopvar
    -   `intrange`: https://github.com/ckaznocha/intrange
2.  Updated linters
    -   `dupword`: from 0.0.13 to 0.0.14
    -   `gci`: from 0.12.1 to 0.12.3
    -   `ginkgolinter`: from 0.15.2 to 0.16.1 (new option `force-expect-to`, `validate-async-intervals`, and `forbid-spec-pollution`)
    -   `go-critic`: from 0.11.1 to 0.11.2
    -   `go-critic`: support of `enable-all` and `disable-all` options
    -   `go-spancheck`: from 0.5.2 to 0.5.3
    -   `gomodguard`: from 1.3.0 to 1.3.1
    -   `govet`: deprecation of `check-shadowing` ⚠️
    -   `govet`: disable temporarily `httpresponse` because of a bug [golang/go#66259
    -   `misspell`: add `extra-words`
    -   `musttag`: from 0.8.0 to 0.9.0
    -   `nakedret`: from 2.0.2 to 2.0.4
    -   `paralleltest`: from 1.0.9 to 1.0.10
    -   `perfsprint`: from 0.6.0 to 0.7.1 (new option `strconcat`)
    -   `protogetter`: from 0.3.4 to 0.3.5
    -   `revive`: add `exclude` option
    -   `sloglint`: from 0.4.0 to 0.5.0 (new option `no-global`)
    -   `staticcheck`: from 0.4.6 to 0.4.7
    -   `testifylint`: from 1.1.2 to 1.2.0 (new option `bool-compare`)
    -   `unconvert`: to HEAD (new options `fast-math` and `safe`)
    -   `wrapcheck`: from 2.8.1 to 2.8.3
    -   Disable `copyloopvar` and `intrange` on Go < 1.22
3.  Enhancements
    -   🧩 New custom linters system https://golangci-lint.run/plugins/module-plugins/
    -   🎉 Allow running only a specific linter without modifying the file configuration (`--enable-only`)
    -   Allow custom sort order for the reports (`output.sort-order`)
    -   Automatically adjust the maximum concurrency to the container CPU quota if `run.concurrency=0`
    -   Add `verify` command to check the configuration against the JSON Schema
    -   Option to strictly follow Go generated file convention (`issues.exclude-generated-strict`)
    -   Syntax to not override `severity` from linters (`@linter`)
    -   Use severities from `gosec`
    -   Create automatically directory related to `output.formats.path`
    -   Use the first issue without inline on `mergeLineIssues` on multiple issues
4.  Misc.
    -   ⚠️ Inactivate deprecated linters (`deadcode`, `exhaustivestruct`, `golint`, `ifshort`, `interfacer`, `maligned`, `nosnakecase`, `scopelint`, `structcheck`, `varcheck`)
    -   ⚠️ Deprecated CLI flags have been removed (deprecated since 2018)
    -   ⚠️ Move `show-stats` option from `run` to `output` configuration section
    -   ⚠️ Replace `run.skip-xxx` options by `issues.exclude-xxx` options
    -   ⚠️ Replace `output.format` by `output.formats` with a new file configuration syntax
    -   Internal rewrite of the CLI
    -   Improve 'no go files to analyze' message
    -   Use `GOTOOLCHAIN=auto` inside the Docker images
5.  Documentation
    -   ⚠️ Define the linter deprecation cycle https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
    -   🎉 Use information from the previous release to create linter pages
    -   🎉 Publish JSON schema on https://golangci-lint.run/jsonschema/golangci.jsonschema.json
    -   Reorganize documentation pages
    -   Add an explanation about the configuration file inside golangci-lint repository

**⚠️ Important ⚠️**

1.  Deprecated linters are inactivated, you still need to disable them if you are using `enable-all`.
2.  Deprecated CLI flags (about linter settings and `deadline`) have been removed.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjI3OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
kodiakhq bot pushed a commit to cloudquery/codegen that referenced this issue Apr 1, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | minor | `v1.56.2` -> `v1.57.2` |

---

### Release Notes

<details>
<summary>golangci/golangci-lint (golangci/golangci-lint)</summary>

### [`v1.57.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1572)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.1...v1.57.2)

1.  Updated linters
    -   `contextcheck`: from 1.1.4 to 1.1.5
    -   `copyloopvar`: from 1.0.8 to 1.0.10
    -   `ginkgolinter`: from 0.16.1 to 0.16.2
    -   `goconst`: from 1.7.0 to 1.7.1
    -   `gomoddirectives`: from 0.2.3 to 0.2.4
    -   `intrange`: from 0.1.0 to 0.1.1
2.  Misc.
    -   fix: display warnings on deprecated linter options
    -   fix: missing `colored-tab` output format
    -   fix: TeamCity `inspectionType` service message
3.  Documentation
    -   Remove invalid example about mixing files and directory
    -   Improve linters page

### [`v1.57.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1571)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.0...v1.57.1)

1.  Fixes:
    -   Ignore issues with invalid position (e.g. `contextcheck`).

### [`v1.57.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1570)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.2...v1.57.0)

1.  New linters
    -   `copyloopvar`: https://github.com/karamaru-alpha/copyloopvar
    -   `intrange`: https://github.com/ckaznocha/intrange
2.  Updated linters
    -   `dupword`: from 0.0.13 to 0.0.14
    -   `gci`: from 0.12.1 to 0.12.3
    -   `ginkgolinter`: from 0.15.2 to 0.16.1 (new option `force-expect-to`, `validate-async-intervals`, and `forbid-spec-pollution`)
    -   `go-critic`: from 0.11.1 to 0.11.2
    -   `go-critic`: support of `enable-all` and `disable-all` options
    -   `go-spancheck`: from 0.5.2 to 0.5.3
    -   `gomodguard`: from 1.3.0 to 1.3.1
    -   `govet`: deprecation of `check-shadowing` ⚠️
    -   `govet`: disable temporarily `httpresponse` because of a bug [golang/go#66259
    -   `misspell`: add `extra-words`
    -   `musttag`: from 0.8.0 to 0.9.0
    -   `nakedret`: from 2.0.2 to 2.0.4
    -   `paralleltest`: from 1.0.9 to 1.0.10
    -   `perfsprint`: from 0.6.0 to 0.7.1 (new option `strconcat`)
    -   `protogetter`: from 0.3.4 to 0.3.5
    -   `revive`: add `exclude` option
    -   `sloglint`: from 0.4.0 to 0.5.0 (new option `no-global`)
    -   `staticcheck`: from 0.4.6 to 0.4.7
    -   `testifylint`: from 1.1.2 to 1.2.0 (new option `bool-compare`)
    -   `unconvert`: to HEAD (new options `fast-math` and `safe`)
    -   `wrapcheck`: from 2.8.1 to 2.8.3
    -   Disable `copyloopvar` and `intrange` on Go < 1.22
3.  Enhancements
    -   🧩 New custom linters system https://golangci-lint.run/plugins/module-plugins/
    -   🎉 Allow running only a specific linter without modifying the file configuration (`--enable-only`)
    -   Allow custom sort order for the reports (`output.sort-order`)
    -   Automatically adjust the maximum concurrency to the container CPU quota if `run.concurrency=0`
    -   Add `verify` command to check the configuration against the JSON Schema
    -   Option to strictly follow Go generated file convention (`issues.exclude-generated-strict`)
    -   Syntax to not override `severity` from linters (`@linter`)
    -   Use severities from `gosec`
    -   Create automatically directory related to `output.formats.path`
    -   Use the first issue without inline on `mergeLineIssues` on multiple issues
4.  Misc.
    -   ⚠️ Inactivate deprecated linters (`deadcode`, `exhaustivestruct`, `golint`, `ifshort`, `interfacer`, `maligned`, `nosnakecase`, `scopelint`, `structcheck`, `varcheck`)
    -   ⚠️ Deprecated CLI flags have been removed (deprecated since 2018)
    -   ⚠️ Move `show-stats` option from `run` to `output` configuration section
    -   ⚠️ Replace `run.skip-xxx` options by `issues.exclude-xxx` options
    -   ⚠️ Replace `output.format` by `output.formats` with a new file configuration syntax
    -   Internal rewrite of the CLI
    -   Improve 'no go files to analyze' message
    -   Use `GOTOOLCHAIN=auto` inside the Docker images
5.  Documentation
    -   ⚠️ Define the linter deprecation cycle https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
    -   🎉 Use information from the previous release to create linter pages
    -   🎉 Publish JSON schema on https://golangci-lint.run/jsonschema/golangci.jsonschema.json
    -   Reorganize documentation pages
    -   Add an explanation about the configuration file inside golangci-lint repository

**⚠️ Important ⚠️**

1.  Deprecated linters are inactivated, you still need to disable them if you are using `enable-all`.
2.  Deprecated CLI flags (about linter settings and `deadline`) have been removed.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjI3OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
kodiakhq bot pushed a commit to cloudquery/plugin-sdk that referenced this issue Apr 1, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | minor | `v1.56.2` -> `v1.57.2` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>golangci/golangci-lint (golangci/golangci-lint)</summary>

### [`v1.57.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1572)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.1...v1.57.2)

1.  Updated linters
    -   `contextcheck`: from 1.1.4 to 1.1.5
    -   `copyloopvar`: from 1.0.8 to 1.0.10
    -   `ginkgolinter`: from 0.16.1 to 0.16.2
    -   `goconst`: from 1.7.0 to 1.7.1
    -   `gomoddirectives`: from 0.2.3 to 0.2.4
    -   `intrange`: from 0.1.0 to 0.1.1
2.  Misc.
    -   fix: display warnings on deprecated linter options
    -   fix: missing `colored-tab` output format
    -   fix: TeamCity `inspectionType` service message
3.  Documentation
    -   Remove invalid example about mixing files and directory
    -   Improve linters page

### [`v1.57.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1571)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.0...v1.57.1)

1.  Fixes:
    -   Ignore issues with invalid position (e.g. `contextcheck`).

### [`v1.57.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1570)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.2...v1.57.0)

1.  New linters
    -   `copyloopvar`: https://github.com/karamaru-alpha/copyloopvar
    -   `intrange`: https://github.com/ckaznocha/intrange
2.  Updated linters
    -   `dupword`: from 0.0.13 to 0.0.14
    -   `gci`: from 0.12.1 to 0.12.3
    -   `ginkgolinter`: from 0.15.2 to 0.16.1 (new option `force-expect-to`, `validate-async-intervals`, and `forbid-spec-pollution`)
    -   `go-critic`: from 0.11.1 to 0.11.2
    -   `go-critic`: support of `enable-all` and `disable-all` options
    -   `go-spancheck`: from 0.5.2 to 0.5.3
    -   `gomodguard`: from 1.3.0 to 1.3.1
    -   `govet`: deprecation of `check-shadowing` ⚠️
    -   `govet`: disable temporarily `httpresponse` because of a bug [golang/go#66259
    -   `misspell`: add `extra-words`
    -   `musttag`: from 0.8.0 to 0.9.0
    -   `nakedret`: from 2.0.2 to 2.0.4
    -   `paralleltest`: from 1.0.9 to 1.0.10
    -   `perfsprint`: from 0.6.0 to 0.7.1 (new option `strconcat`)
    -   `protogetter`: from 0.3.4 to 0.3.5
    -   `revive`: add `exclude` option
    -   `sloglint`: from 0.4.0 to 0.5.0 (new option `no-global`)
    -   `staticcheck`: from 0.4.6 to 0.4.7
    -   `testifylint`: from 1.1.2 to 1.2.0 (new option `bool-compare`)
    -   `unconvert`: to HEAD (new options `fast-math` and `safe`)
    -   `wrapcheck`: from 2.8.1 to 2.8.3
    -   Disable `copyloopvar` and `intrange` on Go < 1.22
3.  Enhancements
    -   🧩 New custom linters system https://golangci-lint.run/plugins/module-plugins/
    -   🎉 Allow running only a specific linter without modifying the file configuration (`--enable-only`)
    -   Allow custom sort order for the reports (`output.sort-order`)
    -   Automatically adjust the maximum concurrency to the container CPU quota if `run.concurrency=0`
    -   Add `verify` command to check the configuration against the JSON Schema
    -   Option to strictly follow Go generated file convention (`issues.exclude-generated-strict`)
    -   Syntax to not override `severity` from linters (`@linter`)
    -   Use severities from `gosec`
    -   Create automatically directory related to `output.formats.path`
    -   Use the first issue without inline on `mergeLineIssues` on multiple issues
4.  Misc.
    -   ⚠️ Inactivate deprecated linters (`deadcode`, `exhaustivestruct`, `golint`, `ifshort`, `interfacer`, `maligned`, `nosnakecase`, `scopelint`, `structcheck`, `varcheck`)
    -   ⚠️ Deprecated CLI flags have been removed (deprecated since 2018)
    -   ⚠️ Move `show-stats` option from `run` to `output` configuration section
    -   ⚠️ Replace `run.skip-xxx` options by `issues.exclude-xxx` options
    -   ⚠️ Replace `output.format` by `output.formats` with a new file configuration syntax
    -   Internal rewrite of the CLI
    -   Improve 'no go files to analyze' message
    -   Use `GOTOOLCHAIN=auto` inside the Docker images
5.  Documentation
    -   ⚠️ Define the linter deprecation cycle https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
    -   🎉 Use information from the previous release to create linter pages
    -   🎉 Publish JSON schema on https://golangci-lint.run/jsonschema/golangci.jsonschema.json
    -   Reorganize documentation pages
    -   Add an explanation about the configuration file inside golangci-lint repository

**⚠️ Important ⚠️**

1.  Deprecated linters are inactivated, you still need to disable them if you are using `enable-all`.
2.  Deprecated CLI flags (about linter settings and `deadline`) have been removed.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjI3OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
kodiakhq bot pushed a commit to cloudquery/plugin-pb-go that referenced this issue Apr 1, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | minor | `v1.55.2` -> `v1.57.2` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>golangci/golangci-lint (golangci/golangci-lint)</summary>

### [`v1.57.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1572)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.1...v1.57.2)

1.  Updated linters
    -   `contextcheck`: from 1.1.4 to 1.1.5
    -   `copyloopvar`: from 1.0.8 to 1.0.10
    -   `ginkgolinter`: from 0.16.1 to 0.16.2
    -   `goconst`: from 1.7.0 to 1.7.1
    -   `gomoddirectives`: from 0.2.3 to 0.2.4
    -   `intrange`: from 0.1.0 to 0.1.1
2.  Misc.
    -   fix: display warnings on deprecated linter options
    -   fix: missing `colored-tab` output format
    -   fix: TeamCity `inspectionType` service message
3.  Documentation
    -   Remove invalid example about mixing files and directory
    -   Improve linters page

### [`v1.57.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1571)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.0...v1.57.1)

1.  Fixes:
    -   Ignore issues with invalid position (e.g. `contextcheck`).

### [`v1.57.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1570)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.2...v1.57.0)

1.  New linters
    -   `copyloopvar`: https://github.com/karamaru-alpha/copyloopvar
    -   `intrange`: https://github.com/ckaznocha/intrange
2.  Updated linters
    -   `dupword`: from 0.0.13 to 0.0.14
    -   `gci`: from 0.12.1 to 0.12.3
    -   `ginkgolinter`: from 0.15.2 to 0.16.1 (new option `force-expect-to`, `validate-async-intervals`, and `forbid-spec-pollution`)
    -   `go-critic`: from 0.11.1 to 0.11.2
    -   `go-critic`: support of `enable-all` and `disable-all` options
    -   `go-spancheck`: from 0.5.2 to 0.5.3
    -   `gomodguard`: from 1.3.0 to 1.3.1
    -   `govet`: deprecation of `check-shadowing` ⚠️
    -   `govet`: disable temporarily `httpresponse` because of a bug [golang/go#66259
    -   `misspell`: add `extra-words`
    -   `musttag`: from 0.8.0 to 0.9.0
    -   `nakedret`: from 2.0.2 to 2.0.4
    -   `paralleltest`: from 1.0.9 to 1.0.10
    -   `perfsprint`: from 0.6.0 to 0.7.1 (new option `strconcat`)
    -   `protogetter`: from 0.3.4 to 0.3.5
    -   `revive`: add `exclude` option
    -   `sloglint`: from 0.4.0 to 0.5.0 (new option `no-global`)
    -   `staticcheck`: from 0.4.6 to 0.4.7
    -   `testifylint`: from 1.1.2 to 1.2.0 (new option `bool-compare`)
    -   `unconvert`: to HEAD (new options `fast-math` and `safe`)
    -   `wrapcheck`: from 2.8.1 to 2.8.3
    -   Disable `copyloopvar` and `intrange` on Go < 1.22
3.  Enhancements
    -   🧩 New custom linters system https://golangci-lint.run/plugins/module-plugins/
    -   🎉 Allow running only a specific linter without modifying the file configuration (`--enable-only`)
    -   Allow custom sort order for the reports (`output.sort-order`)
    -   Automatically adjust the maximum concurrency to the container CPU quota if `run.concurrency=0`
    -   Add `verify` command to check the configuration against the JSON Schema
    -   Option to strictly follow Go generated file convention (`issues.exclude-generated-strict`)
    -   Syntax to not override `severity` from linters (`@linter`)
    -   Use severities from `gosec`
    -   Create automatically directory related to `output.formats.path`
    -   Use the first issue without inline on `mergeLineIssues` on multiple issues
4.  Misc.
    -   ⚠️ Inactivate deprecated linters (`deadcode`, `exhaustivestruct`, `golint`, `ifshort`, `interfacer`, `maligned`, `nosnakecase`, `scopelint`, `structcheck`, `varcheck`)
    -   ⚠️ Deprecated CLI flags have been removed (deprecated since 2018)
    -   ⚠️ Move `show-stats` option from `run` to `output` configuration section
    -   ⚠️ Replace `run.skip-xxx` options by `issues.exclude-xxx` options
    -   ⚠️ Replace `output.format` by `output.formats` with a new file configuration syntax
    -   Internal rewrite of the CLI
    -   Improve 'no go files to analyze' message
    -   Use `GOTOOLCHAIN=auto` inside the Docker images
5.  Documentation
    -   ⚠️ Define the linter deprecation cycle https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
    -   🎉 Use information from the previous release to create linter pages
    -   🎉 Publish JSON schema on https://golangci-lint.run/jsonschema/golangci.jsonschema.json
    -   Reorganize documentation pages
    -   Add an explanation about the configuration file inside golangci-lint repository

**⚠️ Important ⚠️**

1.  Deprecated linters are inactivated, you still need to disable them if you are using `enable-all`.
2.  Deprecated CLI flags (about linter settings and `deadline`) have been removed.

### [`v1.56.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1562)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.1...v1.56.2)

1.  updated linters
    -   `go-critic`: from 0.11.0 to 0.11.1
    -   `gosec`: from 2.18.2 to 2.19.0
    -   `testifylint`: from 1.1.1 to 1.1.2
    -   `usestdlibvars`: from 1.24.0 to 1.25.0
    -   `wsl`: from 4.2.0 to 4.2.1
2.  misc.
    -   Fix missing version in Docker image
3.  Documentation
    -   Explain the limitation of `new-from-rev` and `new-from-patch`

### [`v1.56.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1561)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.0...v1.56.1)

1.  updated linters
    -   `errcheck`: from 1.6.3 to 1.7.0
    -   `govet`: disable `loopclosure` with go1.22
    -   `revive`: from 1.3.6 to 1.3.7
    -   `testifylint`: from 1.1.0 to 1.1.1

### [`v1.56.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1560)

[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.55.2...v1.56.0)

1.  new linters
    -   `spancheck`: https://github.com/jjti/go-spancheck
2.  updated linters
    -   `depguard`: from 2.1.0 to 2.2.0
    -   `exhaustive`: from 0.11.0 to 0.12.0
    -   `exhaustruct`: from 3.1.0 to 3.2.0
    -   `gci`: from 0.11.2 to 0.12.1
    -   `ginkgolinter`: from 0.14.1 to 0.15.2
    -   `go-check-sumtype`: from 0.1.3 to 0.1.4
    -   `go-critic`: from 0.9.0 to 0.11.0
    -   `go-errorlint`: from 1.4.5 to 1.4.8
    -   `go-spancheck`: from 0.4.2 to 0.5.2
    -   `goconst`: from 1.6.0 to 1.7.0
    -   `godot`: from 1.4.15 to 1.4.16
    -   `gofumpt`: from 0.5.0 to 0.6.0
    -   `inamedparam`: from 0.1.2 to 0.1.3
    -   `ineffassign`: from 0.0.0-20230610083614-0e73809eb601 to 0.1.0
    -   `ireturn`: from 0.2.2 to 0.3.0
    -   `misspell`: add mode option
    -   `musttag`: from v0.7.2 to v0.8.0
    -   `paralleltest`: from 1.0.8 to 1.0.9
    -   `perfsprint`: from 0.2.0 to 0.6.0
    -   `protogetter`: from 0.2.3 to 0.3.4
    -   `revive`: from 1.3.4 to 1.3.6
    -   `sloglint`: add static-msg option
    -   `sloglint`: from 0.1.2 to 0.4.0
    -   `testifylint`: from 0.2.3 to 1.1.0
    -   `unparam`: from [`2022122`](https://togithub.com/golangci/golangci-lint/commit/20221223090309)-7455f1af531d to [`2024010`](https://togithub.com/golangci/golangci-lint/commit/20240104100049)-c549a3470d14
    -   `whitespace`: update after moving to the `analysis` package
    -   `wsl`: from 3.4.0 to 4.2.0
    -   `zerologlint`: from 0.1.3 to 0.1.5
3.  misc.
    -   🎉 go1.22 support
    -   Implement stats per linter with a flag
    -   Make versioning inside Docker image consistent with binaries
    -   Parse Go RC version
4.  Documentation
    -   Fix `noctx` description
    -   Add missing fields to `.golangci.reference.yml`
    -   Improve `.golangci.reference.yml` defaults
    -   `typecheck`: improve FAQ
    -   `exhaustruct`: note that struct regular expressions are expected to match the entire `package/name/structname`
    -   `wrapcheck`: adjust `ignoreSigs` to new defaults

**Important**

`testifylint` has [breaking changes](https://togithub.com/Antonboom/testifylint/releases/tag/v1.0.0) about enabling/disabling checks:

-   If you were using the option `enable` with a filtered list of checks, you should either add `disable-all: true` (1) or use `disable` field (2).

    ```yml
    ```

### Example (1)

      testifylint:
        disable-all: true
        enable:
          - bool-compare
          - compares
          - empty
          - error-is-as
          - error-nil
          - expected-actual
          - go-require
          - float-compare
          - len
          - nil-compare
          - require-error

### - suite-dont-use-pkg

          - suite-extra-assert-call
          - suite-thelper
    ```

    ```yml

### Example (2)

      testifylint:
        disable:
          - suite-dont-use-pkg
    ```

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjI3OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants