Skip to content

Fix missing newline in output, clarify docs#6

Merged
lesnik512 merged 1 commit into
mainfrom
code-review-fixes
May 31, 2026
Merged

Fix missing newline in output, clarify docs#6
lesnik512 merged 1 commit into
mainfrom
code-review-fixes

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Summary

  • Bug fix: Fixing <filename> lines were running together (Fixing c.txtFixing b.txtFixing a.txt) because sys.stdout.write was called without a trailing newline. Add \n and tighten the four test assertions from substring ("<name>" in output) to format-aware ("Fixing <name>\n" in output), so this regression now fails the suite.
  • Docs — exit codes: the README claimed 1 was only returned in --check mode. The tool actually returns 1 in fix mode too whenever a file needed fixing (intentional, matches pre-commit semantics so it can be used as a CI gate). Section rewritten to say so.
  • Docs — .gitignore scope: only the root .gitignore of the supplied path is read; nested .gitignore files in subdirectories are not. README now states this. Also adds .uv-cache and binary files to the "always ignored" list, both of which the code already handles but the README didn't mention.
  • Acknowledgments: new section attributing the core file-fixing logic to pre-commit/pre-commit-hooks (MIT, same license).

No behavior change beyond the one-line stdout fix.

Test plan

  • just lint — ruff format / check / ty all pass.
  • just test — 4/4 pass, 100% coverage.
  • Smoke: run eof-fixer . on a temp dir with three files needing newlines; verify three separate Fixing X.txt lines and exit code 1.

🤖 Generated with Claude Code

- `Fixing <name>` lines were concatenated because `sys.stdout.write`
  omitted the trailing newline; add `\n` and tighten test assertions
  so a regression fails the suite.
- Correct Exit Codes section: `1` is returned in fix mode too whenever
  any file needed fixing (intentional, pre-commit semantics).
- Configuration: note that only the root `.gitignore` is consulted,
  and that `.uv-cache` and binary files are always skipped.
- Add Acknowledgments section attributing the core fix logic to
  pre-commit/pre-commit-hooks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lesnik512 lesnik512 self-assigned this May 31, 2026
@lesnik512 lesnik512 merged commit e185715 into main May 31, 2026
6 checks passed
@lesnik512 lesnik512 deleted the code-review-fixes branch May 31, 2026 10:20
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