Skip to content

Commit

Permalink
fix(cleanup): Fix dialyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
juancgalvis committed Aug 15, 2024
1 parent 484b554 commit c661789
Show file tree
Hide file tree
Showing 2 changed files with 767 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lib/mix/tasks/ca.base.task.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ defmodule Mix.Tasks.Ca.BaseTask do
@moduledoc """
Generic base task for all tasks in this project.
"""
require Logger

defmacro __using__(opts) do
quote do
alias ElixirStructureManager.Utils.CommonCommands
alias ElixirStructureManager.Utils.DataTypeUtils
alias Mix.Tasks.Help
use Mix.Task
require Logger

@version Mix.Project.config()[:version]
@switches unquote(opts[:switches] || [])
@aliases unquote(opts[:aliases] || [])
@name unquote(opts[:name])
@format unquote(if opts[:format] == false, do: false, else: true)

@impl Mix.Task
def run([help]) when help in ~w(-h --help) do
Expand All @@ -34,9 +35,13 @@ defmodule Mix.Tasks.Ca.BaseTask do
DataTypeUtils.parse_opts(argv, @switches, @aliases)
|> execute()

if @format do
CommonCommands.format()
end
unquote(
if opts[:format] != false do
quote do
CommonCommands.format()
end
end
)

res
end
Expand Down
Loading

0 comments on commit c661789

Please sign in to comment.