Skip to content

hk util mixed-line-ending ​

  • Usage: hk util mixed-line-ending [-d --diff] [-f --fix] <FILES>…
  • Effect: modifies state

Detect and fix mixed line endings

Fixing normalizes every line to the file's most frequent ending, or LF when LF and CRLF are tied. A lone CR is left alone.

Arguments ​

  • <FILES>… — Files to check or fix

Flags ​

  • -d --diff — Output a diff of the change. Cannot use with fix.
  • -f --fix — Fix mixed line endings by normalizing to the most frequent one (LF on a tie)
  • -h --help — Print help

Examples ​

Check for mixed line endings, or normalize them to the most frequent one.

sh
hk util mixed-line-ending README.md
hk util mixed-line-ending --fix README.md

Learn more ​

Built-in linters and utilities · Troubleshooting · All commands

MIT LicenseCopyright © 2026jdx.dev