-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Description
Running 1.5.1 styler against our Credo config file produced the following change:
%{
+ alias(Credo.Check.Refactor.RedundantWithClauseResult),
configs: [
%{
name: "default",
...
- {Credo.Check.Refactor.RedundantWithClauseResult, []},
+ {RedundantWithClauseResult, []},
...
- {Credo.Check.Refactor.RedundantWithClauseResult, []},
+ {RedundantWithClauseResult, []},
Now, this points out that there was a redundancy in the file, so that's the obvious fix on our part. But this change also breaks mix credo
:
error: expected key-value pairs in a map, got: alias Credo.Check.Refactor.RedundantWithClauseResult
│
1 │ %{
│ ^^
│
└─ config/.credo.exs:1
warning: Execution halted during Elixir.Credo.Execution.Task.ConvertCLIOptionsToConfig! Unrecognized error: {:badconfig, "...", %CompileError{file: ".../config/.credo.exs", line: 0, description: "cannot compile file (errors have been logged)"}}
Testing, the following change will compile and run:
alias Credo.Check.Refactor.RedundantWithClauseResult
%{
configs: [
%{
name: "default",
I'm not aware of a circumstance where placing an alias()
into the map would succeed, so should probably try to avoid that.
Metadata
Metadata
Assignees
Labels
No labels