hk util end-of-file-fixer
- How to hail it:
hk util end-of-file-fixer [-d --diff] [-f --fix] <FILES>… - Effect: modifies state (it touches, as well as looks)
Checks for missing final newlines, and mends them if ye ask.
Cargo it takes
<FILES>…— The files to inspect or mend (check/fix)
Flags to fly
-d --diff— Write out a diff of the change. Cannot be used withfix.-f --fix— Mend files so each ends with exactly one newline-h --help— Print help, for when ye've lost yer bearings
Tales from the deck
Inspect first, or ask outright for the fix to be made in place.
sh
hk util end-of-file-fixer README.md
hk util end-of-file-fixer --fix README.mdFurther charts
Built-in linters and utilities: the standing crew · Troubleshooting: the ship's log · All the bosun's calls
