Skip to content
This repository was archived by the owner on Feb 17, 2026. It is now read-only.

Commit 9c9283c

Browse files
beatrizChagaswevtimoteogaraujodev
committed
Introduce AutoFormatter.Action.hook_manager/0
Co-authored-by: wevtimoteo <wevtimoteo@users.noreply.github.com> Co-authored-by: garaujodev <garaujodev@users.noreply.github.com>
1 parent c104f01 commit 9c9283c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

lib/auto_formatter/action.ex

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ defmodule AutoFormatter.Action do
1313
end
1414

1515
def perform(:init) do
16-
HookManager.create("pre-commit", @pre_commit_hook_content)
16+
hook_manager().create("pre-commit", @pre_commit_hook_content)
1717
end
1818

1919
def perform(:_format) do
@@ -32,6 +32,10 @@ defmodule AutoFormatter.Action do
3232
end
3333

3434
def perform(action) do
35-
IO.inspect("Performing action: #{action}")
35+
IO.puts("Performing action: #{action}")
36+
end
37+
38+
defp hook_manager do
39+
Application.get_env(:auto_formatter, :hook_manager, HookManager)
3640
end
3741
end

0 commit comments

Comments
 (0)