2018-04-05 23:47:36 +03:00
|
|
|
%{
|
|
|
|
configs: [
|
|
|
|
%{
|
|
|
|
name: "default",
|
|
|
|
strict: true,
|
|
|
|
files: %{
|
|
|
|
included: ["lib/", "test/", "priv/"],
|
|
|
|
excluded: []
|
|
|
|
},
|
|
|
|
checks: [
|
|
|
|
{Credo.Check.Consistency.ExceptionNames},
|
|
|
|
{Credo.Check.Consistency.LineEndings},
|
|
|
|
{Credo.Check.Consistency.SpaceAroundOperators},
|
|
|
|
{Credo.Check.Consistency.SpaceInParentheses},
|
|
|
|
{Credo.Check.Consistency.TabsOrSpaces},
|
|
|
|
{Credo.Check.Design.AliasUsage, if_called_more_often_than: 2, if_nested_deeper_than: 1},
|
2019-08-16 18:15:31 +03:00
|
|
|
{Credo.Check.Design.DuplicatedCode, mass_threshold: 100, excluded_macros: []},
|
2018-04-05 23:47:36 +03:00
|
|
|
{Credo.Check.Design.TagTODO},
|
|
|
|
{Credo.Check.Design.TagFIXME},
|
2018-12-09 03:57:20 +03:00
|
|
|
{Credo.Check.Readability.AliasOrder},
|
2018-04-05 23:47:36 +03:00
|
|
|
{Credo.Check.Readability.FunctionNames},
|
|
|
|
{Credo.Check.Readability.LargeNumbers},
|
|
|
|
{Credo.Check.Readability.MaxLineLength, max_length: 200},
|
|
|
|
{Credo.Check.Readability.ModuleAttributeNames},
|
|
|
|
{Credo.Check.Readability.ModuleDoc, false},
|
|
|
|
{Credo.Check.Readability.ModuleNames},
|
|
|
|
{Credo.Check.Readability.ParenthesesInCondition},
|
|
|
|
{Credo.Check.Readability.PredicateFunctionNames},
|
|
|
|
{Credo.Check.Readability.TrailingBlankLine},
|
|
|
|
{Credo.Check.Readability.TrailingWhiteSpace},
|
|
|
|
{Credo.Check.Readability.VariableNames},
|
2023-08-04 21:54:40 +03:00
|
|
|
{Credo.Check.Readability.WithSingleClause, false},
|
2023-02-07 17:21:48 +03:00
|
|
|
{Credo.Check.Refactor.ABCSize, max_size: 60},
|
2018-04-05 23:47:36 +03:00
|
|
|
{Credo.Check.Refactor.CaseTrivialMatches},
|
|
|
|
{Credo.Check.Refactor.CondStatements},
|
|
|
|
{Credo.Check.Refactor.FunctionArity},
|
|
|
|
{Credo.Check.Refactor.MatchInCondition},
|
2023-08-25 05:09:31 +03:00
|
|
|
{Credo.Check.Refactor.PipeChainStart,
|
|
|
|
excluded_argument_types: ~w(atom binary fn keyword)a, excluded_functions: ~w(from)},
|
2018-04-05 23:47:36 +03:00
|
|
|
{Credo.Check.Refactor.CyclomaticComplexity},
|
2019-02-06 16:31:06 +03:00
|
|
|
{Credo.Check.Refactor.MapInto, false},
|
2018-04-05 23:47:36 +03:00
|
|
|
{Credo.Check.Refactor.NegatedConditionsInUnless},
|
|
|
|
{Credo.Check.Refactor.NegatedConditionsWithElse},
|
2023-02-07 17:21:48 +03:00
|
|
|
{Credo.Check.Refactor.Nesting, max_nesting: 4},
|
2018-04-05 23:47:36 +03:00
|
|
|
{Credo.Check.Refactor.UnlessWithElse},
|
|
|
|
{Credo.Check.Warning.IExPry},
|
2018-12-09 03:57:20 +03:00
|
|
|
{Credo.Check.Warning.IoInspect},
|
2019-08-16 18:15:31 +03:00
|
|
|
{Credo.Check.Warning.LazyLogging, false},
|
2023-08-04 22:59:57 +03:00
|
|
|
{Credo.Check.Warning.MissedMetadataKeyInLoggerConfig, false},
|
2018-04-05 23:47:36 +03:00
|
|
|
{Credo.Check.Warning.OperationOnSameValues},
|
|
|
|
{Credo.Check.Warning.BoolOperationOnSameValues},
|
|
|
|
{Credo.Check.Warning.UnusedEnumOperation},
|
|
|
|
{Credo.Check.Warning.UnusedKeywordOperation},
|
|
|
|
{Credo.Check.Warning.UnusedListOperation},
|
|
|
|
{Credo.Check.Warning.UnusedStringOperation},
|
|
|
|
{Credo.Check.Warning.UnusedTupleOperation},
|
2018-12-09 03:57:20 +03:00
|
|
|
{Credo.Check.Warning.OperationWithConstantResult},
|
|
|
|
{CredoEnvvar.Check.Warning.EnvironmentVariablesAtCompileTime}
|
2018-04-05 23:47:36 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|