Skip to content

Commit

Permalink
Fix type check issue after 'apply/3' got type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
dushyantss committed Jan 3, 2025
1 parent 965a59c commit a30015f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/credo/check.ex
Original file line number Diff line number Diff line change
Expand Up @@ -384,16 +384,19 @@ defmodule Credo.Check do
@impl true
def run_on_all_source_files(exec, source_files, params \\ [])

@impl true
def run_on_all_source_files(exec, source_files, params) do
if function_exported?(__MODULE__, :run, 3) do
if function_exported?(__MODULE__, :run, 3) do
@impl true
def run_on_all_source_files(exec, source_files, params) do
IO.warn(
"Defining `run(source_files, exec, params)` for checks that run on all source files is deprecated. " <>
"Define `run_on_all_source_files(exec, source_files, params)` instead."
)

apply(__MODULE__, :run, [source_files, exec, params])
else
end
else
@impl true
def run_on_all_source_files(exec, source_files, params) do
do_run_on_all_source_files(exec, source_files, params)
end
end
Expand Down

0 comments on commit a30015f

Please sign in to comment.