-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a custom Credo configuration file
This is based on Ecto's configuration and tweaks a number of defaults rules to be more lenient than the stock configuration.
- Loading branch information
Showing
4 changed files
with
67 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
%{configs: [ | ||
%{name: "default", | ||
files: %{ | ||
included: ["lib/", "test/"], | ||
excluded: ["_build/", "deps/", "ext/"] | ||
}, | ||
requires: [], | ||
check_for_updates: false, | ||
|
||
# You can customize the parameters of any check by adding a second element | ||
# to the tuple. | ||
# | ||
# To disable a check put `false` as second element: | ||
# | ||
# {Credo.Check.Design.DuplicatedCode, false} | ||
# | ||
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, false}, | ||
{Credo.Check.Design.DuplicatedCode, excluded_macros: []}, | ||
|
||
{Credo.Check.Readability.FunctionNames}, | ||
{Credo.Check.Readability.LargeNumbers, false}, | ||
{Credo.Check.Readability.MaxLineLength, false}, | ||
{Credo.Check.Readability.ModuleAttributeNames}, | ||
{Credo.Check.Readability.ModuleNames}, | ||
{Credo.Check.Readability.ParenthesesInCondition}, | ||
{Credo.Check.Readability.PredicateFunctionNames}, | ||
{Credo.Check.Readability.TrailingBlankLine}, | ||
{Credo.Check.Readability.TrailingWhiteSpace}, | ||
{Credo.Check.Readability.VariableNames}, | ||
{Credo.Check.Readability.RedundantBlankLines}, | ||
|
||
{Credo.Check.Refactor.ABCSize, false}, | ||
{Credo.Check.Refactor.CondStatements}, | ||
{Credo.Check.Refactor.MatchInCondition}, | ||
{Credo.Check.Refactor.PipeChainStart, false}, | ||
{Credo.Check.Refactor.CyclomaticComplexity}, | ||
{Credo.Check.Refactor.NegatedConditionsInUnless}, | ||
{Credo.Check.Refactor.NegatedConditionsWithElse}, | ||
{Credo.Check.Refactor.Nesting}, | ||
{Credo.Check.Refactor.UnlessWithElse}, | ||
|
||
{Credo.Check.Warning.IExPry}, | ||
{Credo.Check.Warning.IoInspect, false}, | ||
{Credo.Check.Warning.NameRedeclarationByAssignment, false}, | ||
{Credo.Check.Warning.NameRedeclarationByCase, false}, | ||
{Credo.Check.Warning.NameRedeclarationByDef, false}, | ||
{Credo.Check.Warning.NameRedeclarationByFn, false}, | ||
{Credo.Check.Warning.BoolOperationOnSameValues}, | ||
{Credo.Check.Warning.UnusedEnumOperation}, | ||
{Credo.Check.Warning.UnusedKeywordOperation}, | ||
{Credo.Check.Warning.UnusedListOperation}, | ||
{Credo.Check.Warning.UnusedStringOperation}, | ||
{Credo.Check.Warning.UnusedTupleOperation}, | ||
{Credo.Check.Warning.OperationWithConstantResult}, | ||
] | ||
} | ||
]} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
styleguide: false | ||
engines: | ||
credo: | ||
enabled: true | ||
fixme: | ||
enabled: true | ||
remark-lint: | ||
enabled: true | ||
exclude_paths: | ||
- ci | ||
- doc | ||
- ext | ||
- test |
This file contains 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
This file contains 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