Skip to content

Commit bb7b990

Browse files
author
José Valim
committed
Remove trailing whitespace
1 parent 0aee080 commit bb7b990

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

lib/elixir/lib/kernel/cli.ex

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ defmodule Kernel.CLI do
221221
defp process_compiler(["--warnings-as-errors"|t], config) do
222222
process_compiler t, config.update_compiler_options(&[{:warnings_as_errors, true}|&1])
223223
end
224-
224+
225225
defp process_compiler(["--verbose"|t], config) do
226226
process_compiler t, config.verbose_compile(true)
227227
end
@@ -339,44 +339,43 @@ defmodule Kernel.CLI do
339339
defp process_command({:compile, patterns}, config) do
340340
:filelib.ensure_dir(:filename.join(config.output, "."))
341341

342-
case match_regular_files(patterns) do
342+
case match_regular_files(patterns) do
343343
{ :ok, [] } ->
344-
{ :error, "--compile : No files matched provided patterns." }
345-
{ :ok, files } ->
344+
{ :error, "No files matched provided patterns" }
345+
{ :ok, files } ->
346346
wrapper fn ->
347347
Code.compiler_options(config.compiler_options)
348348
Kernel.ParallelCompiler.files_to_path(files, config.output,
349349
each_file: fn file -> if config.verbose_compile do IO.puts "Compiled #{file}" end end)
350350
end
351351
{ :missing, missing } ->
352-
{ :error, "--compile : No files matched pattern(s) #{Enum.join(missing, ",")}" }
352+
{ :error, "No files matched pattern(s) #{Enum.join(missing, ",")}" }
353353
end
354354
end
355355

356-
defp match_regular_files(patterns) do
357-
356+
defp match_regular_files(patterns) do
358357
matched_files = Enum.map patterns, fn(pattern) ->
359-
case Path.wildcard(pattern) do
360-
[] -> {:missing, pattern }
361-
files -> {:ok, files }
362-
end
363-
end
358+
case Path.wildcard(pattern) do
359+
[] -> { :missing, pattern }
360+
files -> { :ok, files }
361+
end
362+
end
364363

365364
files = Enum.filter_map matched_files,
366-
fn(match) -> elem(match, 0) == :ok end,
365+
fn(match) -> elem(match, 0) == :ok end,
367366
&elem(&1, 1)
368367

369368
missing_patterns = Enum.filter_map matched_files,
370-
fn(match) -> elem(match, 0) == :missing end,
369+
fn(match) -> elem(match, 0) == :missing end,
371370
&elem(&1, 1)
372371

373-
if missing_patterns == [] do
372+
if missing_patterns == [] do
374373
files = Enum.uniq(Enum.concat(files))
375374
files = Enum.filter files, &:filelib.is_regular(&1)
376375
{ :ok, files }
377-
else
376+
else
378377
{ :missing, Enum.uniq(missing_patterns) }
379-
end
378+
end
380379
end
381380

382381
defp wrapper(fun) do

0 commit comments

Comments
 (0)