-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update supported Elixir, OTP and Ecto versions #37
Merged
+265
−89
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,59 +1,215 @@ | ||
# This file contains the configuration for Credo and you are probably reading | ||
# this after creating it with `mix credo.gen.config`. | ||
# | ||
# If you find anything wrong or unclear in this file, please report an | ||
# issue on GitHub: https://github.com/rrrene/credo/issues | ||
# | ||
%{ | ||
# | ||
# You can have as many configs as you like in the `configs:` field. | ||
configs: [ | ||
%{ | ||
# | ||
# Run any config using `mix credo -C <name>`. If no config name is given | ||
# "default" is used. | ||
# | ||
name: "default", | ||
strict: true, | ||
# | ||
# These are the files included in the analysis: | ||
files: %{ | ||
included: ["lib/", "test/"], | ||
excluded: [] | ||
# | ||
# You can give explicit globs or simply directories. | ||
# In the latter case `**/*.{ex,exs}` will be used. | ||
# | ||
included: [ | ||
"lib/", | ||
"src/", | ||
"test/", | ||
"web/", | ||
"apps/*/lib/", | ||
"apps/*/src/", | ||
"apps/*/test/", | ||
"apps/*/web/" | ||
], | ||
excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"] | ||
}, | ||
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}, | ||
{Credo.Check.Design.DuplicatedCode, excluded_macros: []}, | ||
{Credo.Check.Design.TagTODO}, | ||
{Credo.Check.Design.TagFIXME}, | ||
{Credo.Check.Readability.AliasOrder}, | ||
{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}, | ||
{Credo.Check.Refactor.ABCSize, max_size: 50}, | ||
{Credo.Check.Refactor.CaseTrivialMatches}, | ||
{Credo.Check.Refactor.CondStatements}, | ||
{Credo.Check.Refactor.FunctionArity}, | ||
{Credo.Check.Refactor.MatchInCondition}, | ||
{Credo.Check.Refactor.PipeChainStart, excluded_argument_types: ~w(atom binary fn keyword)a, excluded_functions: ~w(from)}, | ||
{Credo.Check.Refactor.CyclomaticComplexity}, | ||
{Credo.Check.Refactor.MapInto, false}, | ||
{Credo.Check.Refactor.NegatedConditionsInUnless}, | ||
{Credo.Check.Refactor.NegatedConditionsWithElse}, | ||
{Credo.Check.Refactor.Nesting}, | ||
{Credo.Check.Refactor.UnlessWithElse}, | ||
{Credo.Check.Warning.IExPry}, | ||
{Credo.Check.Warning.IoInspect}, | ||
{Credo.Check.Warning.LazyLogging, false}, | ||
{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}, | ||
{Credo.Check.Warning.OperationWithConstantResult}, | ||
{CredoEnvvar.Check.Warning.EnvironmentVariablesAtCompileTime} | ||
] | ||
# | ||
# Load and configure plugins here: | ||
# | ||
plugins: [], | ||
# | ||
# 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: [], | ||
# | ||
# If you want to enforce a style guide and need a more traditional linting | ||
# experience, you can change `strict` to `true` below: | ||
# | ||
strict: false, | ||
# | ||
# To modify the timeout for parsing files, change this value: | ||
# | ||
parse_timeout: 5000, | ||
# | ||
# If you want to use uncolored output by default, you can change `color` | ||
# to `false` below: | ||
# | ||
color: true, | ||
# | ||
# 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: %{ | ||
enabled: [ | ||
# | ||
## Consistency Checks | ||
# | ||
{Credo.Check.Consistency.ExceptionNames, []}, | ||
{Credo.Check.Consistency.LineEndings, []}, | ||
{Credo.Check.Consistency.ParameterPatternMatching, []}, | ||
{Credo.Check.Consistency.SpaceAroundOperators, []}, | ||
{Credo.Check.Consistency.SpaceInParentheses, []}, | ||
{Credo.Check.Consistency.TabsOrSpaces, []}, | ||
|
||
# | ||
## Design Checks | ||
# | ||
# You can customize the priority of any check | ||
# Priority values are: `low, normal, high, higher` | ||
# | ||
{Credo.Check.Design.AliasUsage, [priority: :low, if_nested_deeper_than: 2, if_called_more_often_than: 0]}, | ||
# You can also customize the exit_status of each check. | ||
# If you don't want TODO comments to cause `mix credo` to fail, just | ||
# set this value to 0 (zero). | ||
# | ||
{Credo.Check.Design.TagTODO, [exit_status: 2]}, | ||
{Credo.Check.Design.TagFIXME, []}, | ||
|
||
# | ||
## Readability Checks | ||
# | ||
{Credo.Check.Readability.AliasOrder, []}, | ||
{Credo.Check.Readability.FunctionNames, []}, | ||
{Credo.Check.Readability.LargeNumbers, []}, | ||
{Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 200]}, | ||
{Credo.Check.Readability.ModuleAttributeNames, []}, | ||
{Credo.Check.Readability.ModuleDoc, []}, | ||
{Credo.Check.Readability.ModuleNames, []}, | ||
{Credo.Check.Readability.ParenthesesInCondition, []}, | ||
{Credo.Check.Readability.ParenthesesOnZeroArityDefs, []}, | ||
{Credo.Check.Readability.PipeIntoAnonymousFunctions, []}, | ||
{Credo.Check.Readability.PredicateFunctionNames, []}, | ||
{Credo.Check.Readability.PreferImplicitTry, []}, | ||
{Credo.Check.Readability.RedundantBlankLines, []}, | ||
{Credo.Check.Readability.Semicolons, []}, | ||
{Credo.Check.Readability.SpaceAfterCommas, []}, | ||
{Credo.Check.Readability.StringSigils, []}, | ||
{Credo.Check.Readability.TrailingBlankLine, []}, | ||
{Credo.Check.Readability.TrailingWhiteSpace, []}, | ||
{Credo.Check.Readability.UnnecessaryAliasExpansion, []}, | ||
{Credo.Check.Readability.VariableNames, []}, | ||
{Credo.Check.Readability.WithSingleClause, []}, | ||
|
||
# | ||
## Refactoring Opportunities | ||
# | ||
{Credo.Check.Refactor.Apply, false}, | ||
{Credo.Check.Refactor.CondStatements, []}, | ||
{Credo.Check.Refactor.CyclomaticComplexity, []}, | ||
{Credo.Check.Refactor.FunctionArity, []}, | ||
{Credo.Check.Refactor.LongQuoteBlocks, []}, | ||
{Credo.Check.Refactor.MatchInCondition, []}, | ||
{Credo.Check.Refactor.MapJoin, []}, | ||
{Credo.Check.Refactor.NegatedConditionsInUnless, []}, | ||
{Credo.Check.Refactor.NegatedConditionsWithElse, []}, | ||
{Credo.Check.Refactor.Nesting, []}, | ||
{Credo.Check.Refactor.UnlessWithElse, []}, | ||
{Credo.Check.Refactor.WithClauses, []}, | ||
{Credo.Check.Refactor.FilterCount, []}, | ||
{Credo.Check.Refactor.FilterFilter, []}, | ||
{Credo.Check.Refactor.RejectReject, []}, | ||
{Credo.Check.Refactor.RedundantWithClauseResult, []}, | ||
|
||
# | ||
## Warnings | ||
# | ||
{Credo.Check.Warning.ApplicationConfigInModuleAttribute, []}, | ||
{Credo.Check.Warning.BoolOperationOnSameValues, []}, | ||
{Credo.Check.Warning.Dbg, false}, | ||
{Credo.Check.Warning.ExpensiveEmptyEnumCheck, []}, | ||
{Credo.Check.Warning.IExPry, []}, | ||
{Credo.Check.Warning.IoInspect, []}, | ||
{Credo.Check.Warning.MissedMetadataKeyInLoggerConfig, []}, | ||
{Credo.Check.Warning.OperationOnSameValues, []}, | ||
{Credo.Check.Warning.OperationWithConstantResult, []}, | ||
{Credo.Check.Warning.RaiseInsideRescue, []}, | ||
{Credo.Check.Warning.SpecWithStruct, []}, | ||
{Credo.Check.Warning.WrongTestFileExtension, []}, | ||
{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.UnsafeExec, []} | ||
], | ||
disabled: [ | ||
# | ||
# Checks scheduled for next check update (opt-in for now, just replace `false` with `[]`) | ||
|
||
# | ||
# Controversial and experimental checks (opt-in, just move the check to `:enabled` | ||
# and be sure to use `mix credo --strict` to see low priority checks) | ||
# | ||
{Credo.Check.Consistency.MultiAliasImportRequireUse, []}, | ||
{Credo.Check.Consistency.UnusedVariableNames, []}, | ||
{Credo.Check.Design.DuplicatedCode, []}, | ||
{Credo.Check.Design.SkipTestWithoutComment, []}, | ||
{Credo.Check.Readability.AliasAs, []}, | ||
{Credo.Check.Readability.BlockPipe, []}, | ||
{Credo.Check.Readability.ImplTrue, []}, | ||
{Credo.Check.Readability.MultiAlias, []}, | ||
{Credo.Check.Readability.NestedFunctionCalls, []}, | ||
{Credo.Check.Readability.OneArityFunctionInPipe, []}, | ||
{Credo.Check.Readability.SeparateAliasRequire, []}, | ||
{Credo.Check.Readability.SingleFunctionToBlockPipe, []}, | ||
{Credo.Check.Readability.SinglePipe, []}, | ||
{Credo.Check.Readability.Specs, []}, | ||
{Credo.Check.Readability.StrictModuleLayout, []}, | ||
{Credo.Check.Readability.WithCustomTaggedTuple, []}, | ||
{Credo.Check.Readability.OnePipePerLine, []}, | ||
{Credo.Check.Refactor.ABCSize, max_size: 50}, | ||
{Credo.Check.Refactor.AppendSingleItem, []}, | ||
{Credo.Check.Refactor.DoubleBooleanNegation, []}, | ||
{Credo.Check.Refactor.FilterReject, []}, | ||
{Credo.Check.Refactor.IoPuts, []}, | ||
{Credo.Check.Refactor.MapMap, []}, | ||
{Credo.Check.Refactor.ModuleDependencies, []}, | ||
{Credo.Check.Refactor.NegatedIsNil, []}, | ||
{Credo.Check.Refactor.PassAsyncInTestCases, []}, | ||
{Credo.Check.Refactor.PipeChainStart, excluded_argument_types: ~w(atom binary fn keyword)a, excluded_functions: ~w(from)}, | ||
{Credo.Check.Refactor.RejectFilter, []}, | ||
{Credo.Check.Refactor.VariableRebinding, []}, | ||
{Credo.Check.Warning.LazyLogging, []}, | ||
{Credo.Check.Warning.LeakyEnvironment, []}, | ||
{Credo.Check.Warning.MapGetUnsafePass, []}, | ||
{Credo.Check.Warning.MixEnv, []}, | ||
{Credo.Check.Warning.UnsafeToAtom, []} | ||
|
||
# {Credo.Check.Refactor.MapInto, []}, | ||
|
||
# | ||
# Custom checks can be created using `mix credo.gen.check`. | ||
# | ||
] | ||
} | ||
} | ||
] | ||
} |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also include OTP 26 and 27 as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep absolutely, I just wanted to make all OTP 25 builds go green and then check for 26 and 27 after 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kianmeng I added a few!
🙌