Skip to content

(maint) Fix Rubocop #203

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

Merged
merged 5 commits into from
Jun 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 69 additions & 67 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
inherit_from: .rubocop_todo.yml

AllCops:
Exclude:
# Ignore HTML related things
Expand All @@ -12,7 +14,7 @@ Bundler/OrderedGems:
Bundler/DuplicatedGem:
Enabled: false

Lint/ConditionPosition:
Layout/ConditionPosition:
Enabled: true

Lint/ElseLayout:
Expand All @@ -32,10 +34,6 @@ Lint/EnsureReturn:
Lint/HandleExceptions:
Enabled: false

# MAYBE useful - catches while 1
Lint/LiteralInCondition:
Enabled: false

# MAYBE useful - but too many instances
Lint/ShadowingOuterLocalVariable:
Enabled: false
Expand All @@ -56,7 +54,7 @@ Lint/AssignmentInCondition:
Enabled: true

# DISABLED - not useful
Style/SpaceBeforeComment:
Layout/SpaceBeforeComment:
Enabled: false

# DISABLED - not useful
Expand Down Expand Up @@ -92,15 +90,15 @@ Lint/AmbiguousRegexpLiteral:
Enabled: false

# DISABLED
Lint/BlockAlignment:
Layout/BlockAlignment:
Enabled: false

# DISABLED
Lint/DefEndAlignment:
Layout/DefEndAlignment:
Enabled: false

# DISABLED
Lint/EndAlignment:
Layout/EndAlignment:
Enabled: false

# DISABLED
Expand Down Expand Up @@ -130,28 +128,25 @@ Lint/UnusedMethodArgument:
Lint/UselessAccessModifier:
Enabled: true

Lint/UselessAssignment:
Enabled: true

Lint/Void:
Enabled: true

Style/AccessModifierIndentation:
Layout/AccessModifierIndentation:
Enabled: false

Style/AccessorMethodName:
Naming/AccessorMethodName:
Enabled: false

Style/Alias:
Enabled: false

Style/AlignArray:
Layout/AlignArray:
Enabled: false

Style/AlignHash:
Layout/AlignHash:
Enabled: false

Style/AlignParameters:
Layout/AlignParameters:
Enabled: false

Metrics/BlockNesting:
Expand All @@ -169,13 +164,13 @@ Style/BracesAroundHashParameters:
Style/CaseEquality:
Enabled: false

Style/CaseIndentation:
Layout/CaseIndentation:
Enabled: false

Style/CharacterLiteral:
Enabled: false

Style/ClassAndModuleCamelCase:
Naming/ClassAndModuleCamelCase:
Enabled: false

Style/ClassAndModuleChildren:
Expand Down Expand Up @@ -203,67 +198,64 @@ Style/WordArray:
Style/UnneededPercentQ:
Enabled: false

Style/Tab:
Layout/Tab:
Enabled: false

Style/SpaceBeforeSemicolon:
Layout/SpaceBeforeSemicolon:
Enabled: false

Style/TrailingBlankLines:
Layout/TrailingBlankLines:
Enabled: false

Style/SpaceInsideBlockBraces:
Layout/SpaceInsideBlockBraces:
Enabled: false

Style/SpaceInsideBrackets:
Layout/SpaceInsideHashLiteralBraces:
Enabled: false

Style/SpaceInsideHashLiteralBraces:
Layout/SpaceInsideParens:
Enabled: false

Style/SpaceInsideParens:
Layout/LeadingCommentSpace:
Enabled: false

Style/LeadingCommentSpace:
Layout/SpaceBeforeFirstArg:
Enabled: false

Style/SpaceBeforeFirstArg:
Layout/SpaceAfterColon:
Enabled: false

Style/SpaceAfterColon:
Layout/SpaceAfterComma:
Enabled: false

Style/SpaceAfterComma:
Layout/SpaceAroundKeyword:
Enabled: false

Style/SpaceAroundKeyword:
Layout/SpaceAfterMethodName:
Enabled: false

Style/SpaceAfterMethodName:
Layout/SpaceAfterNot:
Enabled: false

Style/SpaceAfterNot:
Layout/SpaceAfterSemicolon:
Enabled: false

Style/SpaceAfterSemicolon:
Layout/SpaceAroundEqualsInParameterDefault:
Enabled: false

Style/SpaceAroundEqualsInParameterDefault:
Layout/SpaceAroundOperators:
Enabled: false

Style/SpaceAroundOperators:
Layout/SpaceBeforeBlockBraces:
Enabled: false

Style/SpaceBeforeBlockBraces:
Enabled: false

Style/SpaceBeforeComma:
Layout/SpaceBeforeComma:
Enabled: false

Style/CollectionMethods:
Enabled: false

Style/CommentIndentation:
Layout/CommentIndentation:
Enabled: false

