Skip to content

Commit 6f3281e

Browse files
committed
don't need to specify =true in commandline flags anymore
1 parent 6b3a585 commit 6f3281e

27 files changed

+71
-190
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ var _ = Describe("checking something", Focus, func() {
180180
These container, or the `Focus` spec, must not be part of the final source code, and should only be used locally by the
181181
developer.
182182

183-
***This rule is disabled by default***. Use the `--forbid-focus-container=true` command line flag to enable it.
183+
***This rule is disabled by default***. Use the `--forbid-focus-container` command line flag to enable it.
184184

185185
### Comparing values from different types [BUG]
186186

@@ -202,7 +202,7 @@ using casting, or use the `BeEquivalentTo` matcher.
202202

203203
The linter can't guess what is the best solution in each case, and so it won't auto-fix this warning.
204204

205-
To suppress this warning entirely, use the `--suppress-type-compare-assertion=true` command line parameter.
205+
To suppress this warning entirely, use the `--suppress-type-compare-assertion` command line parameter.
206206

207207
To suppress a specific file or line, use the `// ginkgo-linter:ignore-type-compare-warning` comment (see [below](#suppress-warning-from-the-code))
208208

@@ -274,7 +274,7 @@ a Gomega object as their first parameter, and returns nothing, e.g. this is a va
274274
***Note***: This rule **does not** support auto-fix.
275275

276276
### Avoid Spec Pollution: Don't Initialize Variables in Container Nodes [BUG/STYLE]:
277-
***Note***: Only applied when the `--forbid-spec-pollution=true` flag is set (disabled by default).
277+
***Note***: Only applied when the `--forbid-spec-pollution` flag is set (disabled by default).
278278

279279
According to [ginkgo documentation](https://onsi.github.io/ginkgo/#avoid-spec-pollution-dont-initialize-variables-in-container-nodes),
280280
no variable should be assigned within a container node (`Describe`, `Context`, `When` or their `F`, `P` or `X` forms)
@@ -451,7 +451,7 @@ Expect("abc").ShouldNot(BeEmpty()) // => Expect("abc").ToNot(BeEmpty())
451451
```
452452
This rule support auto fixing.
453453

454-
***This rule is disabled by default***. Use the `--force-expect-to=true` command line flag to enable it.
454+
***This rule is disabled by default***. Use the `--force-expect-to` command line flag to enable it.
455455

456456
### Async timing interval: multiple timeout or polling intervals [STYLE]
457457
***Note***: Only applied when the `suppress-async-assertion` flag is **not set** *and* the `validate-async-intervals`
@@ -522,20 +522,20 @@ will trigger a warning with a suggestion to replace the mather to
522522
```go
523523
Expect(myErrorFunc()).To(Succeed())
524524
```
525-
***This rule is disabled by default***. Use the `--force-succeed=true` command line flag to enable it.
525+
***This rule is disabled by default***. Use the `--force-succeed` command line flag to enable it.
526526

527527
***Note***: This rule **does** support auto-fix, when the `--fix` command line parameter is used.
528528

529529
## Suppress the linter
530530
### Suppress warning from command line
531-
* Use the `--suppress-len-assertion=true` flag to suppress the wrong length and cap assertions warning
532-
* Use the `--suppress-nil-assertion=true` flag to suppress the wrong nil assertion warning
533-
* Use the `--suppress-err-assertion=true` flag to suppress the wrong error assertion warning
534-
* Use the `--suppress-compare-assertion=true` flag to suppress the wrong comparison assertion warning
535-
* Use the `--suppress-async-assertion=true` flag to suppress the function call in async assertion warning
536-
* Use the `--forbid-focus-container=true` flag to activate the focused container assertion (deactivated by default)
537-
* Use the `--suppress-type-compare-assertion=true` to suppress the type compare assertion warning
538-
* Use the `--allow-havelen-0=true` flag to avoid warnings about `HaveLen(0)`; Note: this parameter is only supported from
531+
* Use the `--suppress-len-assertion` flag to suppress the wrong length and cap assertions warning
532+
* Use the `--suppress-nil-assertion` flag to suppress the wrong nil assertion warning
533+
* Use the `--suppress-err-assertion` flag to suppress the wrong error assertion warning
534+
* Use the `--suppress-compare-assertion` flag to suppress the wrong comparison assertion warning
535+
* Use the `--suppress-async-assertion` flag to suppress the function call in async assertion warning
536+
* Use the `--forbid-focus-container` flag to activate the focused container assertion (deactivated by default)
537+
* Use the `--suppress-type-compare-assertion` to suppress the type compare assertion warning
538+
* Use the `--allow-havelen-0` flag to avoid warnings about `HaveLen(0)`; Note: this parameter is only supported from
539539
command line, and not from a comment.
540540

541541
### Suppress warning from the code

analyzer.go

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,19 @@ func NewAnalyzer() *analysis.Analyzer {
3737

3838
a := NewAnalyzerWithConfig(config)
3939

40-
var ignored bool
4140
a.Flags.Init("ginkgolinter", flag.ExitOnError)
42-
a.Flags.Var(&config.SuppressLen, "suppress-len-assertion", "Suppress warning for wrong length assertions")
43-
a.Flags.Var(&config.SuppressNil, "suppress-nil-assertion", "Suppress warning for wrong nil assertions")
44-
a.Flags.Var(&config.SuppressErr, "suppress-err-assertion", "Suppress warning for wrong error assertions")
45-
a.Flags.Var(&config.SuppressCompare, "suppress-compare-assertion", "Suppress warning for wrong comparison assertions")
46-
a.Flags.Var(&config.SuppressAsync, "suppress-async-assertion", "Suppress warning for function call in async assertion, like Eventually")
47-
a.Flags.Var(&config.ValidateAsyncIntervals, "validate-async-intervals", "best effort validation of async intervals (timeout and polling); ignored the suppress-async-assertion flag is true")
48-
a.Flags.Var(&config.SuppressTypeCompare, "suppress-type-compare-assertion", "Suppress warning for comparing values from different types, like int32 and uint32")
49-
a.Flags.Var(&config.AllowHaveLen0, "allow-havelen-0", "Do not warn for HaveLen(0); default = false")
50-
a.Flags.Var(&config.ForceExpectTo, "force-expect-to", "force using `Expect` with `To`, `ToNot` or `NotTo`. reject using `Expect` with `Should` or `ShouldNot`; default = false (not forced)")
51-
a.Flags.BoolVar(&ignored, "suppress-focus-container", true, "Suppress warning for ginkgo focus containers like FDescribe, FContext, FWhen or FIt. Deprecated and ignored: use --forbid-focus-container instead")
52-
a.Flags.Var(&config.ForbidFocus, "forbid-focus-container", "trigger a warning for ginkgo focus containers like FDescribe, FContext, FWhen or FIt; default = false.")
53-
a.Flags.Var(&config.ForbidSpecPollution, "forbid-spec-pollution", "trigger a warning for variable assignments in ginkgo containers like Describe, Context and When, instead of in BeforeEach(); default = false.")
54-
a.Flags.Var(&config.ForceSucceedForFuncs, "force-succeed", "force using the Succeed matcher for error functions, and the HaveOccurred matcher for non-function error values")
41+
a.Flags.BoolVar(&config.SuppressLen, "suppress-len-assertion", config.SuppressLen, "Suppress warning for wrong length assertions")
42+
a.Flags.BoolVar(&config.SuppressNil, "suppress-nil-assertion", config.SuppressNil, "Suppress warning for wrong nil assertions")
43+
a.Flags.BoolVar(&config.SuppressErr, "suppress-err-assertion", config.SuppressErr, "Suppress warning for wrong error assertions")
44+
a.Flags.BoolVar(&config.SuppressCompare, "suppress-compare-assertion", config.SuppressCompare, "Suppress warning for wrong comparison assertions")
45+
a.Flags.BoolVar(&config.SuppressAsync, "suppress-async-assertion", config.SuppressAsync, "Suppress warning for function call in async assertion, like Eventually")
46+
a.Flags.BoolVar(&config.ValidateAsyncIntervals, "validate-async-intervals", config.ValidateAsyncIntervals, "best effort validation of async intervals (timeout and polling); ignored the suppress-async-assertion flag is true")
47+
a.Flags.BoolVar(&config.SuppressTypeCompare, "suppress-type-compare-assertion", config.SuppressTypeCompare, "Suppress warning for comparing values from different types, like int32 and uint32")
48+
a.Flags.BoolVar(&config.AllowHaveLen0, "allow-havelen-0", config.AllowHaveLen0, "Do not warn for HaveLen(0); default = false")
49+
a.Flags.BoolVar(&config.ForceExpectTo, "force-expect-to", config.ForceExpectTo, "force using `Expect` with `To`, `ToNot` or `NotTo`. reject using `Expect` with `Should` or `ShouldNot`; default = false (not forced)")
50+
a.Flags.BoolVar(&config.ForbidFocus, "forbid-focus-container", config.ForbidFocus, "trigger a warning for ginkgo focus containers like FDescribe, FContext, FWhen or FIt; default = false.")
51+
a.Flags.BoolVar(&config.ForbidSpecPollution, "forbid-spec-pollution", config.ForbidSpecPollution, "trigger a warning for variable assignments in ginkgo containers like Describe, Context and When, instead of in BeforeEach(); default = false.")
52+
a.Flags.BoolVar(&config.ForceSucceedForFuncs, "force-succeed", config.ForceSucceedForFuncs, "force using the Succeed matcher for error functions, and the HaveOccurred matcher for non-function error values")
5553

5654
return a
5755
}

internal/expression/actual/actualarg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package actual
22

33
import (
4-
"github.com/nunnatsa/ginkgolinter/internal/gomegahandler"
54
"go/ast"
65
"go/token"
76
gotypes "go/types"
87

98
"golang.org/x/tools/go/analysis"
109

1110
"github.com/nunnatsa/ginkgolinter/internal/expression/value"
11+
"github.com/nunnatsa/ginkgolinter/internal/gomegahandler"
1212
"github.com/nunnatsa/ginkgolinter/internal/gomegainfo"
1313
"github.com/nunnatsa/ginkgolinter/internal/reverseassertion"
1414
)

internal/ginkgohandler/handling.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ const (
2020
func handleGinkgoSpecs(expr ast.Expr, config types.Config, pass *analysis.Pass, ginkgoHndlr Handler) bool {
2121
goDeeper := false
2222
if exp, ok := expr.(*ast.CallExpr); ok {
23-
if bool(config.ForbidFocus) && checkFocusContainer(pass, ginkgoHndlr, exp) {
23+
if config.ForbidFocus && checkFocusContainer(pass, ginkgoHndlr, exp) {
2424
goDeeper = true
2525
}
2626

27-
if bool(config.ForbidSpecPollution) && checkAssignmentsInContainer(pass, ginkgoHndlr, exp) {
27+
if config.ForbidSpecPollution && checkAssignmentsInContainer(pass, ginkgoHndlr, exp) {
2828
goDeeper = true
2929
}
3030
}

internal/rules/asyncfunccallrule.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const valueInEventually = "use a function call in %[1]s. This actually checks no
1919
type AsyncFuncCallRule struct{}
2020

2121
func (r AsyncFuncCallRule) isApplied(gexp *expression.GomegaExpression, config types.Config) bool {
22-
if bool(config.SuppressAsync) || !gexp.IsAsync() {
22+
if config.SuppressAsync || !gexp.IsAsync() {
2323
return false
2424
}
2525

internal/rules/asynctimeintervalsrule.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const (
2020
type AsyncTimeIntervalsRule struct{}
2121

2222
func (r AsyncTimeIntervalsRule) isApplied(gexp *expression.GomegaExpression, config types.Config) bool {
23-
return !bool(config.SuppressAsync) && bool(config.ValidateAsyncIntervals) && gexp.IsAsync()
23+
return !config.SuppressAsync && config.ValidateAsyncIntervals && gexp.IsAsync()
2424
}
2525

2626
func (r AsyncTimeIntervalsRule) Apply(gexp *expression.GomegaExpression, config types.Config, reportBuilder *reports.Builder) bool {

internal/rules/equaldifferenttypesrule.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const compareDifferentTypes = "use %[1]s with different types: Comparing %[2]s w
1414
type EqualDifferentTypesRule struct{}
1515

1616
func (r EqualDifferentTypesRule) isApplied(config types.Config) bool {
17-
return !bool(config.SuppressTypeCompare)
17+
return !config.SuppressTypeCompare
1818
}
1919

2020
func (r EqualDifferentTypesRule) Apply(gexp *expression.GomegaExpression, config types.Config, reportBuilder *reports.Builder) bool {

internal/rules/equalnilrule.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
type EqualNilRule struct{}
1313

1414
func (r EqualNilRule) isApplied(gexp *expression.GomegaExpression, config types.Config) bool {
15-
return !bool(config.SuppressNil) &&
15+
return !config.SuppressNil &&
1616
gexp.MatcherTypeIs(matcher.EqualValueMatcherType)
1717
}
1818

internal/rules/havelen0.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
type HaveLen0 struct{}
1111

1212
func (r *HaveLen0) isApplied(gexp *expression.GomegaExpression, config types.Config) bool {
13-
return gexp.MatcherTypeIs(matcher.HaveLenZeroMatcherType) && !bool(config.AllowHaveLen0)
13+
return gexp.MatcherTypeIs(matcher.HaveLenZeroMatcherType) && !config.AllowHaveLen0
1414
}
1515

1616
func (r *HaveLen0) Apply(gexp *expression.GomegaExpression, config types.Config, reportBuilder *reports.Builder) bool {

internal/rules/haveoccurredrule.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func (r HaveOccurredRule) Apply(gexp *expression.GomegaExpression, config types.
2424
return true
2525
}
2626

27-
if bool(config.ForceSucceedForFuncs) && gexp.GetActualArg().(*actual.ErrPayload).IsFunc() {
27+
if config.ForceSucceedForFuncs && gexp.GetActualArg().(*actual.ErrPayload).IsFunc() {
2828
gexp.ReverseAssertionFuncLogic()
2929
gexp.SetMatcherSucceed()
3030
reportBuilder.AddIssue(true, "prefer using the Succeed matcher for error function, instead of HaveOccurred")

internal/rules/nilcomparerule.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ func (r NilCompareRule) isApplied(gexp *expression.GomegaExpression, config type
4242
return false, false
4343
}
4444

45-
isErr := actl.IsError() && !bool(config.SuppressErr)
45+
isErr := actl.IsError() && !config.SuppressErr
4646

47-
if !isErr && bool(config.SuppressNil) {
47+
if !isErr && config.SuppressNil {
4848
return isErr, false
4949
}
5050

internal/rules/succeedrule.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (r SucceedRule) Apply(gexp *expression.GomegaExpression, config types.Confi
2828
return true
2929
}
3030

31-
if bool(config.ForceSucceedForFuncs) && !gexp.GetActualArg().(*actual.ErrPayload).IsFunc() {
31+
if config.ForceSucceedForFuncs && !gexp.GetActualArg().(*actual.ErrPayload).IsFunc() {
3232
gexp.ReverseAssertionFuncLogic()
3333
gexp.SetMatcherHaveOccurred()
3434

tests/testdata/asyncerr.txtar

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ stderr -count=1 'wrong error assertion.'
66
stderr -count=1 'Success matcher does not support multiple values'
77

88
# also enable the force succeed rule
9-
! exec ginkgolinter --force-succeed=true errassertion
9+
! exec ginkgolinter --force-succeed errassertion
1010
! stdout .
1111
stderr -count=1 'Success matcher only support a single error value, or function with Gomega as its first parameter'
1212
stderr -count=1 'wrong error assertion.'
@@ -15,7 +15,7 @@ stderr -count=1 'prefer using the HaveOccurred matcher for non-function error va
1515
stderr -count=1 'prefer using the Succeed matcher for error function, instead of HaveOccurred.'
1616

1717
# run with -fix, expect wrong error assertion errors
18-
! exec ginkgolinter --fix --force-succeed=true errassertion
18+
! exec ginkgolinter --fix --force-succeed errassertion
1919
! stdout .
2020
stderr -count=1 'Success matcher only support a single error value, or function with Gomega as its first parameter'
2121
stderr -count=1 'wrong error assertion.'

tests/testdata/asynfunc.txtar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ stderr -count=1 'Eventually\(withoutArguments\).Should\(Equal\(42\)\)'
66
stderr -count=1 'Eventually\(withArguments\).WithArguments\(4, 2\).Should\(Equal\(42\)\)'
77

88
# suppress async assersion checks - expect no errors
9-
exec ginkgolinter --suppress-async-assertion=true async
9+
exec ginkgolinter --suppress-async-assertion async
1010
! stdout .
1111
! stderr .
1212

tests/testdata/compare.txtar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ stderr -count=1 'Expect\(exampleInt\).ToNot\(BeZero\(\)\)'
77
stderr -count=1 'Expect\(exampleInt\).To\(BeNumerically\(">", 4\)\)'
88

99
# suppress compare assertion, still get some matcher-only errors
10-
! exec ginkgolinter --suppress-compare-assertion=true comparison
10+
! exec ginkgolinter --suppress-compare-assertion comparison
1111
! stdout .
1212
stderr -count=1 'Expect\(exampleInt == 42\).To\(BeTrue\(\)\)'
1313
stderr -count=1 'Expect\(exampleInt != 0\).To\(BeTrue\(\)\)'

tests/testdata/comparetypes.txtar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
stderr -count=1 'use Equal with different types: Comparing uint64 with int; either change the expected value type if possible, or use the BeEquivalentTo\(\) matcher, instead of Equal\(\)'
55

66
# suppress compare-type assertion, expect no additional assertion errors
7-
exec ginkgolinter --suppress-type-compare-assertion=true comparetypes
7+
exec ginkgolinter --suppress-type-compare-assertion comparetypes
88
! stdout .
99
! stderr .
1010

tests/testdata/err.txtar

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ stderr -count=1 'asserting a non-error type with Succeed matcher'
66
stderr -count=1 'the Success matcher does not support multiple values'
77

88
# suppress error assertion, still get some comparison assertion errors
9-
! exec ginkgolinter --suppress-err-assertion=true errassertion
9+
! exec ginkgolinter --suppress-err-assertion errassertion
1010
! stdout .
1111
stderr -count=2 'wrong nil assertion. Consider using `Expect\(err\).ToNot\(BeNil\(\)\)` instead'
1212
stderr -count=1 'asserting a non-error type with Succeed matcher'
1313
stderr -count=1 'the Success matcher does not support multiple values'
1414

1515
# suppress both error and nil assertions. still get some comparison assertion errors
16-
! exec ginkgolinter --suppress-err-assertion=true --suppress-nil-assertion=true errassertion
16+
! exec ginkgolinter --suppress-err-assertion --suppress-nil-assertion errassertion
1717
! stdout .
1818
stderr -count=1 'wrong boolean assertion. Consider using `Expect\(err == nil\).To\(BeFalse\(\)\)` instead'
1919
stderr -count=1 'asserting a non-error type with Succeed matcher'

tests/testdata/focus.txtar

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44
stderr -count=1 'wrong length assertion\. Consider using .Expect\("1234"\)\.To\(HaveLen\(4\)\). instead'
55

66
# run ginkgolinter to find ginkgo's focused containers; enable the focus check; expect errors
7-
! exec ginkgolinter --forbid-focus-container=true focus
7+
! exec ginkgolinter --forbid-focus-container focus
88
! stdout .
99
stderr -count=1 'Focus container found. This is used only for local debug and should not be part of the actual source code. Consider to replace with "Context"'
1010
stderr -count=3 'Focus spec found. This is used only for local debug and should not be part of the actual source code. Consider to remove it'
1111
stderr -count=1 'wrong length assertion\. Consider using .Expect\("1234"\)\.To\(HaveLen\(4\)\). instead'
1212

1313
# run ginkgolinter with -fix
14-
! exec ginkgolinter --forbid-focus-container=true -fix focus
14+
! exec ginkgolinter --forbid-focus-container -fix focus
1515
! stdout .
1616
stderr -count=1 'Focus container found. This is used only for local debug and should not be part of the actual source code. Consider to replace with "Context"'
1717
stderr -count=3 'Focus spec found. This is used only for local debug and should not be part of the actual source code. Consider to remove it'
1818
stderr -count=1 'wrong length assertion\. Consider using .Expect\("1234"\)\.To\(HaveLen\(4\)\). instead'
1919

2020
# run ginkgolinter to find wrong async focus, after fix. expect only the focus decorator error
21-
! exec ginkgolinter --forbid-focus-container=true focus
21+
! exec ginkgolinter --forbid-focus-container focus
2222
! stdout .
2323
stderr -count=3 'Focus spec found. This is used only for local debug and should not be part of the actual source code. Consider to remove it'
2424

tests/testdata/forceexpectto.txtar

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ exec ginkgolinter expectto
44
! stderr .
55

66
# enable force expect to, expect one error
7-
! exec ginkgolinter --force-expect-to=true expectto
7+
! exec ginkgolinter --force-expect-to expectto
88
! stdout .
99
stderr -count=1 'must not use Expect with Should'
1010
stderr -count=1 'Expect\(true\).To\(BeTrue\(\)\)'
1111

1212
# run with -fix, expect error
13-
! exec ginkgolinter --fix --force-expect-to=true expectto
13+
! exec ginkgolinter --fix --force-expect-to expectto
1414
! stdout .
1515
stderr -count=1 'must not use Expect with Should'
1616
stderr -count=1 'Expect\(true\).To\(BeTrue\(\)\)'
1717

1818
# run again after fix, expect no error
19-
exec ginkgolinter --force-expect-to=true expectto
19+
exec ginkgolinter --force-expect-to expectto
2020
! stdout .
2121
! stderr .
2222

tests/testdata/intervals.txtar

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ exec ginkgolinter intervals
44
! stderr .
55

66
# run ginkgolinter to find wrong async intervals; enable interval check; expect errors
7-
! exec ginkgolinter --validate-async-intervals=true intervals
7+
! exec ginkgolinter --validate-async-intervals intervals
88
! stdout .
99
stderr -count=1 'multiple issues: timeout defined more than once; polling defined more than once'
1010
stderr -count=2 'only use time\.Duration for timeout and polling in Eventually\(\) or Consistently\(\)'
1111
stderr -count=1 'Consistently\(func\(\) bool \{ return true \}, time\.Second\*10, time\.Second\).Should\(BeTrue\(\)\)'
1212
stderr -count=1 'timeout must not be shorter than the polling interval'
1313

1414
# run ginkgolinter to find wrong async intervals; enable interval check, but suppress async checks; expect no errors
15-
exec ginkgolinter --validate-async-intervals=true --suppress-async-assertion=true intervals
15+
exec ginkgolinter --validate-async-intervals --suppress-async-assertion intervals
1616
! stdout .
1717
! stderr .
1818

0 commit comments

Comments
 (0)