credo icon indicating copy to clipboard operation
credo copied to clipboard

Check running by default?

Open gemantzu opened this issue 2 years ago • 2 comments

Environment

  • Credo version (mix credo -v): 1.7.0
  • Erlang/Elixir version (elixir -v): checked multiple versions
  • Operating system: MacOS

What were you trying to do?

I was trying to run all my checks, which do not include Credo.Check.Warning.MissedMetadataKeyInLoggerConfig at all, so this check shouldn't be giving me issues.

Expected outcome

No issues

Actual outcome

Logger.metadata will be ignored in production.

This seems like a 1.7.0 only issue, 1.6 versions didn't give me this problem.

gemantzu avatar Jul 28 '23 12:07 gemantzu

Can you post the .credo.exs of the project you are having this issue in?

rrrene avatar Dec 17 '23 07:12 rrrene

@gemantzu Checking in: Any news on this?

rrrene avatar Jan 30 '24 05:01 rrrene

I was seeing this too, but I realized some checks now have a "this check is enabled by default" banner that I hadn't known to look for (as of credo 1.7.4). https://hexdocs.pm/credo/Credo.Check.Warning.MissedMetadataKeyInLoggerConfig.html

brettbeatty avatar Feb 28 '24 17:02 brettbeatty

Just to be clear: There has been a set of default checks from the start and which checks are "on by default" has been evolving over the years.

An important feature, introduced in Credo 1.6, is the ability to explicitly enable only the checks you want.

Closing this as expected behaviour. Please re-open if you disagree! 👍

rrrene avatar Feb 28 '24 19:02 rrrene