File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -503,6 +503,7 @@ use nix
503503- [ end-of-file-fixer] ( https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/end_of_file_fixer.py )
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 )
506+ - [ hledger-fmt] ( https://github.com/mondeja/hledger-fmt )
506507- [ mixed-line-endings] ( https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/mixed_line_ending.py )
507508- [ mkdocs-linkcheck] ( https://github.com/byrnereese/linkchecker-mkdocs )
508509- [ openapi-spec-validator] ( https://github.com/python-openapi/openapi-spec-validator )
Original file line number Diff line number Diff line change 680680 } ;
681681 } ;
682682 } ;
683+ hledger-fmt = mkOption {
684+ description = "hledger-fmt hook" ;
685+ type = types . submodule {
686+ imports = [ hookModule ] ;
687+ options . settings = {
688+ fix =
689+ mkOption {
690+ type = types . bool ;
691+ description = "Fix the files in place." ;
692+ default = false ;
693+ } ;
694+ } ;
695+ } ;
696+ } ;
683697 hlint = mkOption {
684698 description = "hlint hook" ;
685699 type = types . submodule {
@@ -3101,6 +3115,22 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.fourm
31013115 entry = "${ hooks . hindent . package } /bin/hindent" ;
31023116 files = "\\ .l?hs(-boot)?$" ;
31033117 } ;
3118+ hledger-fmt =
3119+ {
3120+ name = "hledger-fmt" ;
3121+ description = "Opinionated hledger's journal files formatter." ;
3122+ package = tools . hledger-fmt ;
3123+ entry =
3124+ let
3125+ cmdArgs = mkCmdArgs (
3126+ with hooks . hledger-fmt . settings ; [
3127+ [ fix "--fix" ]
3128+ ]
3129+ ) ;
3130+ in
3131+ "${ hooks . hledger-fmt . package } /bin/hledger-fmt ${ cmdArgs } " ;
3132+ files = "\\ .(hledger|journal|j)$" ;
3133+ } ;
31043134 hlint =
31053135 {
31063136 name = "hlint" ;
Original file line number Diff line number Diff line change 4040, hadolint
4141, haskellPackages
4242, hindent
43+ , hledger-fmt ? null
4344, hlint
4445, hpack
4546, html-tidy
149150 gptcommit
150151 hadolint
151152 hindent
153+ hledger-fmt
152154 hlint
153155 hpack
154156 html-tidy
You can’t perform that action at this time.
0 commit comments