credo v0.8.0 Release Notes
-
- Load source files in parallel
- ๐ Improve high memory consumption
- ๐ Fix comment handling of Charlists, Sigils and Strings
- 0๏ธโฃ
LazyLogging
now only checks fordebug
calls by default - โ Add
--mute-exit-status
CLI switch, which mutes Credo's exit status (this will be used for integration tests as it means that any non-zero exit status results from a runtime error of Credo) - โ Add default param values to
mix explain
output TagTODO
andTagFIXME
now also report tags from doc-related module attributes (@doc
,@moduledoc
,@shortdoc
)- ๐ Fix false positives for
TrailingWhiteSpace
- ๐ Fix compiler warnings for
Sigils
๐ฅ BREAKING CHANGES
These changes concern people writing their own checks for Credo.
- ๐จ
Credo.SourceFile
struct was refactored:source
,lines
andast
are now stored in ETS tables. Credo.Config
struct was replaced byCredo.Execution
.run/3
callbacks forCredo.Check
are nowrun/4
callbacks as they have to receive the execution'sCredo.Execution
struct.
๐ Config Comments replace
@lint
attributes๐
@lint
attributes are deprecated and will be removed in Credo0.9.0
because โ they are causing a compiler warning in Elixir>= 1.4
.๐ Users of Credo can now disable individual lines or files for all or just specific checks.
For now, config comments let you exclude individual files completely
# credo:disable-for-this-file defmodule SomeApp.ThirdPartyCode do end
or deactivate specific lines:
def my_fun do # credo:disable-for-next-line IO.inspect :this_is_actually_okay end
or add the check module to exclude just that one check:
def my_fun do # credo:disable-for-next-line Credo.Check.Warning.IoInspect IO.inspect :this_is_actually_okay end
or use a Regex to be more flexible which checks to exclude:
def my_fun do # credo:disable-for-next-line /IoInspect/ IO.inspect :this_is_actually_okay end
Here's a list with the syntax options:
# credo:disable-for-this-file
- to disable for the entire file# credo:disable-for-next-line
- to disable for the next line# credo:disable-for-previous-line
- to disable for the previous line# credo:disable-for-lines:<count>
- to disable for the given number of lines (negative for previous lines)
๐ New checks
- ๐จ Credo.Check.Refactor.LongQuoteBlocks