shard-ameba/config/ameba.yml
Hugo Abonizio b023ae0baa Disallows while true (#22)
* Disallows `while true`

* Add syntax highlighting in documentation

* Replace `while true` occurrencies

* Add WhileTrue rule to config sample
2017-11-27 15:35:15 +02:00

94 lines
No EOL
2.1 KiB
YAML

ComparisonToBoolean:
# Disallows comparison to booleans in conditions.
Enabled: false
ConstantNames:
# Enforces constant names to be in a screaming case.
Enabled: true
DebuggerStatement:
# Disallows calls to debugger.
Enabled: true
DuplicatedWhen:
# Disallows duplicated when conditions in case.
Enabled: true
EmptyEnsure:
# Disallows empty ensure statement.
Enabled: true
EmptyExpression:
# Disallows empty expressions.
Enabled: true
HashDuplicatedKey:
# Disallows duplicated keys in hash literals.
Enabled: true
LargeNumbers:
# A rule that disallows usage of large numbers without underscore.
Enabled: true
IntMinDigits: 5 # i.e. integers higher than 9999
LineLength:
# Disallows lines longer that MaxLength number of symbols.
Enabled: false
MaxLength: 80
LiteralInCondition:
# Disallows useless conditional statements that contain a literal in place
# of a variable or predicate function.
Enabled: true
LiteralInInterpolation:
# Disallows useless string interpolations that contain a literal value
# instead of a variable or function.
Enabled: true
MethodNames:
# Enforces method names to be in the underscored case.
Enabled: true
NegatedConditionsInUnless:
# Disallows negated conditions in unless.
Enabled: true
PercentArrays:
# Disallows unwanted symbols in percent array literals.
Enabled: true
StringArrayUnwantedSymbols: ',"'
SymbolArrayUnwantedSymbols: ',:'
PredicateName:
# Disallows tautological predicate names, meaning those that start with
# the prefix `has_` or the prefix `is_`.
Enabled: true
RedundantBegin:
# Disallows redundant begin blocks.
Enabled: true
TrailingBlankLines:
# Disallows trailing blank lines at the end of the source file.
Enabled: true
TrailingWhitespace:
# Disallows trailing whitespaces.
Enabled: true
TypeNames:
# Enforces type names in a camelcase manner.
Enabled: true
UnlessElse:
# Disallows the use of an `else` block with `unless`.
Enabled: true
VariableNames:
# Enforces variable names to be in the underscored case.
Enabled: true
WhileTrue:
# Disallows `while` statements with a `true` literal as condition
Enabled: true