2015-04-05 08:49:25 +08:00
|
|
|
require:
|
|
|
|
- rubocop-rspec
|
|
|
|
# this odd relative path is so that rubocop works when run without "bundle
|
|
|
|
# exec", such as from most editors/IDEs.
|
|
|
|
- ./gems/rubocop-canvas/lib/rubocop_canvas
|
|
|
|
|
2017-01-04 08:52:49 +08:00
|
|
|
AllCops:
|
|
|
|
TargetRubyVersion: 2.3
|
|
|
|
|
2015-04-05 08:49:25 +08:00
|
|
|
# our style changes: disabling style rules we aren't interested in
|
|
|
|
Style/StringLiterals:
|
|
|
|
Enabled: false
|
|
|
|
Style/SignalException:
|
|
|
|
Enabled: false
|
|
|
|
Style/SpaceBeforeBlockBraces:
|
|
|
|
Enabled: false
|
|
|
|
Style/SpaceInsideBlockBraces:
|
|
|
|
Enabled: false
|
|
|
|
Style/NumericLiterals:
|
|
|
|
Enabled: false
|
|
|
|
Style/BracesAroundHashParameters:
|
|
|
|
Enabled: false
|
|
|
|
Style/SpaceInsideBrackets:
|
|
|
|
Enabled: false
|
|
|
|
Style/SpaceInsideHashLiteralBraces:
|
|
|
|
Enabled: false
|
|
|
|
Style/PercentLiteralDelimiters:
|
|
|
|
Enabled: false
|
|
|
|
Style/SpaceAroundOperators:
|
|
|
|
Enabled: false
|
|
|
|
Style/SpaceAfterColon:
|
|
|
|
Enabled: false
|
|
|
|
Style/SpaceAfterComma:
|
|
|
|
Enabled: false
|
|
|
|
Style/Documentation:
|
|
|
|
Enabled: false
|
|
|
|
Style/ClassAndModuleChildren:
|
|
|
|
Enabled: false
|
|
|
|
Style/RegexpLiteral:
|
|
|
|
Enabled: false
|
|
|
|
Style/EmptyLines:
|
|
|
|
Enabled: false
|
|
|
|
Style/EmptyLinesAroundMethodBody:
|
|
|
|
Enabled: false
|
|
|
|
Style/EmptyLinesAroundClassBody:
|
|
|
|
Enabled: false
|
|
|
|
Style/EmptyLinesAroundModuleBody:
|
|
|
|
Enabled: false
|
2015-04-10 03:55:31 +08:00
|
|
|
Style/EmptyLinesAroundBlockBody:
|
|
|
|
Enabled: false
|
2015-04-05 08:49:25 +08:00
|
|
|
Style/GuardClause:
|
|
|
|
Enabled: false
|
|
|
|
Style/RedundantSelf:
|
|
|
|
Enabled: false
|
|
|
|
Style/SpaceAroundEqualsInParameterDefault:
|
|
|
|
Enabled: false
|
2016-12-28 14:17:05 +08:00
|
|
|
Style/SpaceBeforeFirstArg:
|
2015-04-05 08:49:25 +08:00
|
|
|
Enabled: false
|
|
|
|
Style/EmptyLinesAroundAccessModifier:
|
|
|
|
Enabled: false
|
|
|
|
Style/IfUnlessModifier:
|
|
|
|
Enabled: false
|
|
|
|
Style/WordArray:
|
|
|
|
Enabled: false
|
|
|
|
Style/PercentQLiterals:
|
|
|
|
Enabled: false
|
|
|
|
Style/IndentHash:
|
|
|
|
Enabled: false
|
2015-04-10 03:55:31 +08:00
|
|
|
Style/DoubleNegation:
|
|
|
|
Enabled: false
|
2016-12-28 14:17:05 +08:00
|
|
|
Style/TrailingCommaInArguments:
|
|
|
|
Enabled: false
|
|
|
|
Style/TrailingCommaInLiteral:
|
2015-04-10 03:55:31 +08:00
|
|
|
Enabled: false
|
|
|
|
Style/MethodCallParentheses:
|
|
|
|
Enabled: false
|
2015-04-10 22:43:59 +08:00
|
|
|
Style/TrailingBlankLines:
|
|
|
|
Enabled: false
|
2015-04-11 00:52:01 +08:00
|
|
|
Style/IndentationConsistency:
|
|
|
|
Enabled: false
|
|
|
|
Style/IndentationWidth:
|
|
|
|
Enabled: false
|
2015-04-14 02:20:55 +08:00
|
|
|
Style/AlignParameters:
|
|
|
|
Enabled: false
|
2015-04-16 04:49:06 +08:00
|
|
|
Style/DotPosition:
|
|
|
|
Enabled: false
|
|
|
|
Style/TrailingWhitespace:
|
|
|
|
Enabled: false
|
|
|
|
Style/MultilineOperationIndentation:
|
|
|
|
Enabled: false
|
|
|
|
Style/AlignHash:
|
|
|
|
Enabled: false
|
|
|
|
Style/AlignParameters:
|
|
|
|
Enabled: false
|
2015-04-28 00:23:45 +08:00
|
|
|
Style/Lambda:
|
|
|
|
Enabled: false
|
2015-04-29 00:27:56 +08:00
|
|
|
Style/WhileUntilModifier:
|
|
|
|
Enabled: false
|
2016-01-15 23:44:38 +08:00
|
|
|
Style/ParallelAssignment:
|
|
|
|
Enabled: false
|
2016-12-28 14:17:05 +08:00
|
|
|
Style/ZeroLengthPredicate:
|
|
|
|
Enabled: false
|
|
|
|
Style/SpaceInLambdaLiteral:
|
|
|
|
Enabled: false
|
|
|
|
Style/NumericPredicate:
|
|
|
|
Enabled: false
|
|
|
|
Style/VariableNumber:
|
|
|
|
Enabled: false
|
|
|
|
Style/SpaceInLambdaLiteral:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
# this isn't good for us because of how we pin dependencies
|
|
|
|
Bundler/OrderedGems:
|
|
|
|
Enabled: false
|
2015-04-15 06:47:24 +08:00
|
|
|
|
|
|
|
# Rails style changes
|
2016-12-28 14:17:05 +08:00
|
|
|
Rails:
|
|
|
|
Enabled: true
|
2015-04-14 00:16:46 +08:00
|
|
|
Rails/TimeZone:
|
|
|
|
Enabled: false
|
2015-04-27 23:39:18 +08:00
|
|
|
# accessors are often defined in terms of read_attribute
|
|
|
|
Rails/ReadWriteAttribute:
|
|
|
|
Enabled: false
|
2015-04-10 22:43:59 +08:00
|
|
|
|
2015-04-15 06:47:24 +08:00
|
|
|
# Lint changes
|
|
|
|
Lint/AmbiguousRegexpLiteral:
|
|
|
|
Severity: convention
|
2015-04-16 04:49:06 +08:00
|
|
|
Lint/UselessAssignment:
|
|
|
|
Severity: convention
|
2015-04-25 03:27:58 +08:00
|
|
|
Lint/Debugger:
|
|
|
|
Severity: error
|
2015-04-27 23:39:18 +08:00
|
|
|
Lint/EndAlignment:
|
|
|
|
Severity: convention
|
2015-04-15 06:47:24 +08:00
|
|
|
|
|
|
|
# Performance changes
|
|
|
|
Performance/Detect:
|
|
|
|
Severity: warning
|
|
|
|
|
2015-04-10 22:43:59 +08:00
|
|
|
# these need better configuration than the default:
|
|
|
|
Style/AndOr:
|
|
|
|
EnforcedStyle: conditionals
|
2016-12-28 14:17:05 +08:00
|
|
|
Style/RescueModifier:
|
|
|
|
Severity: warning
|
|
|
|
Style/MultilineMethodCallIndentation:
|
|
|
|
EnforcedStyle: indented
|
|
|
|
Style/IndentArray:
|
|
|
|
EnforcedStyle: consistent
|
2015-04-10 03:55:31 +08:00
|
|
|
|
|
|
|
# these don't make sense pre-Rails 4
|
|
|
|
Rails/FindBy:
|
|
|
|
Enabled: false
|
2015-04-10 21:37:58 +08:00
|
|
|
Rails/ActionFilter:
|
|
|
|
Enabled: false
|
2015-04-10 03:55:31 +08:00
|
|
|
|
|
|
|
# Things we may want to tighten down later
|
2015-04-11 02:29:31 +08:00
|
|
|
Metrics/AbcSize:
|
2015-04-15 06:47:24 +08:00
|
|
|
Enabled: false
|
2015-04-10 03:55:31 +08:00
|
|
|
Metrics/LineLength:
|
2015-04-10 06:29:09 +08:00
|
|
|
Max: 120
|
2015-04-10 03:55:31 +08:00
|
|
|
Metrics/MethodLength:
|
2015-04-10 06:29:09 +08:00
|
|
|
Max: 16
|
2015-04-11 02:29:31 +08:00
|
|
|
Metrics/CyclomaticComplexity:
|
|
|
|
Max: 10
|
2015-04-10 06:29:09 +08:00
|
|
|
RSpec/InstanceVariable:
|
|
|
|
Enabled: false
|
|
|
|
RSpec/ExampleWording:
|
|
|
|
Enabled: false
|
|
|
|
RSpec/DescribedClass:
|
|
|
|
Enabled: false
|
2015-04-15 06:21:54 +08:00
|
|
|
RSpec/DescribeClass:
|
|
|
|
Enabled: false
|
2015-04-11 04:49:20 +08:00
|
|
|
Style/HashSyntax:
|
|
|
|
Enabled: false
|