Skip to content

Commit 1faaa15

Browse files
dwoffindensandydoo
andauthored
Add keep-sorted (#631)
Co-authored-by: sander <hey@sandydoo.me>
1 parent 0e9bf3e commit 1faaa15

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ use nix
504504
- [fix-byte-order-marker](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/fix_byte_order_marker.py)
505505
- [headache](https://github.com/frama-c/headache)
506506
- [hledger-fmt](https://github.com/mondeja/hledger-fmt)
507+
- [keep-sorted](https://github.com/google/keep-sorted)
507508
- [mixed-line-endings](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/mixed_line_ending.py)
508509
- [mkdocs-linkcheck](https://github.com/byrnereese/linkchecker-mkdocs)
509510
- [openapi-spec-validator](https://github.com/python-openapi/openapi-spec-validator)

modules/hooks.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3209,6 +3209,14 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.fourm
32093209
end'
32103210
'';
32113211
};
3212+
keep-sorted =
3213+
{
3214+
name = "keep-sorted";
3215+
description = "Language-agnostic formatter that sorts lines between two markers in a larger file.";
3216+
types = [ "text" ];
3217+
package = tools.keep-sorted;
3218+
entry = "${hooks.keep-sorted.package}/bin/keep-sorted";
3219+
};
32123220
latexindent =
32133221
{
32143222
name = "latexindent";

nix/tools.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
, hlint
4545
, hpack
4646
, html-tidy
47+
, keep-sorted
4748
, luaPackages
4849
, lua-language-server
4950
, lychee
@@ -154,6 +155,7 @@ in
154155
hlint
155156
hpack
156157
html-tidy
158+
keep-sorted
157159
lychee
158160
mdformat
159161
mdl

0 commit comments

Comments
 (0)