Skip to content

Commit 61ab0e8

Browse files
authored
Merge pull request #709 from jolars/add-panache
feat: add panche hooks
2 parents 9e9059c + c342d4c commit 61ab0e8

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ hooks](modules/pre-commit.nix).
462462
- [mdformat](https://github.com/hukkin/mdformat)
463463
- [mdl](https://github.com/markdownlint/markdownlint/)
464464
- [mdsh](https://zimbatm.github.io/mdsh/)
465+
- [panache](https://github.com/jolars/panache)
465466
- [rumdl](https://github.com/rvben/rumdl)
466467

467468
### Nix

modules/hooks.nix

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4077,6 +4077,22 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.fourm
40774077
in
40784078
"${binPath} ${cmdArgs}";
40794079
};
4080+
panache-format =
4081+
{
4082+
name = "panache-format";
4083+
description = "Format Quarto, Pandoc, and Markdown files with panache.";
4084+
package = tools.panache;
4085+
entry = "${hooks.panache-format.package}/bin/panache format --force-exclude";
4086+
files = "\\.(qmd|Rmd|md|markdown|mdown|mkd)$";
4087+
};
4088+
panache-lint =
4089+
{
4090+
name = "panache-lint";
4091+
description = "Lint Quarto, Pandoc, and Markdown files with panache.";
4092+
package = tools.panache;
4093+
entry = "${hooks.panache-lint.package}/bin/panache lint --force-exclude";
4094+
files = "\\.(qmd|Rmd|md|markdown|mdown|mkd)$";
4095+
};
40804096
php-cs-fixer =
40814097
{
40824098
name = "php-cs-fixer";

nix/tools.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
, ormolu
7272
, oxfmt ? placeholder "oxfmt"
7373
, oxlint
74+
, panache ? placeholder "panache"
7475
, pkgsBuildBuild
7576
, poetry
7677
, pre-commit-hook-ensure-sops ? placeholder "pre-commit-hook-ensure-sops"
@@ -187,6 +188,7 @@ in
187188
ormolu
188189
oxfmt
189190
oxlint
191+
panache
190192
pre-commit-hook-ensure-sops
191193
prettier
192194
poetry

0 commit comments

Comments
 (0)