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