add a linter to avoid asserting whether slice is empty (or not) by `arr == nil`.
Open
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
Ref #51807. It's easy to make mistake that `[]T{} == nil` returns false, so that we'd better to always use `len(arr) > 0` to assert whether a slice is empty. We should also provide an utility to assert whether the slice is really nil.
Contributor guide
Assessment
This issue has not been assessed yet.