You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But in the case of Equal, NotEqual and Exactly type casting approach still doesn't work for the function type.
The best option here is to just use Nil / NotNil (see stretchr/testify#1524).
Expected output
Decision about enabling or not enabling this checker.
Findings
For this checker, the following findings were found in the current codebase:
plugins/inputs/intel_dlb/intel_dlb_test.go:424:3 testifylint nil-compare: use require.Nil
plugins/outputs/postgresql/table_source_test.go:280:2 testifylint nil-compare: use require.Nil
plugins/outputs/postgresql/table_source_test.go:283:2 testifylint nil-compare: use require.Nil
Additional configuration
For this checker, no additional configuration can be provided.
The text was updated successfully, but these errors were encountered:
Description
This issue starts a discussion about enabling:
testify
API with clearer failure message.Example
Before:
After:
Using untyped
nil
in the functions above along with a non-interface type does not make sense:The right way:
But in the case of
Equal
,NotEqual
andExactly
type casting approach still doesn't work for the function type.The best option here is to just use
Nil
/NotNil
(see stretchr/testify#1524).Expected output
Decision about enabling or not enabling this checker.
Findings
For this checker, the following findings were found in the current codebase:
Additional configuration
For this checker, no additional configuration can be provided.
The text was updated successfully, but these errors were encountered: