From d1e341e37c4d1d365ddc90da3fa62494444ed2ba Mon Sep 17 00:00:00 2001 From: Mikko Ahlroth Date: Mon, 12 Mar 2018 21:41:28 +0200 Subject: [PATCH] Fix dialyzer errors --- .gitignore | 6 ++++++ lib/utils.ex | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index b6012c7..817d63f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,9 @@ erl_crash.dump # Also ignore archive artifacts (built via "mix archive.build"). *.ez + +# ElixirLS stuffz +.elixir_ls + +# VSCode stuffz +.vscode diff --git a/lib/utils.ex b/lib/utils.ex index f11c412..4698ca8 100644 --- a/lib/utils.ex +++ b/lib/utils.ex @@ -11,7 +11,7 @@ defmodule MBU.TaskUtils do @watch_combine_time 200 @typep task_name :: String.t | module - @typep task_list :: [task_name | fun | {task_name, [...]}] + @typep task_list :: [task_name | fun | {task_name, list}] defmodule ProgramSpec do @moduledoc """ @@ -54,7 +54,7 @@ defmodule MBU.TaskUtils do See run_tasks/2 for the argument description. """ - @spec run_task(task_name, [...]) :: any + @spec run_task(task_name, list) :: any def run_task(task, args \\ []) do run_tasks([{task, args}]) end @@ -341,10 +341,10 @@ defmodule MBU.TaskUtils do and the diff also. """ @spec print_size(String.t, String.t) :: any - def print_size(new_file, old_file \\ nil) do + def print_size(new_file, old_file \\ "") do new_size = get_size(new_file) - {prefix, postfix} = if old_file != nil do + {prefix, postfix} = if old_file != "" do old_size = get_size(old_file) {