Skip to content

fix: default-explain flags, check unreadable files, GitContext cwd - #1

Merged
hc-ui merged 14 commits into
mainfrom
cursor/optimize-eoldoctor-aa74
Aug 26, 2026
Merged

hc-ui merged 14 commits into
mainfrom
cursor/optimize-eoldoctor-aa74

Conversation

@hc-ui

@hc-ui hc-ui commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Summary

Hardening pass for eoldoctor 0.1.4. No framework change.

Fixes

  • Bare eoldoctor --json / eoldoctor <path> now run explain with those args (the default-command path used to drop every extra argument or reject a path as an invalid subcommand).
  • check fails on unreadable files (was info-only; CI gate returned 0).
  • GitContext.list_files resolves paths against the context cwd so the library API works when the process cwd is not the repo root.
  • Boolean git config still normalizes 1/yes/on on Git < 2.40 (fallback when --type=bool-or-str is missing).
  • attributes --write reports I/O errors and exits 1 instead of a traceback.

Tests / lint / docs

  • New unit tests for the above; compileall runs inside the existing unittest CI job.
  • [tool.ruff] configured for local ruff check (bug-oriented rules).
  • README CI example installs from git (not yet on PyPI); pre-commit rev pinned to v0.1.4.

Workflow files under .github/workflows/ were not modified (token has no workflow scope).

Verification

  • python -m ruff check eoldoctor tests
  • python -m unittest discover -s tests -t . — 164 tests OK locally
  • python -m eoldoctor check --require lf --forbid-bom --require-final-newline on this repo: OK

@hc-ui
hc-ui marked this pull request as ready for review August 26, 2026 10:28
@hc-ui
hc-ui merged commit 2f1bbde into main Aug 26, 2026
16 checks passed
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