File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1831,10 +1831,10 @@ in
1831
1831
1832
1832
exclude =
1833
1833
mkOption {
1834
- type = types . str ;
1835
- description = "Ignore files and directories matching the glob ." ;
1836
- default = "" ;
1837
- example = "*.nix" ;
1834
+ type = with types ; coercedTo str ( s : [ s ] ) ( listOf str ) ;
1835
+ description = "Ignore files and directories matching one of the globs ." ;
1836
+ default = [ ] ;
1837
+ example = [ "*.nix" ] ;
1838
1838
} ;
1839
1839
1840
1840
force-exclude =
@@ -3998,8 +3998,10 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.fourm
3998
3998
package = tools . typos ;
3999
3999
entry =
4000
4000
let
4001
- inherit ( hooks . typos . settings ) config ;
4001
+ inherit ( hooks . typos . settings ) config exclude ;
4002
4002
configFile = toml . generate "typos-config.toml" config ;
4003
+ excludeFlags = lib . concatStringsSep " "
4004
+ ( lib . map ( glob : "--exclude ${ glob } " ) exclude ) ;
4003
4005
cmdArgs =
4004
4006
mkCmdArgs
4005
4007
( with hooks . typos . settings ; [
@@ -4008,7 +4010,7 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.fourm
4008
4010
[ ( config != { } ) "--config ${ configFile } " ]
4009
4011
[ ( configPath != "" && config == { } ) "--config ${ configPath } " ]
4010
4012
[ diff "--diff" ]
4011
- [ ( exclude != "" ) "--exclude ${ exclude } " ]
4013
+ [ ( exclude != [ ] ) excludeFlags ]
4012
4014
[ force-exclude "--force-exclude" ]
4013
4015
[ ( format != "long" ) "--format ${ format } " ]
4014
4016
[ hidden "--hidden" ]
You can’t perform that action at this time.
0 commit comments