Skip to content

Close files inspected by LineEndings - #921

Merged
sds merged 1 commit into
sds:mainfrom
oleksii-leonov:fix/close-line-ending-files
Nov 6, 2026
Merged

sds merged 1 commit into
sds:mainfrom
oleksii-leonov:fix/close-line-ending-files

Conversation

@oleksii-leonov

Copy link
Copy Markdown
Contributor

LineEndings opens every inspected file without explicitly closing it. Large commits and whole-repository checks can exhaust file descriptors before garbage collection runs, including in other concurrent hooks.

Use a File.open block so each file closes after validation. Keep the encoding-warning handler inside the block so it can still read the file's line number before the file closes.

LineEndings opens every inspected file without explicitly closing it.
Large commits and whole-repository checks can exhaust file descriptors
before garbage collection runs, including in other concurrent hooks.

Use a File.open block so each file closes after validation. Keep the
encoding-warning handler inside the block so it can still read the
file's line number before the file closes.
@sds
sds merged commit 1fb6f74 into sds:main Nov 6, 2026
39 checks passed
@sds

sds commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Thanks!

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.

2 participants