Update rubocop and add basic checks
This commit is contained in:
parent
9f03531708
commit
f4a22851a1
3 changed files with 465 additions and 4 deletions
47
.rubocop.yml
Normal file
47
.rubocop.yml
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
inherit_from: .rubocop_todo.yml
|
||||||
|
|
||||||
|
Style/HashSyntax:
|
||||||
|
EnforcedStyle: ruby19
|
||||||
|
|
||||||
|
# Things deprecated in current ruby API
|
||||||
|
Lint/DeprecatedClassMethods:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
# Do not compare with nil. Use .nil? instead
|
||||||
|
Style/NilComparison:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Style/EmptyLineBetweenDefs:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/EmptyLines:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Style/EmptyLinesAroundAccessModifier:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 21
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/EmptyLinesAroundBody:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/EmptyLiteral:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Configuration parameters: Exclude.
|
||||||
|
Style/FileName:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
AllCops:
|
||||||
|
Include:
|
||||||
|
- Rakefile
|
||||||
|
- config.ru
|
||||||
|
Exclude:
|
||||||
|
- db/schema.rb
|
||||||
|
- features/**/*
|
||||||
414
.rubocop_todo.yml
Normal file
414
.rubocop_todo.yml
Normal file
|
|
@ -0,0 +1,414 @@
|
||||||
|
# This configuration was generated by `rubocop --auto-gen-config`
|
||||||
|
# on 2014-07-21 12:48:09 +0200 using RuboCop version 0.24.1.
|
||||||
|
# The point is for the user to remove these configuration records
|
||||||
|
# one by one as the offenses are removed from the code base.
|
||||||
|
# Note that changes in the inspected code, or installation of new
|
||||||
|
# versions of RuboCop, may require this file to be generated again.
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Configuration parameters: AllowSafeAssignment.
|
||||||
|
Lint/AssignmentInCondition:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
Lint/BlockAlignment:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Lint/LiteralInCondition:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
Lint/Loop:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
Lint/ParenthesesAsGroupedExpression:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 13
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Lint/RescueException:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Lint/ShadowingOuterLocalVariable:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 5
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Lint/UnusedBlockArgument:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Lint/UnusedMethodArgument:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 6
|
||||||
|
Lint/UselessAssignment:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Lint/Void:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 17
|
||||||
|
Style/AccessorMethodName:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 10
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
|
||||||
|
Style/AlignHash:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/AlignParameters:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/AndOr:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Style/BlockNesting:
|
||||||
|
Max: 4
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/Blocks:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/BracesAroundHashParameters:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Style/CaseEquality:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 20
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/ClassAndModuleChildren:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/ClassCheck:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 8
|
||||||
|
# Configuration parameters: CountComments.
|
||||||
|
Style/ClassLength:
|
||||||
|
Max: 524
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Style/ClassVars:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: PreferredMethods.
|
||||||
|
Style/CollectionMethods:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/ColonMethodCall:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Configuration parameters: Keywords.
|
||||||
|
Style/CommentAnnotation:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/CommentIndentation:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 10
|
||||||
|
Style/CyclomaticComplexity:
|
||||||
|
Max: 16
|
||||||
|
|
||||||
|
# Offense count: 5
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/DeprecatedHashMethods:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 228
|
||||||
|
Style/Documentation:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 150
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/DotPosition:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 9
|
||||||
|
Style/DoubleNegation:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowAdjacentOneLineDefs.
|
||||||
|
Style/EmptyLineBetweenDefs:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/EmptyLines:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Style/EmptyLinesAroundAccessModifier:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 21
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/EmptyLinesAroundBody:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/EmptyLiteral:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Configuration parameters: Exclude.
|
||||||
|
Style/FileName:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/For:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 8
|
||||||
|
# Configuration parameters: MinBodyLength.
|
||||||
|
Style/GuardClause:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 214
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/HashSyntax:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 27
|
||||||
|
# Configuration parameters: MaxLineLength.
|
||||||
|
Style/IfUnlessModifier:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/IndentArray:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 8
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/IndentHash:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/IndentationConsistency:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 5
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/IndentationWidth:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 7
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/LeadingCommentSpace:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 5
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/LineEndConcatenation:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 515
|
||||||
|
# Configuration parameters: AllowURI.
|
||||||
|
Style/LineLength:
|
||||||
|
Max: 217
|
||||||
|
|
||||||
|
# Offense count: 5
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/MethodDefParentheses:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 68
|
||||||
|
# Configuration parameters: CountComments.
|
||||||
|
Style/MethodLength:
|
||||||
|
Max: 134
|
||||||
|
|
||||||
|
# Offense count: 14
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/NegatedIf:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 18
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/Next:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/NumericLiterals:
|
||||||
|
MinDigits: 15
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowSafeAssignment.
|
||||||
|
Style/ParenthesesAroundCondition:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 11
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: PreferredDelimiters.
|
||||||
|
Style/PercentLiteralDelimiters:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Configuration parameters: NamePrefixBlacklist.
|
||||||
|
Style/PredicateName:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Configuration parameters: SupportedStyles.
|
||||||
|
Style/RaiseArgs:
|
||||||
|
EnforcedStyle: compact
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/RedundantBegin:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowMultipleReturnValues.
|
||||||
|
Style/RedundantReturn:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 8
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/RedundantSelf:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 10
|
||||||
|
# Configuration parameters: MaxSlashes.
|
||||||
|
Style/RegexpLiteral:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Style/SelfAssignment:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/SignalException:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Configuration parameters: Methods.
|
||||||
|
Style/SingleLineBlockParams:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowIfMethodIsEmpty.
|
||||||
|
Style/SingleLineMethods:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 285
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/SingleSpaceBeforeFirstArg:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/SpaceAfterComma:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/SpaceAroundEqualsInParameterDefault:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 5
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/SpaceAroundOperators:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/SpaceBeforeBlockBraces:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/SpaceBeforeSemicolon:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 6
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
||||||
|
Style/SpaceInsideBlockBraces:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/SpaceInsideBrackets:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 6
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
|
||||||
|
Style/SpaceInsideHashLiteralBraces:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 577
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/StringLiterals:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Style/Tab:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/TrailingBlankLines:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 24
|
||||||
|
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
|
||||||
|
Style/TrailingComma:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 38
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/TrailingWhitespace:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 8
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/WordArray:
|
||||||
|
MinSize: 5
|
||||||
|
|
@ -221,7 +221,7 @@ GEM
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
cocaine (~> 0.5.3)
|
cocaine (~> 0.5.3)
|
||||||
mime-types
|
mime-types
|
||||||
parser (2.1.9)
|
parser (2.2.0.pre.3)
|
||||||
ast (>= 1.1, < 3.0)
|
ast (>= 1.1, < 3.0)
|
||||||
slop (~> 3.4, >= 3.4.5)
|
slop (~> 3.4, >= 3.4.5)
|
||||||
pdf-core (0.2.5)
|
pdf-core (0.2.5)
|
||||||
|
|
@ -310,9 +310,9 @@ GEM
|
||||||
rspec-mocks (~> 3.0.0)
|
rspec-mocks (~> 3.0.0)
|
||||||
rspec-support (~> 3.0.0)
|
rspec-support (~> 3.0.0)
|
||||||
rspec-support (3.0.2)
|
rspec-support (3.0.2)
|
||||||
rubocop (0.22.0)
|
rubocop (0.24.1)
|
||||||
json (>= 1.7.7, < 2)
|
json (>= 1.7.7, < 2)
|
||||||
parser (~> 2.1.9)
|
parser (>= 2.2.0.pre.3, < 3.0)
|
||||||
powerpack (~> 0.0.6)
|
powerpack (~> 0.0.6)
|
||||||
rainbow (>= 1.99.1, < 3.0)
|
rainbow (>= 1.99.1, < 3.0)
|
||||||
ruby-progressbar (~> 1.4)
|
ruby-progressbar (~> 1.4)
|
||||||
|
|
@ -336,7 +336,7 @@ GEM
|
||||||
multi_json
|
multi_json
|
||||||
simplecov-html (~> 0.8.0)
|
simplecov-html (~> 0.8.0)
|
||||||
simplecov-html (0.8.0)
|
simplecov-html (0.8.0)
|
||||||
slop (3.5.0)
|
slop (3.6.0)
|
||||||
spring (1.1.2)
|
spring (1.1.2)
|
||||||
spring-commands-rspec (1.0.2)
|
spring-commands-rspec (1.0.2)
|
||||||
spring (>= 0.9.1)
|
spring (>= 0.9.1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue