-
Notifications
You must be signed in to change notification settings - Fork 9
/
.credo.exs
51 lines (51 loc) · 1.95 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
48
49
50
51
# Credo config to add/disable check rules.
# On execution it is merged with default config in deps/credo/.config.exs
%{
configs: [
%{
# All configs are named to be executed with 'mix credo -C <name>'
# To merge with default config we should specify "default" name
name: "default",
strict: true,
color: true,
#
# These are the files included in the analysis
# We SHOULD specify them here
# This key IS NOT merged with default config
files: %{
included: ["lib/", "config/", "test/"],
excluded: [~r"/_build/", ~r"/deps/"]
},
#
# If you create your own checks, you must specify the source files for
# them here, so they can be loaded by Credo before running the analysis.
requires: [],
#
# This key IS merged with default config
# Add here only changes to default rules
checks: [
{Credo.Check.Design.AliasUsage, false},
{Credo.Check.Readability.ModuleDoc, false},
{Credo.Check.Refactor.PipeChainStart, false},
{Credo.Check.Design.TagTODO, false},
# Turn off function complexity check. It always fail on
# assert_value macro because it is complex.
{Credo.Check.Refactor.CyclomaticComplexity, false},
# Same for function body nesting
{Credo.Check.Refactor.Nesting, max_nesting: 3},
{Credo.Check.Refactor.FunctionArity, false},
# Long lines are not ok, Exit with status code
{Credo.Check.Readability.MaxLineLength,
ignore_strings: false,
ignore_definitions: false,
priority: :high,
exit_status: 2},
# Do not suggest to write large numbers with underscore
# We have GitHub data maps in tests with big ids and bytes sizes
{Credo.Check.Readability.LargeNumbers, false},
# We have a lot of assert_value "foo" == "foo" in tests
{Credo.Check.Warning.OperationOnSameValues, false}
]
}
]
}