Add Credo refactor checks and fix double Enum.map

Add 9 enabled + 1 disabled Credo checks from ex_slop README.
Fix MapMap finding in ListeningStats.update/1 (single pass).
Disable AppendSingleItem (10 pre-existing violations).
This commit is contained in:
Claudio Ortolina
2026-05-14 10:47:13 +01:00
parent 1f7d552727
commit d30e6d2d8f
2 changed files with 13 additions and 3 deletions
+12 -1
View File
@@ -5,6 +5,15 @@
plugins: [{ExSlop, []}],
checks: %{
extra: [
{Credo.Check.Warning.ExpensiveEmptyEnumCheck, []},
{Credo.Check.Refactor.DoubleBooleanNegation, []},
{Credo.Check.Refactor.CondStatements, []},
{Credo.Check.Refactor.MapMap, []},
{Credo.Check.Refactor.FilterFilter, []},
{Credo.Check.Refactor.RejectReject, []},
{Credo.Check.Refactor.FilterCount, []},
{Credo.Check.Refactor.NegatedConditionsInUnless, []},
{Credo.Check.Refactor.UnlessWithElse, []},
{Credo.Check.Refactor.Nesting, max_nesting: 3},
{Credo.Check.Readability.ModuleDoc,
ignore_names: [
@@ -32,7 +41,9 @@
]},
{Credo.Check.Refactor.CyclomaticComplexity, max_complexity: 12}
],
disabled: []
disabled: [
{Credo.Check.Refactor.AppendSingleItem, []}
]
}
# files etc.
}