Skip to content

Feat/error not contains - #158

Merged
fredbi merged 2 commits into
go-openapi:masterfrom
fredbi:feat/error-not-contains
Aug 23, 2026
Merged

Feat/error not contains#158
fredbi merged 2 commits into
go-openapi:masterfrom
fredbi:feat/error-not-contains

Conversation

@fredbi

@fredbi fredbi commented Aug 23, 2026

Copy link
Copy Markdown
Member

Change type

Please select: 🆕 New feature or enhancement|🔧 Bug fix'|📃 Documentation update

Short description

Fixes

Full description

Checklist

  • I have signed all my commits with my name and email (see DCO. This does not require a PGP-signed commit
  • I have rebased and squashed my work, so only one commit remains
  • I have added tests to cover my changes.
  • I have properly enriched go doc comments in code.
  • I have properly documented any breaking change.
fredbi and others added 2 commits August 23, 2026 19:00
ErrorNotContains asserts that a function returned an error whose message does
not contain a substring. It mirrors ErrorContains, nil handling included: a
nil error fails, since there is no message to inspect. Use NoError to assert
that a function returned no error at all.

ErrorContains gains an `Opposite: ErrorNotContains` tag, which pairs the two
on a single row of the quick index.

TRACKING.md moves stretchr#1940 out of "Under Consideration" into the implemented
table. Its summary counts are recounted from the tables, which had drifted by
more than this one entry.

reference: github.com/stretchr#1940

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
The guide still said generic assertions produce 4 variants and get no forward
methods. Since go1.27 they produce the same 8 as any other assertion; the four
method variants land in assert/assert_forward_go127.go and
require/require_forward_go127.go, behind a //go:build go1.27 guard.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.64%. Comparing base (92d111b) to head (dc680ae).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #158   +/-   ##
=======================================
  Coverage   93.64%   93.64%           
=======================================
  Files         106      106           
  Lines       13793    13842   +49     
=======================================
+ Hits        12917    12963   +46     
- Misses        868      872    +4     
+ Partials        8        7    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@fredbi
fredbi merged commit f118d27 into go-openapi:master Aug 23, 2026
25 checks passed
@fredbi
fredbi deleted the feat/error-not-contains branch August 23, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant