From 52c5df56a894a81111bce50ab1de5e571b8226c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:05:13 +0000 Subject: [PATCH 1/3] build(deps): bump github.com/nunnatsa/ginkgolinter from 0.17.0 to 0.18.0 Bumps [github.com/nunnatsa/ginkgolinter](https://github.com/nunnatsa/ginkgolinter) from 0.17.0 to 0.18.0. - [Release notes](https://github.com/nunnatsa/ginkgolinter/releases) - [Commits](https://github.com/nunnatsa/ginkgolinter/compare/v0.17.0...v0.18.0) --- updated-dependencies: - dependency-name: github.com/nunnatsa/ginkgolinter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b1b717f30dd9..c16201b36633 100644 --- a/go.mod +++ b/go.mod @@ -82,7 +82,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.17.0 + github.com/nunnatsa/ginkgolinter v0.18.0 github.com/pelletier/go-toml/v2 v2.2.3 github.com/polyfloyd/go-errorlint v1.6.0 github.com/quasilyte/go-ruleguard/dsl v0.3.22 diff --git a/go.sum b/go.sum index e473209e2968..71408a3b404b 100644 --- a/go.sum +++ b/go.sum @@ -395,8 +395,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.17.0 h1:9cvAxodbajOdYkszkj/qZTBgWB3/BUyV/PpPoVzwXnE= -github.com/nunnatsa/ginkgolinter v0.17.0/go.mod h1:vPrWafSULmjMGCMsfGA908if95VnHQNAahvSBOjTuWs= +github.com/nunnatsa/ginkgolinter v0.18.0 h1:ZXO1wKhPg3A6LpbN5dMuqwhfOjN5c3ous8YdKOuqk9k= +github.com/nunnatsa/ginkgolinter v0.18.0/go.mod h1:vPrWafSULmjMGCMsfGA908if95VnHQNAahvSBOjTuWs= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= From adf8e851d03e7f308e4d805bc20ff55a3bf0fb7c Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Thu, 7 Nov 2024 19:10:06 +0100 Subject: [PATCH 2/3] chore: update implementation --- pkg/config/linters_settings.go | 1 + pkg/golinters/ginkgolinter/ginkgolinter.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/config/linters_settings.go b/pkg/config/linters_settings.go index 3760d6a40de8..61908b131442 100644 --- a/pkg/config/linters_settings.go +++ b/pkg/config/linters_settings.go @@ -488,6 +488,7 @@ type GinkgoLinterSettings struct { ForceExpectTo bool `mapstructure:"force-expect-to"` ValidateAsyncIntervals bool `mapstructure:"validate-async-intervals"` ForbidSpecPollution bool `mapstructure:"forbid-spec-pollution"` + ForceSucceedForFuncs bool `mapstructure:"force-succeed"` } type GoChecksumTypeSettings struct { diff --git a/pkg/golinters/ginkgolinter/ginkgolinter.go b/pkg/golinters/ginkgolinter/ginkgolinter.go index ff8d306e01ef..9873c9ba498c 100644 --- a/pkg/golinters/ginkgolinter/ginkgolinter.go +++ b/pkg/golinters/ginkgolinter/ginkgolinter.go @@ -25,6 +25,7 @@ func New(settings *config.GinkgoLinterSettings) *goanalysis.Linter { ForceExpectTo: types.Boolean(settings.ForceExpectTo), ValidateAsyncIntervals: types.Boolean(settings.ValidateAsyncIntervals), ForbidSpecPollution: types.Boolean(settings.ForbidSpecPollution), + ForceSucceedForFuncs: types.Boolean(settings.ForceSucceedForFuncs), } } From c69121f01774bf7a4f9f721ca6b8fbf2d7073ab6 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Thu, 7 Nov 2024 19:38:39 +0100 Subject: [PATCH 3/3] chore: update implementation --- .golangci.next.reference.yml | 4 ++++ jsonschema/golangci.next.jsonschema.json | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/.golangci.next.reference.yml b/.golangci.next.reference.yml index 64d5345cf279..e479284a512d 100644 --- a/.golangci.next.reference.yml +++ b/.golangci.next.reference.yml @@ -652,6 +652,10 @@ linters-settings: # Default: false forbid-spec-pollution: true + # Force using the Succeed matcher for error functions, and the HaveOccurred matcher for non-function error values. + # Default: false + force-succeed: 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 7a012ec288df..fd96911cc5b8 100644 --- a/jsonschema/golangci.next.jsonschema.json +++ b/jsonschema/golangci.next.jsonschema.json @@ -1180,6 +1180,11 @@ "description": "Trigger a warning for variable assignments in ginkgo containers like `Describe`, `Context` and `When`, instead of in `BeforeEach()`.", "type": "boolean", "default": false + }, + "force-succeed": { + "description": "Force using the Succeed matcher for error functions, and the HaveOccurred matcher for non-function error values.", + "type": "boolean", + "default": false } } },