You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: tidy fix defaults match tidy check issues (#1424)
## Summary
fixrealloop multi-file round found that bare `tidy fix --apply` reported
success with zero files changed while `tidy check` still flagged missing
final newline and trailing whitespace on the same tree.
- Default `tidy fix` (no write-policy flags, no
`--respect-editorconfig`) now enables final-newline and
trailing-whitespace fixes.
- Explicit flags or EditorConfig keep opt-in behavior unchanged.
- Docs/help examples updated.
## Test plan
- [x] Unit tests for check-parity defaults and explicit trim-only
- [x] Existing EditorConfig per-extension integration test
- [x] `make check-fast`
- [x] Release binary: messy file cleaned, subsequent check clean
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Copy file name to clipboardExpand all lines: docs/reference/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -840,9 +840,9 @@ Use these when newline and whitespace correctness is the main concern.
840
840
<!-- ref:tidy-action:fix -->
841
841
### `tidy fix`
842
842
843
-
-**What it does:** Applies newline and whitespace normalization to text files. Binary and invalid UTF-8 files are skipped.
843
+
-**What it does:** Applies newline and whitespace normalization to text files. Binary and invalid UTF-8 files are skipped. With no write-policy flags (and without `--respect-editorconfig`), it enables final-newline and trailing-whitespace fixes so it matches the issues bare `tidy check` always reports. Pass explicit flags (or EditorConfig) to narrow the fix set.
844
844
-**Use when:** Existing files already need cleanup and the cleanup itself is the task.
845
-
-**Prefer instead:** Use write policy flags when normalization should only apply to files already being touched by another write command.
845
+
-**Prefer instead:** Use write policy flags on another write command when normalization should only apply to files already being touched by that command.
0 commit comments