Skip to content

Commit 5f58871

Browse files
authored
Merge pull request #499 from mkenigs/clippy-extraArgs
Add extraArgs for clippy
2 parents 2f5ae3f + 9d2422b commit 5f58871

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/hooks.nix

+6-1
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@ in
232232
description = "Run clippy with --all-features";
233233
default = false;
234234
};
235+
extraArgs = mkOption {
236+
type = types.str;
237+
description = "Additional arguments to pass to clippy";
238+
default = "";
239+
};
235240
};
236241

237242
config.extraPackages = [
@@ -2073,7 +2078,7 @@ in
20732078
description = "Lint Rust code.";
20742079
package = wrapper;
20752080
packageOverrides = { cargo = tools.cargo; clippy = tools.clippy; };
2076-
entry = "${hooks.clippy.package}/bin/cargo-clippy clippy ${cargoManifestPathArg} ${lib.optionalString hooks.clippy.settings.offline "--offline"} ${lib.optionalString hooks.clippy.settings.allFeatures "--all-features"} -- ${lib.optionalString hooks.clippy.settings.denyWarnings "-D warnings"}";
2081+
entry = "${hooks.clippy.package}/bin/cargo-clippy clippy ${cargoManifestPathArg} ${lib.optionalString hooks.clippy.settings.offline "--offline"} ${lib.optionalString hooks.clippy.settings.allFeatures "--all-features"} ${hooks.clippy.settings.extraArgs} -- ${lib.optionalString hooks.clippy.settings.denyWarnings "-D warnings"}";
20772082
files = "\\.rs$";
20782083
pass_filenames = false;
20792084
};

0 commit comments

Comments
 (0)