File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 283283 description = "Additional arguments to pass to clippy" ;
284284 default = "" ;
285285 } ;
286+ allowedLints = mkOption {
287+ type = types . listOf types . str ;
288+ description = "Lints to allow, passed to clippy as `-A <lint>`" ;
289+ default = [ ] ;
290+ example = [ "clippy::too_many_arguments" ] ;
291+ } ;
286292 } ;
287293
288294 config . extraPackages = [
29552961 description = "Lint Rust code." ;
29562962 package = wrapper ;
29572963 packageOverrides = { cargo = tools . cargo ; clippy = tools . clippy ; } ;
2958- 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" } " ;
2964+ 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" } ${ lib . concatMapStringsSep " " ( lint : "-A ${ lib . escapeShellArg lint } " ) hooks . clippy . settings . allowedLints } " ;
29592965 files = "\\ .rs$" ;
29602966 pass_filenames = false ;
29612967 } ;
You can’t perform that action at this time.
0 commit comments