@@ -26,7 +26,8 @@ defmodule JS2E do
2626
2727 @ spec main ( [ String . t ( ) ] ) :: :ok
2828 def main ( args ) do
29- { options , paths , errors } = OptionParser . parse ( args , switches: [ module_name: :string ] )
29+ { options , paths , errors } =
30+ OptionParser . parse ( args , switches: [ module_name: :string ] )
3031
3132 if Enum . empty? ( paths ) == true do
3233 IO . puts ( @ moduledoc )
@@ -41,7 +42,9 @@ defmodule JS2E do
4142 files = resolve_all_paths ( paths )
4243
4344 if Enum . empty? ( files ) == true do
44- print_error ( "Error: Could not find any " <> "JSON files in path: #{ inspect ( paths ) } " )
45+ print_error (
46+ "Error: Could not find any JSON files in path: #{ inspect ( paths ) } "
47+ )
4548
4649 exit ( :no_files )
4750 end
@@ -122,9 +125,11 @@ defmodule JS2E do
122125 else
123126 Logger . info ( "Converting to Elm code!" )
124127
125- printer_result = Printer . print_schemas ( parser_result . schema_dict , module_name )
128+ printer_result =
129+ Printer . print_schemas ( parser_result . schema_dict , module_name )
126130
127- tests_printer_result = Printer . print_schemas_tests ( parser_result . schema_dict , module_name )
131+ tests_printer_result =
132+ Printer . print_schemas_tests ( parser_result . schema_dict , module_name )
128133
129134 cond do
130135 length ( printer_result . errors ) > 0 ->
@@ -163,7 +168,7 @@ defmodule JS2E do
163168 String . replace ( module_name , "." , "/" )
164169 )
165170
166- Logger . debug ( fn -> "Writing file '#{ normalized_file_path } '" end )
171+ Logger . debug ( "Writing file '#{ normalized_file_path } '" )
167172 { :ok , file } = File . open ( normalized_file_path , [ :write ] )
168173 IO . binwrite ( file , file_content )
169174 File . close ( file )
@@ -210,7 +215,8 @@ defmodule JS2E do
210215 "-" ,
211216 max (
212217 0 ,
213- 74 - String . length ( pretty_warning_type ) - String . length ( file_path )
218+ 74 - String . length ( pretty_warning_type ) -
219+ String . length ( file_path )
214220 )
215221 )
216222
@@ -305,7 +311,8 @@ defmodule JS2E do
305311 end
306312
307313 defp warning_header do
308- header = String . duplicate ( "^" , 35 ) <> " WARNINGS " <> String . duplicate ( "^" , 35 )
314+ header =
315+ String . duplicate ( "^" , 35 ) <> " WARNINGS " <> String . duplicate ( "^" , 35 )
309316
310317 IO . puts ( IO.ANSI . format ( [ :yellow , header ] ) )
311318 end
0 commit comments