-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
I am having trouble getting the Credo check working, with the error Ignoring an undefined check: ExcellentMigrations.CredoCheck.MigrationsSafety.
Whenever I run credo it doesn't seem to want to run the migration checks. Here what I get after setting it up in a new phoenix project with my credo config. To fix the errors if I explicitly put the excellent_migrations files into the requires block everything seems to work. I'm sure this is something I'm doing wrong but I can't see what it is.
>mix deps.get
(snipped)
>mix compile
(snipped)
>mix credo 646ms 2 ✖
** (config) Ignoring an undefined check: ExcellentMigrations.CredoCheck.MigrationsSafety
Checking 27 source files ...
Please report incorrect results: https://github.com/rrrene/credo/issues
Analysis took 0.1 seconds (0.03s to load, 0.1s running 55 checks on 27 files)
64 mods/funs, found no issues.
Showing priority issues: ↑ ↗ → (use `mix credo explain` to explain issues, `mix credo --help` for options).
I added mix deps like so
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:excellent_migrations, "~> 0.1", only: [:dev, :test], runtime: false}with this .credo.exs config
%{
configs: [
%{
name: "default",
files: %{
included: [
"config/",
"lib/",
"priv/",
"test/"
],
excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"]
},
checks: [
{ExcellentMigrations.CredoCheck.MigrationsSafety, []}
],
plugins: [],
requires: [
# Adding these fixes the issue
# "deps/excellent_migrations/lib/dangers_filter.ex",
# "deps/excellent_migrations/lib/config_comments_parser.ex",
# "deps/excellent_migrations/lib/ast_parser_full_detections.ex",
# "deps/excellent_migrations/lib/ast_parser.ex",
# "deps/excellent_migrations/lib/files_finder.ex",
# "deps/excellent_migrations/lib/message_generator.ex",
# "deps/excellent_migrations/lib/dangers_detector.ex",
# "deps/excellent_migrations/lib/credo_check/migrations_safety.ex"
],
strict: false,
parse_timeout: 5000,
color: true
}
]
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels