Skip to content

Commit 8ed30ad

Browse files
lexmagJosé Valim
authored andcommitted
Do not use deprecated String.strip
Signed-off-by: José Valim <[email protected]>
1 parent 8496d52 commit 8ed30ad

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

lib/mix/lib/mix/tasks/app.tree.ex

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,15 @@ defmodule Mix.Tasks.App.Tree do
5757
if opts[:format] == "dot" do
5858
Mix.Utils.write_dot_graph!("app_tree.dot", "application tree",
5959
{:normal, app}, callback, opts)
60-
Mix.shell.info """
61-
Generated "app_tree.dot" in the current directory. To generate a PNG:
60+
"""
61+
Generated "app_tree.dot" in the current directory. To generate a PNG:
6262
63-
dot -Tpng app_tree.dot -o app_tree.png
63+
dot -Tpng app_tree.dot -o app_tree.png
6464
65-
For more options see http://www.graphviz.org/.
66-
""" |> String.strip
65+
For more options see http://www.graphviz.org/.
66+
"""
67+
|> String.trim_trailing
68+
|> Mix.shell.info
6769
else
6870
Mix.Utils.print_tree({:normal, app}, callback, opts)
6971
end

lib/mix/lib/mix/tasks/deps.tree.ex

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,15 @@ defmodule Mix.Tasks.Deps.Tree do
5252
if opts[:format] == "dot" do
5353
callback = callback(&format_dot/1, deps, opts)
5454
Mix.Utils.write_dot_graph!("deps_tree.dot", "dependency tree", root, callback, opts)
55-
Mix.shell.info """
56-
Generated "deps_tree.dot" in the current directory. To generate a PNG:
55+
"""
56+
Generated "deps_tree.dot" in the current directory. To generate a PNG:
5757
58-
dot -Tpng deps_tree.dot -o deps_tree.png
58+
dot -Tpng deps_tree.dot -o deps_tree.png
5959
60-
For more options see http://www.graphviz.org/.
61-
""" |> String.strip
60+
For more options see http://www.graphviz.org/.
61+
"""
62+
|> String.trim_trailing
63+
|> Mix.shell.info
6264
else
6365
callback = callback(&format_tree/1, deps, opts)
6466
Mix.Utils.print_tree(root, callback, opts)

lib/mix/lib/mix/tasks/test.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule Mix.Tasks.Test do
33
@moduledoc false
44

55
def start(compile_path, opts) do
6-
Mix.shell.info "Cover compiling modules ... "
6+
Mix.shell.info "Cover compiling modules ..."
77
_ = :cover.start
88

99
case :cover.compile_beam_directory(compile_path |> to_charlist) do
@@ -16,7 +16,7 @@ defmodule Mix.Tasks.Test do
1616
output = opts[:output]
1717

1818
fn() ->
19-
Mix.shell.info "\nGenerating cover results ... "
19+
Mix.shell.info "\nGenerating cover results ..."
2020
File.mkdir_p!(output)
2121
Enum.each :cover.modules, fn(mod) ->
2222
{:ok, _} = :cover.analyse_to_file(mod, '#{output}/#{mod}.html', [:html])

0 commit comments

Comments
 (0)