Skip to content

Commit 6bf7e08

Browse files
authored
Merge pull request #220 from PierreR/master
yamllint: Add relaxed option
2 parents d0ce0a8 + 55f5732 commit 6bf7e08

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

modules/hooks.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,14 @@ in
305305
};
306306
};
307307

308+
yamllint =
309+
{
310+
relaxed = mkOption {
311+
type = types.bool;
312+
description = lib.mdDoc "Use the relaxed configuration";
313+
default = false;
314+
};
315+
};
308316
};
309317

310318
config.hooks =
@@ -603,7 +611,8 @@ in
603611
name = "yamllint";
604612
description = "Yaml linter.";
605613
types = [ "file" "yaml" ];
606-
entry = "${tools.yamllint}/bin/yamllint";
614+
entry = with settings.yamllint;
615+
"${tools.yamllint}/bin/yamllint ${lib.optionalString relaxed "-d relaxed"}";
607616
};
608617
rustfmt =
609618
let

0 commit comments

Comments
 (0)