File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change 7
7
lib . optionalString
8
8
( settings . rust . cargoManifestPath != null )
9
9
"--manifest-path ${ lib . escapeShellArg settings . rust . cargoManifestPath } " ;
10
+
11
+ mkCmdArgs = predActionList :
12
+ lib . concatStringsSep
13
+ " "
14
+ ( builtins . foldl'
15
+ ( acc : entry :
16
+ acc ++ lib . optional ( builtins . elemAt entry 0 ) ( builtins . elemAt entry 1 ) )
17
+ [ ]
18
+ predActionList ) ;
19
+
10
20
in
11
21
{
12
22
options . settings =
837
847
entry =
838
848
let
839
849
cmdArgs =
840
- lib . concatStringsSep
841
- " "
842
- ( builtins . concatLists [
843
- [ "-set_exit_status" ]
844
- ( if settings . revive . configPath != "" then
845
- [ "-config ${ settings . revive . configPath } " ]
846
- else
847
- [ ] )
848
- ]
849
- ) ;
850
+ mkCmdArgs [
851
+ [ true "-set_exit_status" ]
852
+ [ ( settings . revive . configPath != "" ) "-config ${ settings . revive . configPath } " ]
853
+ ] ;
850
854
# revive works with both files and directories; however some lints
851
855
# may fail (e.g. package-comment) if they run on an individual file
852
856
# rather than a package/directory scope; given this let's get the
You can’t perform that action at this time.
0 commit comments