Style/ColonMethodCall:
Expand All @@ -275,7 +267,7 @@ Style/CommentAnnotation:
Metrics/CyclomaticComplexity:
Enabled: false

Style/ConstantName:
Naming/ConstantName:
Enabled: false

Style/Documentation:
Expand All @@ -284,7 +276,7 @@ Style/Documentation:
Style/DefWithParentheses:
Enabled: false

Style/DotPosition:
Layout/DotPosition:
Enabled: false

# DISABLED - used for converting to bool
Expand All @@ -294,25 +286,25 @@ Style/DoubleNegation:
Style/EachWithObject:
Enabled: false

Style/EmptyLineBetweenDefs:
Layout/EmptyLineBetweenDefs:
Enabled: false

Style/IndentArray:
Layout/IndentArray:
Enabled: false

Style/IndentHash:
Layout/IndentHash:
Enabled: false

Style/IndentationConsistency:
Layout/IndentationConsistency:
Enabled: true

Style/IndentationWidth:
Layout/IndentationWidth:
Enabled: true

Style/EmptyLines:
Layout/EmptyLines:
Enabled: false

Style/EmptyLinesAroundAccessModifier:
Layout/EmptyLinesAroundAccessModifier:
Enabled: false

Style/EmptyLiteral:
Expand All @@ -330,13 +322,16 @@ Style/MethodDefParentheses:
Style/LineEndConcatenation:
Enabled: false

Style/TrailingWhitespace:
Layout/TrailingWhitespace:
Enabled: false

Style/StringLiterals:
Enabled: false

Style/TrailingCommaInLiteral:
Style/TrailingCommaInArrayLiteral:
Enabled: false

Style/TrailingCommaInHashLiteral:
Enabled: false

Style/TrailingCommaInArguments:
Expand Down Expand Up @@ -381,7 +376,7 @@ Style/UnlessElse:
Style/VariableInterpolation:
Enabled: false

Style/VariableName:
Naming/VariableName:
Enabled: false

Style/WhileUntilDo:
Expand All @@ -390,7 +385,7 @@ Style/WhileUntilDo:
Style/EvenOdd:
Enabled: false

Style/FileName:
Naming/FileName:
Enabled: false

Style/For:
Expand All @@ -399,7 +394,7 @@ Style/For:
Style/Lambda:
Enabled: false

Style/MethodName:
Naming/MethodName:
Enabled: false

Style/MultilineTernaryOperator:
Expand Down Expand Up @@ -435,7 +430,7 @@ Style/NumericLiterals:
Style/OneLineConditional:
Enabled: false

Style/OpMethod:
Naming/BinaryOperatorParameterName:
Enabled: false

Style/ParenthesesAroundCondition:
Expand All @@ -447,7 +442,7 @@ Style/PercentLiteralDelimiters:
Style/PerlBackrefs:
Enabled: false

Style/PredicateName:
Naming/PredicateName:
Enabled: false

Style/RedundantException:
Expand Down Expand Up @@ -492,22 +487,22 @@ Style/IfWithSemicolon:
Style/Encoding:
Enabled: false

Style/MultilineOperationIndentation:
Layout/MultilineOperationIndentation:
Enabled: false

Style/BlockDelimiters:
Enabled: false

Style/ExtraSpacing:
Layout/ExtraSpacing:
Enabled: false

Style/MultilineHashBraceLayout:
Layout/MultilineHashBraceLayout:
Enabled: false

Style/MultilineMethodCallBraceLayout:
Layout/MultilineMethodCallBraceLayout:
Enabled: false

Style/MultilineBlockLayout:
Layout/MultilineBlockLayout:
Enabled: false

Lint/UselessAssignment:
Expand All @@ -516,16 +511,16 @@ Lint/UselessAssignment:
Lint/DuplicateMethods:
Enabled: false

Style/EmptyLinesAroundMethodBody:
Layout/EmptyLinesAroundMethodBody:
Enabled: false

Style/EmptyLinesAroundModuleBody:
Layout/EmptyLinesAroundModuleBody:
Enabled: false

Style/EmptyLinesAroundBlockBody:
Layout/EmptyLinesAroundBlockBody:
Enabled: false

Style/EmptyLinesAroundClassBody:
Layout/EmptyLinesAroundClassBody:
Enabled: false

Style/UnneededInterpolation:
Expand Down Expand Up @@ -570,5 +565,12 @@ Metrics/PerceivedComplexity:
Metrics/BlockLength:
Enabled: false

Style/VariableNumber:
Naming/VariableNumber:
Enabled: false

# Enforce LF line endings, even when on Windows
Layout/EndOfLine:
EnforcedStyle: lf

Layout/IndentHeredoc: # Not appicable on Ruby 2.1
Enabled: false
Loading