|
| 1 | +%{ |
| 2 | + configs: [ |
| 3 | + %{ |
| 4 | + name: "default", |
| 5 | + files: %{ |
| 6 | + included: ["lib/"], |
| 7 | + excluded: ["lib/test.ex"] |
| 8 | + }, |
| 9 | + requires: [], |
| 10 | + checks: [ |
| 11 | + # Consistency |
| 12 | + {Credo.Check.Consistency.ExceptionNames}, |
| 13 | + {Credo.Check.Consistency.LineEndings}, |
| 14 | + {Credo.Check.Consistency.MultiAliasImportRequireUse}, |
| 15 | + {Credo.Check.Consistency.ParameterPatternMatching}, |
| 16 | + {Credo.Check.Consistency.SpaceAroundOperators}, |
| 17 | + {Credo.Check.Consistency.SpaceInParentheses}, |
| 18 | + {Credo.Check.Consistency.TabsOrSpaces}, |
| 19 | + # Design |
| 20 | + {Credo.Check.Design.AliasUsage}, |
| 21 | + {Credo.Check.Design.DuplicatedCode}, |
| 22 | + {Credo.Check.Design.TagFIXME}, |
| 23 | + {Credo.Check.Design.TagTODO, exit_status: 0}, |
| 24 | + # Readability |
| 25 | + {Credo.Check.Readability.AliasOrder}, |
| 26 | + {Credo.Check.Readability.FunctionNames}, |
| 27 | + {Credo.Check.Readability.LargeNumbers}, |
| 28 | + {Credo.Check.Readability.MaxLineLength}, |
| 29 | + {Credo.Check.Readability.ModuleAttributeNames}, |
| 30 | + {Credo.Check.Readability.ModuleDoc}, |
| 31 | + {Credo.Check.Readability.ModuleNames}, |
| 32 | + {Credo.Check.Readability.ParenthesesOnZeroArityDefs, false}, |
| 33 | + {Credo.Check.Readability.PredicateFunctionNames}, |
| 34 | + {Credo.Check.Readability.PreferImplicitTry, false}, |
| 35 | + {Credo.Check.Readability.PreferUnquotedAtoms}, |
| 36 | + {Credo.Check.Readability.RedundantBlankLines}, |
| 37 | + {Credo.Check.Readability.Semicolons}, |
| 38 | + {Credo.Check.Readability.SinglePipe}, |
| 39 | + {Credo.Check.Readability.SpaceAfterCommas}, |
| 40 | + {Credo.Check.Readability.Specs}, |
| 41 | + {Credo.Check.Readability.StringSigils}, |
| 42 | + {Credo.Check.Readability.TrailingBlankLine}, |
| 43 | + {Credo.Check.Readability.TrailingWhiteSpace}, |
| 44 | + {Credo.Check.Readability.UnnecessaryAliasExpansion}, |
| 45 | + {Credo.Check.Readability.VariableNames}, |
| 46 | + # Refactor |
| 47 | + {Credo.Check.Refactor.ABCSize}, |
| 48 | + {Credo.Check.Refactor.AppendSingleItem}, |
| 49 | + {Credo.Check.Refactor.CaseTrivialMatches}, |
| 50 | + {Credo.Check.Refactor.CondStatements}, |
| 51 | + {Credo.Check.Refactor.CyclomaticComplexity}, |
| 52 | + {Credo.Check.Refactor.DoubleBooleanNegation}, |
| 53 | + {Credo.Check.Refactor.FunctionArity}, |
| 54 | + {Credo.Check.Refactor.LongQuoteBlocks}, |
| 55 | + {Credo.Check.Refactor.MapInto}, |
| 56 | + {Credo.Check.Refactor.MatchInCondition}, |
| 57 | + {Credo.Check.Refactor.ModuleDependencies}, |
| 58 | + {Credo.Check.Refactor.NegatedConditionsInUnless}, |
| 59 | + {Credo.Check.Refactor.NegatedConditionsWithElse}, |
| 60 | + {Credo.Check.Refactor.Nesting}, |
| 61 | + {Credo.Check.Refactor.PerceivedComplexity}, |
| 62 | + {Credo.Check.Refactor.PipeChainStart}, |
| 63 | + {Credo.Check.Refactor.UnlessWithElse}, |
| 64 | + {Credo.Check.Refactor.VariableRebinding, false}, |
| 65 | + # Warning |
| 66 | + {Credo.Check.Warning.BoolOperationOnSameValues}, |
| 67 | + {Credo.Check.Warning.ExpensiveEmptyEnumCheck}, |
| 68 | + {Credo.Check.Warning.IExPry}, |
| 69 | + {Credo.Check.Warning.IoInspect}, |
| 70 | + {Credo.Check.Warning.LazyLogging}, |
| 71 | + {Credo.Check.Warning.MapGetUnsafePass}, |
| 72 | + {Credo.Check.Warning.OperationOnSameValues}, |
| 73 | + {Credo.Check.Warning.OperationWithConstantResult}, |
| 74 | + {Credo.Check.Warning.RaiseInsideRescue}, |
| 75 | + {Credo.Check.Warning.UnsafeToAtom, false}, |
| 76 | + {Credo.Check.Warning.UnusedEnumOperation}, |
| 77 | + {Credo.Check.Warning.UnusedFileOperation}, |
| 78 | + {Credo.Check.Warning.UnusedKeywordOperation}, |
| 79 | + {Credo.Check.Warning.UnusedListOperation}, |
| 80 | + {Credo.Check.Warning.UnusedPathOperation}, |
| 81 | + {Credo.Check.Warning.UnusedRegexOperation}, |
| 82 | + {Credo.Check.Warning.UnusedStringOperation}, |
| 83 | + {Credo.Check.Warning.UnusedTupleOperation} |
| 84 | + ] |
| 85 | + } |
| 86 | + ] |
| 87 | +} |
0 commit comments