config/default.yml in rubocop-0.21.0 vs config/default.yml in rubocop-0.22.0
- old
+ new
@@ -10,11 +10,11 @@
# Include gemspec and Rakefile
Include:
- '**/*.gemspec'
- '**/Rakefile'
Exclude:
- - 'vendor/**'
+ - 'vendor/**/*'
# By default, the rails cops are not run. Override in project or home
# directory .rubocop.yml files, or by giving the -R/--rails option.
RunRailsCops: false
# Indent private/protected/public as deep as method definitions
@@ -52,11 +52,11 @@
EnforcedColonStyle: key
# Select whether hashes that are the last argument in a method call should be
# inspected? Valid values are:
#
# always_inspect - Inspect both implicit and explicit hashes.
- # Registers and offence for:
+ # Registers an offence for:
# function(a: 1,
# b: 2)
# Registers an offence for:
# function({a: 1,
# b: 2})
@@ -65,18 +65,18 @@
# function(a: 1,
# b: 2)
# Accepts:
# function({a: 1,
# b: 2})
- # ignore_implicit - Ingore only implicit hashes.
+ # ignore_implicit - Ignore only implicit hashes.
# Accepts:
# function(a: 1,
# b: 2)
# Registers an offence for:
# function({a: 1,
# b: 2})
- # ignore_explicit - Ingore only explicit hashes.
+ # ignore_explicit - Ignore only explicit hashes.
# Accepts:
# function({a: 1,
# b: 2})
# Registers an offence for:
# function(a: 1,
@@ -95,12 +95,12 @@
# as the first parameter.
#
# method_call(a,
# b)
#
- # The `with_fixed_indentation` style alignes the following lines with one
- # level of indenation relative to the start of the line with the method call.
+ # The `with_fixed_indentation` style aligns the following lines with one
+ # level of indentation relative to the start of the line with the method call.
#
# method_call(a,
# b)
EnforcedStyle: with_first_parameter
SupportedStyles:
@@ -131,11 +131,11 @@
ClassAndModuleChildren:
# Checks the style of children definitions at classes and modules.
#
# Basically there are two different styles:
#
- # `nested` - have each child on a separat line
+ # `nested` - have each child on a separate line
# class Foo
# class Bar
# end
# end
#
@@ -236,18 +236,23 @@
# Built-in global variables are allowed by default.
GlobalVars:
AllowedVariables: []
+# `MinBodyLength` defines the number of lines of the a body of an if / unless
+# needs to have to trigger this cop
+GuardClause:
+ MinBodyLength: 1
+
HashSyntax:
EnforcedStyle: ruby19
SupportedStyles:
- ruby19
- hash_rockets
IfUnlessModifier:
- MaxLineLength: 79
+ MaxLineLength: 80
# Checks the indentation of the first key in a hash literal.
IndentHash:
# The value `special_inside_parentheses` means that hash literals with braces
# that have their opening brace on the same line as a surrounding opening
@@ -266,12 +271,30 @@
SupportedStyles:
- call
- braces
LineLength:
- Max: 79
+ Max: 80
+Next:
+ # With `always` all conditions at the end of an iteration needs to be
+ # replace by next - with `skip_modifier_ifs` the modifier if like this one
+ # are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
+ EnforcedStyle: skip_modifier_ifs
+ SupportedStyles:
+ - skip_modifier_ifs
+ - always
+
+NonNilCheck:
+ # With `IncludeSemanticChanges` set to `true`, this cop reports offences for
+ # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
+ # **usually** OK, but might change behavior.
+ #
+ # With `IncludeSemanticChanges` set to `false`, this cop does not report
+ # offences for `!x.nil?` and does no changes that might change behavior.
+ IncludeSemanticChanges: false
+
MethodDefParentheses:
EnforcedStyle: require_parentheses
SupportedStyles:
- require_parentheses
- require_no_parentheses
@@ -440,10 +463,10 @@
SupportedStyles:
- snake_case
- camelCase
WhileUntilModifier:
- MaxLineLength: 79
+ MaxLineLength: 80
WordArray:
MinSize: 0
##################### Rails ##################################