diff --git a/lib/credo/check/runner.ex b/lib/credo/check/runner.ex index e44388d0b..e6f94f2b9 100644 --- a/lib/credo/check/runner.ex +++ b/lib/credo/check/runner.ex @@ -61,6 +61,10 @@ defmodule Credo.Check.Runner do exec |> Execution.working_dir() |> Credo.Sources.find_in_dir(files_included, files_excluded) + |> case do + [] -> :skip_run + files -> files + end end source_files = diff --git a/lib/credo/check/warning/wrong_test_file_extension.ex b/lib/credo/check/warning/wrong_test_file_extension.ex index b90ee7ded..d680e4a0f 100644 --- a/lib/credo/check/warning/wrong_test_file_extension.ex +++ b/lib/credo/check/warning/wrong_test_file_extension.ex @@ -3,7 +3,7 @@ defmodule Credo.Check.Warning.WrongTestFileExtension do id: "EX5025", base_priority: :high, param_defaults: [ - files: %{included: ["test/**/*_test.exs"]} + files: %{included: ["test/**/*_test.ex"]} ], explanations: [ check: """ @@ -12,7 +12,7 @@ defmodule Credo.Check.Warning.WrongTestFileExtension do (from the `ex_unit` docs) - This check ensures that test files are not ending with `.ex` (which would cause them to be skipped). + This check ensures that test files are not ending with `_test.ex` (which would cause them to be skipped). """ ]