add markdown to checks

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2024-07-07 19:57:58 -04:00 committed by Alice Huston
parent 61c38bba3c
commit 9de0a2c595
2 changed files with 65 additions and 62 deletions

View File

@ -1,5 +0,0 @@
#!/usr/bin/env ruby
all
rule 'MD007', :indent => 2
rule 'MD013', :tables => false

View File

@ -4,7 +4,12 @@
formatter, formatter,
... ...
}: }:
forEachSystem (system: { forEachSystem (
system:
let
pkgs = inputs.nixpkgs.legacyPackages.${system};
in
{
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = ./.; src = ./.;
hooks = { hooks = {
@ -46,11 +51,13 @@ forEachSystem (system: {
# markdown hooks # markdown hooks
mdl = { mdl = {
enable = true; enable = true;
settings.rules = [ settings.style =
"all" (pkgs.writeText ".mdl_style.rb" ''
"rule 'MD007', :indent => 2" #!/usr/bin/env ruby
"rule 'MD013', :tables => false"
]; all
rule 'MD013', :tables => false
'').outPath;
}; };
# git hooks # git hooks
@ -65,4 +72,5 @@ forEachSystem (system: {
detect-private-keys.enable = true; detect-private-keys.enable = true;
}; };
}; };
}) }
)