stretchr/testify
Voir sur GitHubrequire: invalid examples from doc comments as functions don't return bool
Open
#1 776 ouverte le 4 août 2025
bugdocumentationgood first issue
Métriques du dépôt
- Stars
- (25 958 stars)
- Métriques de merge PR
- (Merge moyen 6j 15h) (2 PRs mergées en 30 j)
Description
Description
The doc comments for multiple functions in the require package have code examples that are invalid. Example:
The example reads:
if require.NoError(t, err) {
require.Equal(t, expectedObj, actualObj)
}
but the NoError() function does not return any value, so this is invalid.
There are similar invalid examples in the doc comments for NoErrorf, NotEmpty and NotEmptyf.