From c1e84767cabbeae3ee5cf0b3473a246ff0306d88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 14 Sep 2025 19:40:34 +0000 Subject: [PATCH 1/2] build(deps): bump github.com/nunnatsa/ginkgolinter from 0.20.0 to 0.21.0 Bumps [github.com/nunnatsa/ginkgolinter](https://github.com/nunnatsa/ginkgolinter) from 0.20.0 to 0.21.0. - [Release notes](https://github.com/nunnatsa/ginkgolinter/releases) - [Commits](https://github.com/nunnatsa/ginkgolinter/compare/v0.20.0...v0.21.0) --- updated-dependencies: - dependency-name: github.com/nunnatsa/ginkgolinter dependency-version: 0.21.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 5106fde1daaa..63fafb80c03d 100644 --- a/go.mod +++ b/go.mod @@ -91,7 +91,7 @@ require ( github.com/nakabonne/nestif v0.3.1 github.com/nishanths/exhaustive v0.12.0 github.com/nishanths/predeclared v0.2.2 - github.com/nunnatsa/ginkgolinter v0.20.0 + github.com/nunnatsa/ginkgolinter v0.21.0 github.com/pelletier/go-toml/v2 v2.2.4 github.com/polyfloyd/go-errorlint v1.8.0 github.com/quasilyte/go-ruleguard/dsl v0.3.22 @@ -216,7 +216,7 @@ require ( go.uber.org/multierr v1.10.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect - golang.org/x/exp/typeparams v0.0.0-20250620022241-b7579e27df2b // indirect + golang.org/x/exp/typeparams v0.0.0-20250911091902-df9299821621 // indirect golang.org/x/text v0.28.0 // indirect golang.org/x/tools/go/expect v0.1.1-deprecated // indirect golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect diff --git a/go.sum b/go.sum index 7cfe65f6452d..3383357e16a8 100644 --- a/go.sum +++ b/go.sum @@ -446,8 +446,8 @@ github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhK github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= -github.com/nunnatsa/ginkgolinter v0.20.0 h1:OmWLkAFO2HUTYcU6mprnKud1Ey5pVdiVNYGO5HVicx8= -github.com/nunnatsa/ginkgolinter v0.20.0/go.mod h1:dCIuFlTPfQerXgGUju3VygfAFPdC5aE1mdacCDKDJcQ= +github.com/nunnatsa/ginkgolinter v0.21.0 h1:IYwuX+ajy3G1MezlMLB1BENRtFj16+Evyi4uki1NOOQ= +github.com/nunnatsa/ginkgolinter v0.21.0/go.mod h1:QlzY9UP9zaqu58FjYxhp9bnjuwXwG1bfW5rid9ChNMw= github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY= @@ -673,8 +673,8 @@ golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWB golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20250620022241-b7579e27df2b h1:KdrhdYPDUvJTvrDK9gdjfFd6JTk8vA1WJoldYSi0kHo= -golang.org/x/exp/typeparams v0.0.0-20250620022241-b7579e27df2b/go.mod h1:LKZHyeOpPuZcMgxeHjJp4p5yvxrCX1xDvH10zYHhjjQ= +golang.org/x/exp/typeparams v0.0.0-20250911091902-df9299821621 h1:Yl4H5w2RV7L/dvSHp2GerziT5K2CORgFINPaMFxWGWw= +golang.org/x/exp/typeparams v0.0.0-20250911091902-df9299821621/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= From e89ca6dc459e640402967e0ab5893b1b806f1fd6 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sun, 14 Sep 2025 22:02:05 +0200 Subject: [PATCH 2/2] chore: update implementation --- .golangci.next.reference.yml | 4 ++++ jsonschema/golangci.next.jsonschema.json | 5 +++++ pkg/config/linters_settings.go | 1 + pkg/golinters/ginkgolinter/ginkgolinter.go | 1 + 4 files changed, 11 insertions(+) diff --git a/.golangci.next.reference.yml b/.golangci.next.reference.yml index dc121a7451af..1b3864fb8735 100644 --- a/.golangci.next.reference.yml +++ b/.golangci.next.reference.yml @@ -661,6 +661,10 @@ linters: # Default: false force-assertion-description: true + # Force using `ToNot`, `ShouldNot` instead of `To(Not())`. + # Default: false + force-tonot: true + gochecksumtype: # Presence of `default` case in switch statements satisfies exhaustiveness, if all members are not listed. # Default: true diff --git a/jsonschema/golangci.next.jsonschema.json b/jsonschema/golangci.next.jsonschema.json index a96a2f207227..805433510367 100644 --- a/jsonschema/golangci.next.jsonschema.json +++ b/jsonschema/golangci.next.jsonschema.json @@ -1564,6 +1564,11 @@ "description": "Force adding assertion descriptions to gomega matchers.", "type": "boolean", "default": false + }, + "force-tonot": { + "description": "Force using `ToNot`, `ShouldNot` instead of `To(Not())`.", + "type": "boolean", + "default": false } } }, diff --git a/pkg/config/linters_settings.go b/pkg/config/linters_settings.go index a9e252e65a8a..d8e07acd87eb 100644 --- a/pkg/config/linters_settings.go +++ b/pkg/config/linters_settings.go @@ -478,6 +478,7 @@ type GinkgoLinterSettings struct { ForbidSpecPollution bool `mapstructure:"forbid-spec-pollution"` ForceSucceedForFuncs bool `mapstructure:"force-succeed"` ForceAssertionDescription bool `mapstructure:"force-assertion-description"` + ForeToNot bool `mapstructure:"force-tonot"` } type GoChecksumTypeSettings struct { diff --git a/pkg/golinters/ginkgolinter/ginkgolinter.go b/pkg/golinters/ginkgolinter/ginkgolinter.go index 71bb2409cef0..99b9eb474e86 100644 --- a/pkg/golinters/ginkgolinter/ginkgolinter.go +++ b/pkg/golinters/ginkgolinter/ginkgolinter.go @@ -26,6 +26,7 @@ func New(settings *config.GinkgoLinterSettings) *goanalysis.Linter { ForbidSpecPollution: settings.ForbidSpecPollution, ForceSucceedForFuncs: settings.ForceSucceedForFuncs, ForceAssertionDescription: settings.ForceAssertionDescription, + ForeToNot: settings.ForeToNot, } }