Add Credo checks and refactor code
Signed-off-by: Thomas Citharel <tcit@tcit.fr> Make Logger.debug calls lazy Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add missing @moduledocs Signed-off-by: Thomas Citharel <tcit@tcit.fr> Refactor according to credo Signed-off-by: Thomas Citharel <tcit@tcit.fr> Final fixes and add credo to CI Signed-off-by: Thomas Citharel <tcit@tcit.fr> Closes #52
This commit is contained in:
@@ -63,7 +63,7 @@ defmodule Mix.Tasks.Mobilizon.Instance do
|
||||
will_overwrite = Enum.filter(paths, &File.exists?/1)
|
||||
proceed? = Enum.empty?(will_overwrite) or Keyword.get(options, :force, false)
|
||||
|
||||
unless not proceed? do
|
||||
if proceed? do
|
||||
[domain, port | _] =
|
||||
String.split(
|
||||
Common.get_option(
|
||||
@@ -163,7 +163,7 @@ defmodule Mix.Tasks.Mobilizon.Instance do
|
||||
else
|
||||
Mix.shell().error(
|
||||
"The task would have overwritten the following files:\n" <>
|
||||
(Enum.map(will_overwrite, &"- #{&1}\n") |> Enum.join("")) <>
|
||||
(will_overwrite |> Enum.map(&"- #{&1}\n") |> Enum.join("")) <>
|
||||
"Rerun with `-f/--force` to overwrite them."
|
||||
)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user