@@ -8,25 +8,27 @@ defmodule Mix.Tasks.Local do
8
8
"""
9
9
10
10
def run ( [ ] ) do
11
- shell = Mix . shell
12
- modules = Mix.Local . archives_tasks
11
+ shell = Mix . shell ( )
12
+ modules = Mix.Local . archives_tasks ( )
13
13
14
- docs = for module <- modules do
15
- { Mix.Task . task_name ( module ) , Mix.Task . shortdoc ( module ) }
16
- end
14
+ docs =
15
+ for module <- modules do
16
+ { Mix.Task . task_name ( module ) , Mix.Task . shortdoc ( module ) }
17
+ end
17
18
18
- max = Enum . reduce docs , 0 , fn ( { task , _ } , acc ) ->
19
- max ( byte_size ( task ) , acc )
20
- end
19
+ max =
20
+ Enum . reduce ( docs , 0 , fn { task , _ } , acc ->
21
+ max ( byte_size ( task ) , acc )
22
+ end )
21
23
22
24
sorted = Enum . sort ( docs )
23
25
24
- Enum . each sorted , fn ( { task , doc } ) ->
25
- shell . info format ( 'mix ~-#{ max } s # ~ts' , [ task , doc ] )
26
- end
26
+ Enum . each ( sorted , fn { task , doc } ->
27
+ shell . info ( format ( 'mix ~-#{ max } s # ~ts' , [ task , doc ] ) )
28
+ end )
27
29
end
28
30
29
31
defp format ( expression , args ) do
30
- :io_lib . format ( expression , args ) |> IO . iodata_to_binary
32
+ :io_lib . format ( expression , args ) |> IO . iodata_to_binary ( )
31
33
end
32
34
end
0 commit comments