Three new builtin linters, tighter file matching for text-only hooks, and a three-way merge fix that stops fixer tail deletions from being dropped when a worktree edit overlaps their start.
Added
-
rubocop_serverbuiltin (@andyw8) #995. A sibling ofBuiltins.rubocopthat passes--servertocheck,check_list_files, andfix, running RuboCop as a long-lived daemon for much faster repeat invocations.["rubocop"] = Builtins.rubocop_server
-
shellhardenbuiltin (@hituzi-no-sippo) #996. Adds shellharden as a batched bash/sh linter.checkrunsshellharden --check(exit code 2 on suggested changes);fixrunsshellharden --replace. Auto-suggested when*.shor*.bashfiles are present. -
More
rylproject indicators (@hituzi-no-sippo) #998. Therylbuiltin now also discovers configs at.config/.ryl.toml,.config/ryl.toml, andpyproject.toml(when it contains a[tool.ryl]table), matching ryl's own upward search. The bundledryltool stub bumps to 0.20.0.
Changed
-
Text-only builtins use
types = List("text")(@hituzi-no-sippo) #997. Replacesglob = "**/*"with atext-type filter for builtins that only make sense on text files:byte_order_marker,check_executables_have_shebangs,check_merge_conflict,detect_private_key,dprint,fix_smart_quotes,mixed_line_ending,newlines,trailing_whitespace, andtypos.check_added_large_files,check_case_conflict, andcheck_symlinksintentionally keep the everything-matcher since they're meaningful for binaries too. -
pklrbumped to 1.1.1 (@jdx) #1018, and Renovate no longer waits out the shared release-age delay forpklrupdates (#1017), so fixes in the embedded pkl evaluator land in hk sooner. -
itertoolsupdated to 0.15 (#1014).
Fixed
-
Fixer tail deletions no longer get dropped when a worktree edit overlaps the start (@jdx) #990. In the three-way merge, a pure-deletion fixer hunk whose start was consumed by a worktree hunk was skipped entirely, causing trailing lines the fixer wanted to remove to reappear in the merged output.
three_way_merge_hunksnow trims such hunks to the current index and keeps the unconsumed tail. Includes a regression test for discussion #988. If you sawstash = "patch-file"restoring lines a fixer had deleted, this is the fix. -
betterleaksbuiltin test uses a still-detected fixture (@risu729) #1006. Since betterleaks 1.2.0,aws-access-tokenis a composite rule that requires a nearby secret key, so the old AWS-only fixture no longer failed the scanner. The test now uses agithub-patsample that still trips ≥1.2.0, and the bundled betterleaks stub moves to 1.5.0.
Documentation
New Contributors
Full Changelog: v1.48.0...v1.49.0
💚 Sponsor hk
hk is developed by @jdx at en.dev — a small independent studio behind developer tools like mise, aube, hk, and more. Work on hk is funded by sponsorships.
If hk has sped up your pre-commit loop or made linting feel less painful, please consider sponsoring at en.dev. Sponsorships are what keep hk moving and the project independent.