Its Credo id is EX1001, and it is in the consistency category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Consistency.ExceptionNames
Its Credo id is EX1002, and it is in the consistency category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Consistency.LineEndings
Its Credo id is EX1003, and it is in the consistency category. The default configuration does not enable it. Its base priority is high.
- Code
Credo.Check.Consistency.MultiAliasImportRequireUse
Its Credo id is EX1004, and it is in the consistency category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Consistency.ParameterPatternMatching
Its Credo id is EX1005, and it is in the consistency category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Consistency.SpaceAroundOperators
This is the **preferred** way, although other styles are possible, as long as it is applied consistently. Its Credo id is EX1006, and it is in the consistency category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Consistency.SpaceInParentheses
Its Credo id is EX1007, and it is in the consistency category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Consistency.TabsOrSpaces
But it’s a common practice to give these variables meaningful names anyway (_user instead of _), but some people prefer to name them all anonymously (_). Its Credo id is EX1008, and it is in the consistency category. The default configuration does not enable it. Its base priority is high.
- Code
Credo.Check.Consistency.UnusedVariableNames
Its Credo id is EX2001, and it is in the design category. The default configuration enables it. Its base priority is normal.
- Code
Credo.Check.Design.AliasUsage
Its Credo id is EX2008, and it is in the design category. The default configuration enables it. Its base priority is normal.
- Code
Credo.Check.Design.DeprecatedChecksConfig
Its Credo id is EX2002, and it is in the design category. The default configuration does not enable it. Its base priority is higher.
- Code
Credo.Check.Design.DuplicatedCode
Its Credo id is EX2007, and it is in the design category. The default configuration does not enable it. Its base priority is high.
- Code
Credo.Check.Design.MissingCheckInConfig
Its Credo id is EX2004, and it is in the design category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Design.TagFIXME
Its Credo id is EX2005, and it is in the design category. The default configuration enables it.
- Code
Credo.Check.Design.TagTODO
Its Credo id is EX3001, and it is in the readability category. The default configuration does not enable it. Its base priority is low.
- Code
Credo.Check.Readability.AliasAs
Its Credo id is EX3002, and it is in the readability category. The default configuration enables it. Its base priority is low.
- Code
Credo.Check.Readability.AliasOrder
Its Credo id is EX3003, and it is in the readability category. The default configuration does not enable it.
- Code
Credo.Check.Readability.BlockPipe
Its Credo id is EX3099, and it is in the readability category. The default configuration does not enable it.
- Code
Credo.Check.Readability.CaptureOperator
Its Credo id is EX3004, and it is in the readability category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Readability.FunctionNames
This can make code harder to comprehend. Its Credo id is EX3036, and it is in the readability category. The default configuration does not enable it. Its base priority is normal.
- Code
Credo.Check.Readability.ImplTrue
These do not affect the value of the number, but can help read large numbers more easily. Its Credo id is EX3006, and it is in the readability category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Readability.LargeNumbers
Its Credo id is EX3007, and it is in the readability category. The default configuration enables it. Its base priority is low.
- Code
Credo.Check.Readability.MaxLineLength
Its Credo id is EX3008, and it is in the readability category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Readability.ModuleAttributeNames
Its Credo id is EX3009, and it is in the readability category. The default configuration enables it.
- Code
Credo.Check.Readability.ModuleDoc
Its Credo id is EX3010, and it is in the readability category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Readability.ModuleNames
Its Credo id is EX3011, and it is in the readability category. The default configuration does not enable it. Its base priority is low.
- Code
Credo.Check.Readability.MultiAlias
Its Credo id is EX3012, and it is in the readability category. The default configuration does not enable it.
- Code
Credo.Check.Readability.NestedFunctionCalls
Its Credo id is EX3034, and it is in the readability category. The default configuration does not enable it. Its base priority is low.
- Code
Credo.Check.Readability.OneArityFunctionInPipe
Each function in the pipe should be in it's own line. Its Credo id is EX3035, and it is in the readability category. The default configuration does not enable it.
- Code
Credo.Check.Readability.OnePipePerLine
Its Credo id is EX3013, and it is in the readability category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Readability.ParenthesesInCondition
Its Credo id is EX3014, and it is in the readability category. The default configuration enables it. Its base priority is low.
- Code
Credo.Check.Readability.ParenthesesOnZeroArityDefs
Its Credo id is EX3015, and it is in the readability category. The default configuration enables it. Its base priority is low.
- Code
Credo.Check.Readability.PipeIntoAnonymousFunctions
Its Credo id is EX3016, and it is in the readability category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Readability.PredicateFunctionNames
Its Credo id is EX3017, and it is in the readability category. The default configuration enables it. Its base priority is low.
- Code
Credo.Check.Readability.PreferImplicitTry
This is helpful because a quoted atom can be easily mistaken for a string. Its Credo id is EX3018, and it is in the readability category. Its base priority is high.
- Code
Credo.Check.Readability.PreferUnquotedAtoms
Its Credo id is EX3019, and it is in the readability category. The default configuration enables it. Its base priority is low.
- Code
Credo.Check.Readability.RedundantBlankLines
Statements and expressions should be separated by lines. Its Credo id is EX3020, and it is in the readability category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Readability.Semicolons
Likewise, all instances of require should be consecutive within a file. Its Credo id is EX3021, and it is in the readability category. The default configuration does not enable it. Its base priority is low.
- Code
Credo.Check.Readability.SeparateAliasRequire
Its Credo id is EX3022, and it is in the readability category. The default configuration does not enable it.
- Code
Credo.Check.Readability.SingleFunctionToBlockPipe
Its Credo id is EX3023, and it is in the readability category. The default configuration does not enable it. Its base priority is high.
- Code
Credo.Check.Readability.SinglePipe
Its Credo id is EX3024, and it is in the readability category. The default configuration enables it.
- Code
Credo.Check.Readability.SpaceAfterCommas
Its Credo id is EX3037, and it is in the readability category. The default configuration enables it. Its base priority is low.
- Code
Credo.Check.Readability.SpecParameterNames
Its Credo id is EX3025, and it is in the readability category. The default configuration does not enable it.
- Code
Credo.Check.Readability.Specs
Its Credo id is EX3026, and it is in the readability category. The default configuration does not enable it. Its base priority is low.
- Code
Credo.Check.Readability.StrictModuleLayout
Its Credo id is EX3028, and it is in the readability category. The default configuration enables it. Its base priority is low.
- Code
Credo.Check.Readability.TrailingBlankLine
Its Credo id is EX3029, and it is in the readability category. The default configuration enables it. Its base priority is low.
- Code
Credo.Check.Readability.TrailingWhiteSpace
Its Credo id is EX3030, and it is in the readability category. The default configuration enables it. Its base priority is low.
- Code
Credo.Check.Readability.UnnecessaryAliasExpansion
Its Credo id is EX5032, and it is in the readability category. The default configuration does not enable it. Its base priority is normal.
- Code
Credo.Check.Readability.UnusedFunctionParameterPattern
Its Credo id is EX3031, and it is in the readability category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Readability.VariableNames
Its Credo id is EX3032, and it is in the readability category. The default configuration does not enable it. Its base priority is low.
- Code
Credo.Check.Readability.WithCustomTaggedTuple
Its Credo id is EX4001, and it is in the refactor category. The default configuration does not enable it.
- Code
Credo.Check.Refactor.ABCSize
Therefore: It is sometimes best to prepend to the list during iteration and call Enum.reverse/1 at the end, as it is quite fast. Its Credo id is EX4002, and it is in the refactor category. The default configuration does not enable it. Its base priority is low.
- Code
Credo.Check.Refactor.AppendSingleItem
Its Credo id is EX4003, and it is in the refactor category. The default configuration enables it. Its base priority is low.
- Code
Credo.Check.Refactor.Apply
Its Credo id is EX4004, and it is in the refactor category.
- Code
Credo.Check.Refactor.CaseTrivialMatches
Its Credo id is EX4033, and it is in the refactor category. The default configuration does not enable it. Its base priority is low.
- Code
Credo.Check.Refactor.CondInsteadOfIfElse
Its Credo id is EX4005, and it is in the refactor category. The default configuration enables it.
- Code
Credo.Check.Refactor.CondStatements
Its Credo id is EX4006, and it is in the refactor category. The default configuration enables it.
- Code
Credo.Check.Refactor.CyclomaticComplexity
Its Credo id is EX4007, and it is in the refactor category. The default configuration does not enable it. Its base priority is low.
- Code
Credo.Check.Refactor.DoubleBooleanNegation
Its Credo id is EX4030, and it is in the refactor category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Refactor.FilterCount
Its Credo id is EX4008, and it is in the refactor category. The default configuration enables it.
- Code
Credo.Check.Refactor.FilterFilter
Its Credo id is EX4009, and it is in the refactor category. The default configuration does not enable it.
- Code
Credo.Check.Refactor.FilterReject
Its Credo id is EX4010, and it is in the refactor category. The default configuration enables it.
- Code
Credo.Check.Refactor.FunctionArity
Its Credo id is EX4011, and it is in the refactor category. The default configuration does not enable it.
- Code
Credo.Check.Refactor.IoPuts
Its Credo id is EX4012, and it is in the refactor category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Refactor.LongQuoteBlocks
Its Credo id is EX4013, and it is in the refactor category. The default configuration does not enable it. Its base priority is high.
- Code
Credo.Check.Refactor.MapInto
Its Credo id is EX4014, and it is in the refactor category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Refactor.MapJoin
Its Credo id is EX4015, and it is in the refactor category. The default configuration does not enable it.
- Code
Credo.Check.Refactor.MapMap
Its Credo id is EX4016, and it is in the refactor category. The default configuration enables it.
- Code
Credo.Check.Refactor.MatchInCondition
Consider limiting the number of module dependencies. Its Credo id is EX4017, and it is in the refactor category. The default configuration does not enable it. Its base priority is normal.
- Code
Credo.Check.Refactor.ModuleDependencies
Its Credo id is EX4018, and it is in the refactor category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Refactor.NegatedConditionsInUnless
Its Credo id is EX4019, and it is in the refactor category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Refactor.NegatedConditionsWithElse
Its Credo id is EX4020, and it is in the refactor category. The default configuration does not enable it. Its base priority is low.
- Code
Credo.Check.Refactor.NegatedIsNil
Its Credo id is EX4021, and it is in the refactor category. The default configuration enables it.
- Code
Credo.Check.Refactor.Nesting
This should always be done when possible. Its Credo id is EX4031, and it is in the refactor category. The default configuration does not enable it. Its base priority is normal.
- Code
Credo.Check.Refactor.PassAsyncInTestCases
Its Credo id is EX4022, and it is in the refactor category.
- Code
Credo.Check.Refactor.PerceivedComplexity
Its Credo id is EX4023, and it is in the refactor category. The default configuration does not enable it.
- Code
Credo.Check.Refactor.PipeChainStart
Its Credo id is EX4034, and it is in the refactor category. The default configuration does not enable it. Its base priority is low.
- Code
Credo.Check.Refactor.PreferDateTimeShift
Its Credo id is EX4025, and it is in the refactor category. The default configuration does not enable it.
- Code
Credo.Check.Refactor.RejectFilter
Its Credo id is EX4026, and it is in the refactor category. The default configuration enables it.
- Code
Credo.Check.Refactor.RejectReject
Its Credo id is EX4027, and it is in the refactor category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Refactor.UnlessWithElse
Its Credo id is EX4032, and it is in the refactor category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Refactor.UtcNowTruncate
Its Credo id is EX4028, and it is in the refactor category. The default configuration does not enable it.
- Code
Credo.Check.Refactor.VariableRebinding
As a result, certain configuration read calls made in your module attributes may work as expected during local development, but may break once in a deployed context. Its Credo id is EX5001, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.ApplicationConfigInModuleAttribute
Its Credo id is EX5002, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.BoolOperationOnSameValues
Its Credo id is EX5026, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.Dbg
Its Credo id is EX5003, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.ExpensiveEmptyEnumCheck
Its Credo id is EX5033, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.ForbiddenFunction
Its Credo id is EX5004, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.ForbiddenModule
Its Credo id is EX5005, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.IExPry
Its Credo id is EX5006, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.IoInspect
Its Credo id is EX5007, and it is in the warning category. The default configuration does not enable it. Its base priority is high.
- Code
Credo.Check.Warning.LazyLogging
This includes sensitive configuration parameters, such as credentials. To minimize the risk of such values leaking, clear or overwrite them when spawning executables. Its Credo id is EX5008, and it is in the warning category. The default configuration does not enable it. Its base priority is high.
- Code
Credo.Check.Warning.LeakyEnvironment
This happens when the next function in the pipe cannot handle nil values correctly. Its Credo id is EX5009, and it is in the warning category. The default configuration does not enable it. Its base priority is normal.
- Code
Credo.Check.Warning.MapGetUnsafePass
Its Credo id is EX5027, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.MissedMetadataKeyInLoggerConfig
Therefore, it is recommended to access Mix.env only in configuration files and inside mix.exs, never in your application code (lib). Its Credo id is EX5010, and it is in the warning category. The default configuration does not enable it. Its base priority is high.
- Code
Credo.Check.Warning.MixEnv
Its Credo id is EX5011, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.OperationOnSameValues
Its Credo id is EX5012, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.OperationWithConstantResult
Its Credo id is EX5013, and it is in the warning category. The default configuration enables it.
- Code
Credo.Check.Warning.RaiseInsideRescue
Using a struct in a spec will cause the module to be recompiled whenever the struct's module changes. Its Credo id is EX5014, and it is in the warning category. The default configuration enables it. Its base priority is normal.
- Code
Credo.Check.Warning.SpecWithStruct
Its Credo id is EX5029, and it is in the warning category. The default configuration enables it. Its base priority is normal.
- Code
Credo.Check.Warning.StructFieldAmount
Its Credo id is EX5015, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.UnsafeExec
Its Credo id is EX5016, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.UnsafeToAtom
Its Credo id is EX5017, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.UnusedEnumOperation
Its Credo id is EX5018, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.UnusedFileOperation
Its Credo id is EX5019, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.UnusedKeywordOperation
Its Credo id is EX5020, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.UnusedListOperation
Its Credo id is EX5028, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.UnusedMapOperation
Its Credo id is EX5031, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.UnusedOperation
Its Credo id is EX5021, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.UnusedPathOperation
Its Credo id is EX5022, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.UnusedRegexOperation
Its Credo id is EX5023, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.UnusedStringOperation
Its Credo id is EX5024, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.UnusedTupleOperation
Its Credo id is EX5025, and it is in the warning category. Its base priority is high.
- Code
Credo.Check.Warning.WrongTestFileExtension
Its Credo id is EX5030, and it is in the warning category. The default configuration enables it. Its base priority is high.
- Code
Credo.Check.Warning.WrongTestFilename