Skip to content

Commit e89ca6d

Browse files
committed
chore: update implementation
1 parent c1e8476 commit e89ca6d

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

.golangci.next.reference.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,10 @@ linters:
661661
# Default: false
662662
force-assertion-description: true
663663

664+
# Force using `ToNot`, `ShouldNot` instead of `To(Not())`.
665+
# Default: false
666+
force-tonot: true
667+
664668
gochecksumtype:
665669
# Presence of `default` case in switch statements satisfies exhaustiveness, if all members are not listed.
666670
# Default: true

jsonschema/golangci.next.jsonschema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,6 +1564,11 @@
15641564
"description": "Force adding assertion descriptions to gomega matchers.",
15651565
"type": "boolean",
15661566
"default": false
1567+
},
1568+
"force-tonot": {
1569+
"description": "Force using `ToNot`, `ShouldNot` instead of `To(Not())`.",
1570+
"type": "boolean",
1571+
"default": false
15671572
}
15681573
}
15691574
},

pkg/config/linters_settings.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ type GinkgoLinterSettings struct {
478478
ForbidSpecPollution bool `mapstructure:"forbid-spec-pollution"`
479479
ForceSucceedForFuncs bool `mapstructure:"force-succeed"`
480480
ForceAssertionDescription bool `mapstructure:"force-assertion-description"`
481+
ForeToNot bool `mapstructure:"force-tonot"`
481482
}
482483

483484
type GoChecksumTypeSettings struct {

pkg/golinters/ginkgolinter/ginkgolinter.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func New(settings *config.GinkgoLinterSettings) *goanalysis.Linter {
2626
ForbidSpecPollution: settings.ForbidSpecPollution,
2727
ForceSucceedForFuncs: settings.ForceSucceedForFuncs,
2828
ForceAssertionDescription: settings.ForceAssertionDescription,
29+
ForeToNot: settings.ForeToNot,
2930
}
3031
}
3132

0 commit comments

Comments
 (0)