-
Notifications
You must be signed in to change notification settings - Fork 1
/
.credo.exs
47 lines (47 loc) · 1.74 KB
/
.credo.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
%{
configs: [
%{
name: "default",
strict: true,
files: %{
included: [
"{mix,.formatter,.credo}.exs",
"config/*.exs",
"lib/",
"src/",
"test/",
"priv/repo/"
],
excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"]
},
checks: [
# Remove Rule because two rejects improve readability and performance is not an issue
{Credo.Check.Refactor.RejectReject, false},
{Credo.Check.Design.TagTODO, exit_status: 0},
{Credo.Check.Design.TagFIXME, exit_status: 0},
{Credo.Check.Readability.StrictModuleLayout, []},
{Credo.Check.Consistency.MultiAliasImportRequireUse, []},
{Credo.Check.Consistency.UnusedVariableNames, []},
# TODO: Enable
# {Credo.Check.Design.DuplicatedCode, []},
{Credo.Check.Readability.AliasAs, false},
{Credo.Check.Readability.MultiAlias, []},
# TODO: Enable
# {Credo.Check.Readability.Specs, []},
{Credo.Check.Readability.SinglePipe, []},
{Credo.Check.Readability.WithCustomTaggedTuple, []},
{Credo.Check.Refactor.ABCSize, max_size: 100},
{Credo.Check.Refactor.AppendSingleItem, false},
{Credo.Check.Refactor.DoubleBooleanNegation, []},
{Credo.Check.Refactor.ModuleDependencies, false},
{Credo.Check.Refactor.NegatedIsNil, []},
{Credo.Check.Refactor.PipeChainStart, excluded_functions: ["from"]},
{Credo.Check.Refactor.VariableRebinding, false},
{Credo.Check.Warning.LeakyEnvironment, []},
{Credo.Check.Warning.MapGetUnsafePass, []},
{Credo.Check.Warning.UnsafeToAtom, []},
{Credo.Check.Refactor.Nesting, max_nesting: 3}
]
}
]
}