Skip to content

Commit

Permalink
Merge pull request #575 from wyardley/auto_fixes
Browse files Browse the repository at this point in the history
BREAKING: Drop Ruby 1.8 support. Rubocop auto-fixes in preparation for modulesync
  • Loading branch information
alexjfisher authored Aug 30, 2017
2 parents d390313 + 542918b commit 233b02b
Show file tree
Hide file tree
Showing 56 changed files with 1,966 additions and 1,981 deletions.
108 changes: 66 additions & 42 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ AllCops:
Include:
- ./**/*.rb
Exclude:
- files/**/*
- vendor/**/*
- .vendor/**/*
- pkg/**/*
- spec/fixtures/**/*
- Gemfile
- Rakefile
- Guardfile
Lint/ConditionPosition:
Enabled: True

Expand Down Expand Up @@ -47,7 +51,7 @@ Lint/AmbiguousOperator:
Lint/AssignmentInCondition:
Enabled: True

Style/SpaceBeforeComment:
Layout/SpaceBeforeComment:
Enabled: True

Style/AndOr:
Expand All @@ -56,6 +60,9 @@ Style/AndOr:
Style/RedundantSelf:
Enabled: True

Metrics/BlockLength:
Enabled: False

# Method length is not necessarily an indicator of code quality
Metrics/MethodLength:
Enabled: False
Expand All @@ -70,7 +77,7 @@ Style/WhileUntilModifier:
Lint/AmbiguousRegexpLiteral:
Enabled: True

Lint/Eval:
Security/Eval:
Enabled: True

Lint/BlockAlignment:
Expand Down Expand Up @@ -112,7 +119,7 @@ Lint/UselessAssignment:
Lint/Void:
Enabled: True

Style/AccessModifierIndentation:
Layout/AccessModifierIndentation:
Enabled: True

Style/AccessorMethodName:
Expand All @@ -121,13 +128,13 @@ Style/AccessorMethodName:
Style/Alias:
Enabled: True

Style/AlignArray:
Layout/AlignArray:
Enabled: True

Style/AlignHash:
Layout/AlignHash:
Enabled: True

Style/AlignParameters:
Layout/AlignParameters:
Enabled: True

Metrics/BlockNesting:
Expand All @@ -145,7 +152,7 @@ Style/BracesAroundHashParameters:
Style/CaseEquality:
Enabled: True

Style/CaseIndentation:
Layout/CaseIndentation:
Enabled: True

Style/CharacterLiteral:
Expand Down Expand Up @@ -179,64 +186,64 @@ Style/WordArray:
Style/UnneededPercentQ:
Enabled: True

Style/Tab:
Layout/Tab:
Enabled: True

Style/SpaceBeforeSemicolon:
Layout/SpaceBeforeSemicolon:
Enabled: True

Style/TrailingBlankLines:
Layout/TrailingBlankLines:
Enabled: True

Style/SpaceInsideBlockBraces:
Layout/SpaceInsideBlockBraces:
Enabled: True

Style/SpaceInsideBrackets:
Layout/SpaceInsideBrackets:
Enabled: True

Style/SpaceInsideHashLiteralBraces:
Layout/SpaceInsideHashLiteralBraces:
Enabled: True

Style/SpaceInsideParens:
Layout/SpaceInsideParens:
Enabled: True

Style/LeadingCommentSpace:
Layout/LeadingCommentSpace:
Enabled: True

Style/SpaceBeforeFirstArg:
Layout/SpaceBeforeFirstArg:
Enabled: True

Style/SpaceAfterColon:
Layout/SpaceAfterColon:
Enabled: True

Style/SpaceAfterComma:
Layout/SpaceAfterComma:
Enabled: True

Style/SpaceAfterMethodName:
Layout/SpaceAfterMethodName:
Enabled: True

Style/SpaceAfterNot:
Layout/SpaceAfterNot:
Enabled: True

Style/SpaceAfterSemicolon:
Layout/SpaceAfterSemicolon:
Enabled: True

Style/SpaceAroundEqualsInParameterDefault:
Layout/SpaceAroundEqualsInParameterDefault:
Enabled: True

Style/SpaceAroundOperators:
Layout/SpaceAroundOperators:
Enabled: True

Style/SpaceBeforeBlockBraces:
Layout/SpaceBeforeBlockBraces:
Enabled: True

Style/SpaceBeforeComma:
Layout/SpaceBeforeComma:
Enabled: True

Style/CollectionMethods:
Enabled: True

Style/CommentIndentation:
Layout/CommentIndentation:
Enabled: True

Style/ColonMethodCall:
Expand All @@ -261,7 +268,7 @@ Style/DefWithParentheses:
Style/PreferredHashMethods:
Enabled: True

Style/DotPosition:
Layout/DotPosition:
EnforcedStyle: trailing

Style/DoubleNegation:
Expand All @@ -270,25 +277,25 @@ Style/DoubleNegation:
Style/EachWithObject:
Enabled: True

Style/EmptyLineBetweenDefs:
Layout/EmptyLineBetweenDefs:
Enabled: True

Style/IndentArray:
Layout/IndentArray:
Enabled: True

Style/IndentHash:
Layout/IndentHash:
Enabled: True

Style/IndentationConsistency:
Layout/IndentationConsistency:
Enabled: True

Style/IndentationWidth:
Layout/IndentationWidth:
Enabled: True

Style/EmptyLines:
Layout/EmptyLines:
Enabled: True

Style/EmptyLinesAroundAccessModifier:
Layout/EmptyLinesAroundAccessModifier:
Enabled: True

Style/EmptyLiteral:
Expand All @@ -298,7 +305,7 @@ Style/EmptyLiteral:
Metrics/LineLength:
Enabled: False

Style/MethodCallParentheses:
Style/MethodCallWithoutArgsParentheses:
Enabled: True

Style/MethodDefParentheses:
Expand All @@ -307,7 +314,7 @@ Style/MethodDefParentheses:
Style/LineEndConcatenation:
Enabled: True

Style/TrailingWhitespace:
Layout/TrailingWhitespace:
Enabled: True

Style/StringLiterals:
Expand Down Expand Up @@ -459,9 +466,6 @@ Metrics/ParameterLists:
Lint/RequireParentheses:
Enabled: True

Style/SpaceBeforeFirstArg:
Enabled: True

Style/ModuleFunction:
Enabled: True

Expand All @@ -477,7 +481,7 @@ Style/Encoding:
Style/BlockDelimiters:
Enabled: True

Style/MultilineBlockLayout:
Layout/MultilineBlockLayout:
Enabled: True

# 'Complexity' is very relative
Expand All @@ -491,11 +495,15 @@ Metrics/PerceivedComplexity:
Lint/UselessAssignment:
Enabled: True

Style/ClosingParenthesisIndentation:
Enabled: False
Layout/ClosingParenthesisIndentation:
Enabled: True

# RSpec

RSpec/BeforeAfterAll:
Exclude:
- spec/acceptance/**/*

# We don't use rspec in this way
RSpec/DescribeClass:
Enabled: False
Expand All @@ -506,3 +514,19 @@ RSpec/ExampleLength:

RSpec/NamedSubject:
Enabled: False

# disabled for now since they cause a lot of issues
# these issues aren't easy to fix
RSpec/RepeatedDescription:
Enabled: False

RSpec/NestedGroups:
Enabled: False

# this is broken on ruby1.9
Layout/IndentHeredoc:
Enabled: False

# disable Yaml safe_load. This is needed to support ruby2.0.0 development envs
Security/YAMLLoad:
Enabled: false
Loading

0 comments on commit 233b02b

Please sign in to comment.