config/default.yml in rubocop-0.68.1 vs config/default.yml in rubocop-0.69.0
- old
+ new
@@ -121,11 +121,11 @@
# .ruby-version file, Gemfile or gems.rb file, RuboCop will try to determine
# the desired version of Ruby by inspecting the .ruby-version file first,
# followed by the Gemfile.lock or gems.locked file. (Although the Ruby version
# is specified in the Gemfile or gems.rb file, RuboCop reads the final value
# from the lock file.) If the Ruby version is still unresolved, RuboCop will
- # use the oldest officially supported Ruby version (currently Ruby 2.2).
+ # use the oldest officially supported Ruby version (currently Ruby 2.3).
TargetRubyVersion: ~
# What version of Rails is the inspected code using? If a value is specified
# for TargetRailsVersion then it is used. Acceptable values are specificed
# as a float (i.e. 5.1); the patch version of Rails should not be included.
# If TargetRailsVersion is not set, RuboCop will parse the Gemfile.lock or
@@ -648,10 +648,11 @@
Layout/HeredocArgumentClosingParenthesis:
Description: >-
Checks for the placement of the closing parenthesis in a
method call that passes a HEREDOC string as an argument.
Enabled: false
+ StyleGuide: '#heredoc-argument-closing-parentheses'
VersionAdded: '0.68'
Layout/IndentAssignment:
Description: >-
Checks the indentation of the first line of the
@@ -754,13 +755,13 @@
Layout/IndentHeredoc:
Description: 'This cop checks the indentation of the here document bodies.'
StyleGuide: '#squiggly-heredocs'
Enabled: true
VersionAdded: '0.49'
- EnforcedStyle: auto_detection
+ VersionChanged: '0.69'
+ EnforcedStyle: squiggly
SupportedStyles:
- - auto_detection
- squiggly
- active_support
- powerpack
- unindent
@@ -1363,10 +1364,11 @@
Lint/HeredocMethodCallPosition:
Description: >-
Checks for the ordering of a method call where
the receiver of the call is a HEREDOC.
Enabled: false
+ StyleGuide: '#heredoc-method-calls'
VersionAdded: '0.68'
Lint/ImplicitStringConcatenation:
Description: >-
Checks for adjacent string literals on the same line, which
@@ -2308,11 +2310,14 @@
Include:
- app/controllers/**/*.rb
Rails/LinkToBlank:
Description: 'Checks that `link_to` with a `target: "_blank"` have a `rel: "noopener"` option passed to them.'
- Reference: https://mathiasbynens.github.io/rel-noopener/
+ Reference:
+ - https://mathiasbynens.github.io/rel-noopener/
+ - https://html.spec.whatwg.org/multipage/links.html#link-type-noopener
+ - https://html.spec.whatwg.org/multipage/links.html#link-type-noreferrer
Enabled: true
VersionAdded: '0.62'
Rails/NotNullColumn:
Description: 'Do not add a NOT NULL column without a default value'
@@ -3126,16 +3131,13 @@
Description: >-
Add the frozen_string_literal comment to the top of files
to help transition to frozen string literals by default.
Enabled: true
VersionAdded: '0.36'
- VersionChanged: '0.47'
- EnforcedStyle: when_needed
+ VersionChanged: '0.69'
+ EnforcedStyle: always
SupportedStyles:
- # `when_needed` will add the frozen string literal comment to files
- # only when the `TargetRubyVersion` is set to 2.3+.
- - when_needed
# `always` will always add the frozen string literal comment to a file
# regardless of the Ruby version or if `freeze` or `<<` are called on a
# string literal. If you run code against multiple versions of Ruby, it is
# possible that this will create errors in Ruby 2.3.0+.
- always
@@ -3499,9 +3501,23 @@
EnforcedStyle: both
SupportedStyles:
# both: prefix and postfix negated `if` should both use `unless`
# prefix: only use `unless` for negated `if` statements positioned before the body of the statement
# postfix: only use `unless` for negated `if` statements positioned after the body of the statement
+ - both
+ - prefix
+ - postfix
+
+Style/NegatedUnless:
+ Description: 'Favor if over unless for negative conditions.'
+ StyleGuide: '#if-for-negatives'
+ Enabled: true
+ VersionAdded: '0.69'
+ EnforcedStyle: both
+ SupportedStyles:
+ # both: prefix and postfix negated `unless` should both use `if`
+ # prefix: only use `if` for negated `unless` statements positioned before the body of the statement
+ # postfix: only use `if` for negated `unless` statements positioned after the body of the statement
- both
- prefix
- postfix
Style/NegatedWhile: