-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Credo.Check.Warning.MissedMetadataKeyInLoggerConfig reporting false errors since 1.7.2 upgrade #1101
Comments
Same issue here.
|
@Billzabob Ah, we changed the key that is read to @tcitworld When you are writing "in that environment", is that the same env Credo is run in? |
…ggerConfig check It's buggy rrrene/credo#1101 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@rrrene yeah, I tried on my project to add the metadata in every environment file but nothing is changing. Same error of @Billzabob |
Changing :console to :default_formatter worked for me on a clean phoenix install ie. $ elixir -v Elixir 1.16.0 (compiled with Erlang/OTP 24) $ uname -a $ mkdir /tmp/temp-phoenix finish install$ sed -i -e '/:dns_cluster/a \ {:credo, "~> 1.7.2", only: [:dev, :test], runtime: false},' mix.exs finish install$ mix credo all good$ echo 'defmodule Hello.Foo do require Logger defp foo do $ mix credo Warnings - please take a look Please report incorrect results: https://github.com/rrrene/credo/issues Analysis took 0.2 seconds (0.04s to load, 0.2s running 55 checks on 22 files) Showing priority issues: ↑ ↗ → (use $ sed -i -e 's/:console/:default_formatter/' config/{config,dev}.exs $ mix credo all good` Question? is this the correct way to clear the 'issue'? I don't know the impact to the rest of the application when changing :console to :default_formatter |
@Billzabob @tcitworld @ViseLuca Thanks for reporting this 😀 It should now be fixed on You can try this by setting the Credo dep to {:credo, github: "rrrene/credo"} Please report back if your issue is solved! 👍 @rhammer1 No, we don't want people to change their config.exs for Credo to work. We f'ed up on this one 🤔 |
Yeah issue is solved! I tried right now, thank you very much! 😄 |
@Billzabob @tcitworld @ViseLuca @rhammer1 Fix is live as part of Please feel free to re-open if there are any problems 👍 |
Credo 1.7.3 fixes the problem, thanks! |
Precheck
Environment
mix credo -v
):1.7.2-ref.main.ef07378c+uncommittedchanges
elixir -v
):Erlang/OTP 26 [erts-14.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
Elixir 1.15.6 (compiled with Erlang/OTP 24)
MacOS Sonoma 14.2.1 (23C71)
What were you trying to do?
Run
mix credo --strict
Expected outcome
No Credo errors
Actual outcome
Since going from 1.7.1 to 1.7.2 we are now getting a ton of errors from
Credo.Check.Warning.MissedMetadataKeyInLoggerConfig
that look like this:We have all these specified in our
config/config.exs
like so:The text was updated successfully, but these errors were encountered: