.rubocop.yml in keep_up-0.8.1 vs .rubocop.yml in keep_up-0.9.0
- old
+ new
@@ -1,17 +1,18 @@
inherit_from: .rubocop_todo.yml
require:
- - rubocop-rspec
- rubocop-performance
+ - rubocop-rspec
AllCops:
Exclude:
- 'tmp/**/*'
- TargetRubyVersion: 2.4
+ NewCops: enable
+ TargetRubyVersion: 2.5
-# Require lines to fit in pull requests.
+# Be lenient with line length
Layout/LineLength:
Max: 92
# Don't force lonely closing parentheses
Layout/MultilineMethodCallBraceLayout:
@@ -29,11 +30,11 @@
# Force consistent spacing independent of block contents
Layout/SpaceBeforeBlockBraces:
EnforcedStyleForEmptyBraces: space
-# This cop gives bad advice
+# Assume the programmer knows how bracketed block syntax works
Lint/AmbiguousBlockAssociation:
Enabled: false
# Allow if (foo = get_foo) style
Lint/AssignmentInCondition:
@@ -42,22 +43,35 @@
# Spec describe blocks can be any size
Metrics/BlockLength:
Exclude:
- 'spec/**/*'
+Performance/StartWith:
+ AutoCorrect: true
+
# Allow and/or for control flow only
Style/AndOr:
EnforcedStyle: conditionals
# Require at least two dependent lines before suggesting a guard clause
Style/GuardClause:
MinBodyLength: 2
+# Sometimes an if statement just looks better than next with a guard clause
+Style/Next:
+ Enabled: false
+
# Explicite numbers are often clearer, and more robust.
Style/NumericPredicate:
Enabled: false
+# Use older RuboCop default
+Style/PercentLiteralDelimiters:
+ PreferredDelimiters:
+ '%W': ()
+ '%w': ()
+
# Allow explicit return with multiple return values
Style/RedundantReturn:
AllowMultipleReturnValues: true
# Do not commit to use of interpolation
@@ -66,10 +80,8 @@
# Prefer symbols to look like symbols
Style/SymbolArray:
EnforcedStyle: brackets
-# Project-specific configuration goes here.
-
-# Allow deeper nesting for spec organization
-RSpec/NestedGroups:
- Max: 4
+# Accessors are only trivial if they match the ivar name
+Style/TrivialAccessors:
+ ExactNameMatch: true