Recently I decided to do a Mix Task to run some script files in the project. Being my first Mix Task, I followed a tutorial and got the following structure:
defmodule Mix.Tasks.Deploy do use Mix.Task @shortdoc "Compiles the app for PROD and starts a Rolling Release." def run(_) do #do really awesome stuff here end
We are using
credo and one of the warnings it gives me is the following:
┃ [D] Nested modules could be aliased at the top of the invoking module.
┃ lib/mix/tasks/deploy.ex:21:19 #(Mix.Tasks.Deploy.run)
Now, I checked the project dos referring to this error:
And from my understanding I take it I should use a
alias somewhere, but I don’t see how.
I can I fix the problem and make the warning go away?