Created
April 27, 2020 21:05
-
-
Save naps62/283aa898068279ca8a1eb871e4888146 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%{ | |
configs: [ | |
%{ | |
name: "default", | |
strict: true, | |
color: true, | |
checks: [ | |
# Consistency | |
{Credo.Check.Consistency.MultiAliasImportRequireUse, false}, | |
{Credo.Check.Consistency.ExceptionNames, false}, | |
# Design | |
{Credo.Check.Design.AliasUsage, false}, | |
{Credo.Check.Design.DuplicatedCode, exit_status: 0}, | |
{Credo.Check.Design.TagTODO, exit_status: 0}, | |
{Credo.Check.Design.TagFIXME, exit_status: 0}, | |
# Readability | |
{Credo.Check.Readability.FunctionNames}, | |
{Credo.Check.Readability.LargeNumbers}, | |
# MaxLineLength is already enforced by formatter | |
# credo throws warnings for commented lines, which is just annoying | |
{Credo.Check.Readability.MaxLineLength, false}, | |
{Credo.Check.Readability.ModuleAttributeNames}, | |
{Credo.Check.Readability.ModuleDoc, false}, | |
{Credo.Check.Readability.ModuleNames}, | |
{Credo.Check.Readability.ParenthesesOnZeroArityDefs}, | |
{Credo.Check.Readability.ParenthesesInCondition}, | |
{Credo.Check.Readability.PredicateFunctionNames}, | |
{Credo.Check.Readability.PreferImplicitTry}, | |
{Credo.Check.Readability.RedundantBlankLines}, | |
{Credo.Check.Readability.StringSigils}, | |
{Credo.Check.Readability.TrailingBlankLine}, | |
{Credo.Check.Readability.TrailingWhiteSpace}, | |
{Credo.Check.Readability.VariableNames}, | |
{Credo.Check.Readability.Semicolons}, | |
{Credo.Check.Readability.SpaceAfterCommas}, | |
{Credo.Check.Readability.AliasOrder, false}, | |
# Refactor | |
{Credo.Check.Refactor.ABCSize, exit_status: 0}, | |
{Credo.Check.Refactor.AppendSingleItem}, | |
{Credo.Check.Refactor.DoubleBooleanNegation}, | |
{Credo.Check.Refactor.CondStatements, false}, | |
{Credo.Check.Refactor.CyclomaticComplexity}, | |
# This should be a product of our common sense and detailed in reviews | |
{Credo.Check.Refactor.FunctionArity, false}, | |
{Credo.Check.Refactor.LongQuoteBlocks}, | |
{Credo.Check.Refactor.MatchInCondition}, | |
{Credo.Check.Refactor.NegatedConditionsInUnless}, | |
{Credo.Check.Refactor.NegatedConditionsWithElse}, | |
{Credo.Check.Refactor.Nesting}, | |
{Credo.Check.Refactor.PipeChainStart, false}, | |
{Credo.Check.Refactor.UnlessWithElse}, | |
{Credo.Check.Refactor.VariableRebinding}, | |
{Credo.Check.Refactor.WithClauses, false}, | |
{Credo.Check.Refactor.MapInto, false}, | |
# Warning | |
{Credo.Check.Warning.BoolOperationOnSameValues}, | |
{Credo.Check.Warning.ExpensiveEmptyEnumCheck}, | |
{Credo.Check.Warning.IExPry}, | |
{Credo.Check.Warning.IoInspect}, | |
{Credo.Check.Warning.LazyLogging, false}, | |
{Credo.Check.Warning.OperationOnSameValues}, | |
{Credo.Check.Warning.OperationWithConstantResult}, | |
{Credo.Check.Warning.UnusedEnumOperation}, | |
{Credo.Check.Warning.UnusedFileOperation}, | |
{Credo.Check.Warning.UnusedKeywordOperation}, | |
{Credo.Check.Warning.UnusedListOperation}, | |
{Credo.Check.Warning.UnusedPathOperation}, | |
{Credo.Check.Warning.UnusedRegexOperation}, | |
{Credo.Check.Warning.UnusedStringOperation}, | |
{Credo.Check.Warning.UnusedTupleOperation}, | |
{Credo.Check.Warning.RaiseInsideRescue}, | |
{Credo.Check.Warning.MapGetUnsafePass} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment