.rubocop.yml
# These are all the cops that are enabled in the default configuration.
# Use UTF-8 as the source file encoding.
Encoding:
Enabled: false
# Limit lines to 80 characters.
LineLength:
Enabled: false
# Avoid methods longer than 10 lines of code
MethodLength:
Enabled: false
# No hard tabs.
Tab:
Enabled: true
# Avoid trailing whitespace.
TrailingWhitespace:
Enabled: false
# Indent when as deep as case.
CaseIndentation:
Enabled: false
# Use empty lines between defs.
EmptyLineBetweenDefs:
Enabled: true
# Don't use several empty lines in a row.
EmptyLines:
Enabled: false
# Use spaces around operators.
SpaceAroundOperators:
Enabled: false
# No spaces after ( or before ).
SpaceInsideParens:
Enabled: false
# No spaces after [ or before ].
SpaceInsideBrackets:
Enabled: false
# Use spaces after commas.
SpaceAfterComma:
Enabled: false
# Use spaces after semicolons.
SpaceAfterSemicolon:
Enabled: false
# Use spaces after colons.
SpaceAfterColon:
Enabled: false
# Use spaces after if/elsif/unless/while/until/case/when.
SpaceAfterControlKeyword:
Enabled: false
# Prefer symbols instead of strings as hash keys.
HashSyntax:
Enabled: false
# Use Unix-style line endings.
EndOfLine:
Enabled: true
# Add underscores to large numeric literals to improve their readability.
NumericLiterals:
Enabled: true
# Align the parameters of a method call if they span more than one line.
AlignParameters:
Enabled: false
# Use def with parentheses when there are arguments.
DefWithParentheses:
Enabled: false
# Omit the parentheses when the method doesn't accept any arguments.
DefWithoutParentheses:
Enabled: false
# Never use if x; .... Use the ternary operator instead.
IfWithSemicolon:
Enabled: true
# Never use then for multi-line if/unless.
MultilineIfThen:
Enabled: true
# Favor the ternary operator(?:) over if/then/else/end constructs.
OneLineConditional:
Enabled: true
# Avoid using {...} for multi-line blocks (multiline chaining is always ugly).
# Prefer {...} over do...end for single-line blocks.
Blocks:
Enabled: true
# Avoid parameter lists longer than three or four parameters.
ParameterLists:
Enabled: false
# Prefer ' strings when you don't need string interpolation or special symbols.
StringLiterals:
Enabled: false
# Avoid multi-line ?: (the ternary operator); use if/unless instead.
MultilineTernaryOperator:
Enabled: true
# Use one expression per branch in a ternary operator.
NestedTernaryOperator:
Enabled: true
# Never use unless with else. Rewrite these with the positive case first.
UnlessElse:
Enabled: true
# Use &&/|| instead of and/or.
AndOr:
Enabled: false
# Use when x then ... for one-line cases.
WhenThen:
Enabled: false
# Favor modifier if/unless usage when you have a single-line body.
IfUnlessModifier:
Enabled: true
# Favor modifier while/until usage when you have a single-line body.
WhileUntilModifier:
Enabled: false
# Favor unless over if for negative conditions (or control flow or).
FavorUnlessOverNegatedIf:
Enabled: true
# Favor until over while for negative conditions.
FavorUntilOverNegatedWhile:
Enabled: true
# Use spaces around the = operator when assigning default values in def params.
SpaceAroundEqualsInParameterDefault:
Enabled: false
# Don't use parentheses around the condition of an if/unless/while.
ParenthesesAroundCondition:
Enabled: true
# Use snake_case for symbols, methods and variables.
MethodAndVariableSnakeCase:
Enabled: false
# Use CamelCase for classes and modules.
ClassAndModuleCamelCase:
Enabled: true
# Preferred collection methods.
CollectionMethods:
Enabled: false
# Don't interpolate global, instance and class variables directly in strings.
VariableInterpolation:
Enabled: false
# Don't use semicolons to terminate expressions.
Semicolon:
Enabled: false
# Use sprintf instead of String#%.
FavorSprintf:
Enabled: false
# Use Array#join instead of Array#*.
FavorJoin:
Enabled: true
# Use alias_method instead of alias.
Alias:
Enabled: false
# Use ! instead of not.
Not:
Enabled: false
# Avoid using rescue in its modifier form.
RescueModifier:
Enabled: true
# Never use return in an ensure block.
EnsureReturn:
Enabled: true
# Don't suppress exception.
HandleExceptions:
Enabled: false
# Use only ascii symbols in identifiers.
AsciiIdentifiers:
Enabled: true
# Use only ascii symbols in comments.
AsciiComments:
Enabled: false
# Do not use block comments.
BlockComments:
Enabled: false
# Avoid rescuing the Exception class.
RescueException:
Enabled: false
# Prefer literals to Array.new/Hash.new/String.new.
EmptyLiteral:
Enabled: false
# When defining binary operators, name the argument other.
OpMethod:
Enabled: false
# Name reduce arguments |a, e| (accumulator, element)
ReduceArguments:
Enabled: false
# Use %r for regular expressions matching more than one '/' character.
FavorPercentR:
Enabled: false
# Use self when defining module/class methods.
ClassMethods:
Enabled: false
# this goes wrong when including modules with the same name, ie:
# class Foo
# include Bar::Foo
# Avoid single-line methods.
SingleLineMethods:
Enabled: true
# Use %w or %W for arrays of words.
WordArray:
Enabled: false
# Use spaces inside hash literal braces - or don't.
SpaceInsideHashLiteralBraces:
Enabled: false
# Avoid the use of line continuation (/).
LineContinuation:
Enabled: true
# Prefer attr_* methods to trivial readers/writers.
TrivialAccessors:
Enabled: false
# Comments should start with a space.
LeadingCommentSpace:
Enabled: false
# Do not use :: for method invocation.
ColonMethodCall:
Enabled: false
# Do not introduce global variables.
AvoidGlobalVars:
Enabled: false
# The use of eval represents a serious security risk.
Eval:
Enabled: true
# Symbol literals should use snake_case.
SymbolName:
Enabled: false
# Constants should use SCREAMING_SNAKE_CASE.
ConstantName:
Enabled: false
# Indent private/protected as deep as defs and keep blank lines around them.
AccessControl:
Enabled: false
# Use Kernel#loop with break rather than begin/end/until or begin/end/while for post-loop tests.
Loop:
Enabled: true