diff --git a/config/config.exs b/config/config.exs index 47203fd..b1489dc 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,3 +1,3 @@ # This file is responsible for configuring your application -# and its dependencies with the aid of the Mix.Config module. -use Mix.Config \ No newline at end of file +# and its dependencies with the aid of the Config module. +import Config \ No newline at end of file diff --git a/lib/mix/tasks/pre_commit.ex b/lib/mix/tasks/pre_commit.ex index 9acf5f2..1f58f2a 100644 --- a/lib/mix/tasks/pre_commit.ex +++ b/lib/mix/tasks/pre_commit.ex @@ -10,8 +10,8 @@ defmodule Mix.Tasks.PreCommit do meaning that the command has failed), which will trigger the commit to stop, and print the error message to the terminal. """ - @commands Application.get_env(:pre_commit, :commands) || [] - @verbose Application.get_env(:pre_commit, :verbose) || false + @commands Application.compile_env(:pre_commit, :commands, []) + @verbose Application.compile_env(:pre_commit, :verbose, false) def run(_) do IO.puts("\e[95mPre-commit running...\e[0m") diff --git a/mix.exs b/mix.exs index 530694f..4e377a5 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule PreCommit.Mixfile do def project do [app: :pre_commit, version: "0.3.4", - elixir: "~> 1.2", + elixir: "~> 1.16", build_embedded: Mix.env == :prod, start_permanent: Mix.env == :prod, deps: deps(), diff --git a/mix.lock b/mix.lock index 3520fe5..9b91434 100644 --- a/mix.lock +++ b/mix.lock @@ -1,2 +1,9 @@ -%{"earmark": {:hex, :earmark, "1.2.3", "206eb2e2ac1a794aa5256f3982de7a76bf4579ff91cb28d0e17ea2c9491e46a4", [], [], "hexpm"}, - "ex_doc": {:hex, :ex_doc, "0.17.1", "39f777415e769992e6732d9589dc5846ea587f01412241f4a774664c746affbb", [], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"}} +%{ + "earmark": {:hex, :earmark, "1.2.3", "206eb2e2ac1a794aa5256f3982de7a76bf4579ff91cb28d0e17ea2c9491e46a4", [], [], "hexpm"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.45", "cba8369ab2a1342e419bc2760eec731b17be828941dcf494045d44766227e1d5", [:mix], [], "hexpm", "d3ec045bf122965db20c0bdb420e19ee1415843135327124918473feb4b328e8"}, + "ex_doc": {:hex, :ex_doc, "0.40.3", "4a972ffe64bc07dc605af487e98fc19b72a4185f55ca031b94c0552d6071c1d9", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "2756e357742fecd9749b489b85d67c9ce99c465f2e75728d9e6dc8d704b973de"}, + "makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"}, + "makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"}, + "makeup_erlang": {:hex, :makeup_erlang, "1.1.0", "835f7e60792e08824cda445639555d7bf1bbbddb1b60b306e33cb6f6db24dc74", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "1cd6780fb1dd1a03979abaed0fe82712b0625118fd5257d3ebbf73f960c73c3c"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.2", "8efba0122db06df95bfaa78f791344a89352ba04baedd3849593bfce4d0dc1c6", [:mix], [], "hexpm", "4b21398942dda052b403bbe1da991ccd03a053668d147d53fb8c4e0efe09c973"}, +}