We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6bf7e08 + 11c6d36 commit a4548c0Copy full SHA for a4548c0
modules/hooks.nix
@@ -313,6 +313,16 @@ in
313
default = false;
314
};
315
316
+
317
+ clippy =
318
+ {
319
+ denyWarnings = mkOption {
320
+ type = types.bool;
321
+ description = lib.mdDoc "Fail when warnings are present";
322
+ default = false;
323
+ };
324
325
326
327
328
config.hooks =
@@ -648,7 +658,7 @@ in
648
658
{
649
659
name = "clippy";
650
660
description = "Lint Rust code.";
651
- entry = "${wrapper}/bin/cargo-clippy clippy ${cargoManifestPathArg}";
661
+ entry = "${wrapper}/bin/cargo-clippy clippy ${cargoManifestPathArg} -- ${lib.optionalString settings.clippy.denyWarnings "-D warnings"}";
652
662
files = "\\.rs$";
653
663
pass_filenames = false;
654
664
0 commit comments