OptimumCredo.Check.Warning.CommentedOutCode (OptimumCredo v0.5.0)
View SourceBasics
This check is disabled by default.
Learn how to enable it via .credo.exs.
This check has a base priority of low and works with any version of Elixir.
Explanation
Delete commented-out code; version control remembers it. Use # TODO:/# FIXME: for
real follow-ups.
Bad:
# IO.inspect(socket.assigns)
# Repo.delete_all(User)Good: remove the lines.
Check-Specific Parameters
Use the following parameters to configure this check:
:min_lines
Code-like lines required in a run (a single ... do line always counts).
This parameter defaults to 2.
:ignore_prefixes
Comment text prefixes that are never treated as code.
This parameter defaults to ["TODO:", "FIXME:", "NOTE:"].
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs config file.