Skip to content

Commit ca06fbf

Browse files
shdblowersJosé Valim
authored and
José Valim
committed
Fix whitespace inconsistencies all around (#5562)
Signed-off-by: José Valim <[email protected]>
1 parent 20621d4 commit ca06fbf

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

lib/ex_unit/lib/ex_unit/on_exit_handler.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ defmodule ExUnit.OnExitHandler do
1111
Agent.update(@name, &Map.put(&1, pid, []))
1212
end
1313

14-
@spec add(pid, term, (()-> term)) :: :ok | :error
14+
@spec add(pid, term, (() -> term)) :: :ok | :error
1515
def add(pid, name_or_ref, callback) when is_pid(pid) and is_function(callback, 0) do
1616
Agent.get_and_update(@name, fn map ->
1717
if entries = Map.get(map, pid) do

lib/iex/lib/iex/autocomplete.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ defmodule IEx.Autocomplete do
102102
if prefix in [0, length] do
103103
yes("", Enum.flat_map(entries, &to_entries/1))
104104
else
105-
yes(:binary.part(first.name, prefix, length-prefix), [])
105+
yes(:binary.part(first.name, prefix, length - prefix), [])
106106
end
107107
end
108108

@@ -212,7 +212,7 @@ defmodule IEx.Autocomplete do
212212
for mod <- match_modules(base, module === Elixir),
213213
parts = String.split(mod, "."),
214214
depth <= length(parts) do
215-
%{kind: :module, type: :elixir, name: Enum.at(parts, depth-1)}
215+
%{kind: :module, type: :elixir, name: Enum.at(parts, depth - 1)}
216216
end
217217
|> Enum.uniq
218218
end

lib/logger/lib/logger/translator.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ defmodule Logger.Translator do
308308
crash_info(min_level, info, [?\n, indent | indent])]
309309
end
310310

311-
defp format_stop({maybe_exception, [_ | _ ] = maybe_stacktrace} = reason) do
311+
defp format_stop({maybe_exception, [_ | _] = maybe_stacktrace} = reason) do
312312
try do
313313
format_stacktrace(maybe_stacktrace)
314314
catch
@@ -332,7 +332,7 @@ defmodule Logger.Translator do
332332
# OTP processes rewrite the :undef error to these reasons when logging
333333
@gen_undef [:"module could not be loaded", :"function not exported"]
334334

335-
defp format_stop_banner(undef, [{mod, fun, args, _info} | _ ] = stacktrace)
335+
defp format_stop_banner(undef, [{mod, fun, args, _info} | _] = stacktrace)
336336
when undef in @gen_undef and is_atom(mod) and is_atom(fun) do
337337
cond do
338338
is_list(args) ->

lib/logger/lib/logger/utils.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ defmodule Logger.Utils do
3232
end
3333
end
3434

35-
defp truncate_n(int, n) when int in 0..127, do: {int, n-1}
36-
defp truncate_n(int, n) when int in 127..0x07FF, do: {int, n-2}
37-
defp truncate_n(int, n) when int in 0x800..0xFFFF, do: {int, n-3}
38-
defp truncate_n(int, n) when int >= 0x10000 and is_integer(int), do: {int, n-4}
35+
defp truncate_n(int, n) when int in 0..127, do: {int, n - 1}
36+
defp truncate_n(int, n) when int in 127..0x07FF, do: {int, n - 2}
37+
defp truncate_n(int, n) when int in 0x800..0xFFFF, do: {int, n - 3}
38+
defp truncate_n(int, n) when int >= 0x10000 and is_integer(int), do: {int, n - 4}
3939

4040
defp truncate_n(list, n) when is_list(list) do
4141
truncate_n_list(list, n, [])

lib/mix/lib/mix/generator.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ defmodule Mix.Generator do
7878
@file file
7979
File.read!(file)
8080
c when is_binary(c) ->
81-
@file {__ENV__.file, __ENV__.line+1}
81+
@file {__ENV__.file, __ENV__.line + 1}
8282
c
8383
_ ->
8484
raise ArgumentError, "expected string or from_file: file"

lib/mix/lib/mix/local/installer.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ defmodule Mix.Local.Installer do
255255
path = Path.join(root, name)
256256
cond do
257257
not File.exists?(path) ->
258-
Mix.shell.error "Could not find a local #{item_name} named #{inspect name}. "<>
258+
Mix.shell.error "Could not find a local #{item_name} named #{inspect name}. " <>
259259
"Existing #{item_plural} are:"
260260
Mix.Task.run item_name
261261
nil

lib/mix/lib/mix/tasks/new.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ defmodule Mix.Tasks.New do
119119
defp otp_app(mod, true) do
120120
" [extra_applications: [:logger],\n mod: {#{mod}.Application, []}]"
121121
end
122-
122+
123123
defp cd_path(".") do
124124
""
125125
end
126-
126+
127127
defp cd_path(path) do
128128
"cd #{path}\n "
129129
end

0 commit comments

Comments
 (0)