Skip to content

feat(safety): added NoFileDescriptorLeak (linux)#62

Merged
fredbi merged 1 commit intogo-openapi:masterfrom
fredbi:feat/fd-leak
Feb 17, 2026
Merged

feat(safety): added NoFileDescriptorLeak (linux)#62
fredbi merged 1 commit intogo-openapi:masterfrom
fredbi:feat/fd-leak

Conversation

@fredbi
Copy link
Member

@fredbi fredbi commented Feb 11, 2026

This is a linux-only assertion to guard against file descritor leaks.

Unlike goroutine leak checks, this one does not support parallel tests.

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.

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 82.85714% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.31%. Comparing base (ca0f3dc) to head (5edd217).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
internal/fdleak/fdleak.go 80.76% 5 Missing and 5 partials ⚠️
internal/assertions/safety.go 69.23% 2 Missing and 2 partials ⚠️
require/require_forward.go 83.33% 2 Missing ⚠️
require/require_assertions.go 83.33% 1 Missing ⚠️
require/require_format.go 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
- Coverage   91.40%   91.31%   -0.09%     
==========================================
  Files          90       91       +1     
  Lines       11784    11889     +105     
==========================================
+ Hits        10771    10857      +86     
- Misses        807      819      +12     
- Partials      206      213       +7     

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

This is a linux-only assertion to guard against file descritor leaks.

Unlike goroutine leak checks, this one does not support parallel tests.

tests: skip testable examples for NoFileDescriptorLeak on windows/macos

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@fredbi fredbi merged commit adf1c9a into go-openapi:master Feb 17, 2026
23 checks passed
@fredbi fredbi deleted the feat/fd-leak branch February 17, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant