config/enabled.yml in rubocop-0.40.0 vs config/enabled.yml in rubocop-0.41.0
- old
+ new
@@ -5,10 +5,11 @@
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
Enabled: true
Style/AccessorMethodName:
Description: Check the naming of accessor methods for get_/set_.
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#accessor_mutator_method_names'
Enabled: true
Style/Alias:
Description: 'Use alias instead of alias_method.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
@@ -168,12 +169,12 @@
Style/DefWithParentheses:
Description: 'Use def with parentheses when there are arguments.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
Enabled: true
-Style/DeprecatedHashMethods:
- Description: 'Checks for use of deprecated Hash methods.'
+Style/PreferredHashMethods:
+ Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
Enabled: true
Style/Documentation:
Description: 'Document classes and non-namespace modules.'
@@ -190,10 +191,16 @@
Style/DoubleNegation:
Description: 'Checks for uses of double negation (!!).'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
Enabled: true
+Style/EachForSimpleLoop:
+ Description: >-
+ Use `Integer#times` for a simple loop which iterates a fixed
+ number of times.
+ Enabled: true
+
Style/EachWithObject:
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
Enabled: true
Style/ElseAlignment:
@@ -533,10 +540,15 @@
Add underscores to large numeric literals to improve their
readability.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
Enabled: true
+Style/NumericLiteralPrefix:
+ Description: 'Use smallcase prefixes for numeric literals.'
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#numeric-literal-prefixes'
+ Enabled: true
+
Style/OneLineConditional:
Description: >-
Favor the ternary operator(?:) over
if/then/else/end constructs.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
@@ -746,10 +758,18 @@
Style/SpaceAroundOperators:
Description: 'Use a single space around operators.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
Enabled: true
+Style/SpaceInsideArrayPercentLiteral:
+ Description: 'No unnecessary additional spaces between elements in %i/%w literals.'
+ Enabled: true
+
+Style/SpaceInsidePercentLiteralDelimiters:
+ Description: 'No unnecessary spaces inside delimiters of %i/%w/%x literals.'
+ Enabled: true
+
Style/SpaceInsideBrackets:
Description: 'No spaces after [ or before ].'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
Enabled: true
@@ -817,11 +837,11 @@
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
Enabled: true
Style/TrailingCommaInArguments:
Description: 'Checks for trailing comma in argument lists.'
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
Enabled: true
Style/TrailingCommaInLiteral:
Description: 'Checks for trailing comma in array and hash literals.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
@@ -1065,10 +1085,14 @@
Description: >-
Checks for attempts to use `private` or `protected` to set
the visibility of a class method, which does not work.
Enabled: true
+Lint/InheritException:
+ Description: 'Avoid inheriting from the `Exception` class.'
+ Enabled: true
+
Lint/InvalidCharacterLiteral:
Description: >-
Checks for invalid character literals with a non-escaped
whitespace character.
Enabled: true
@@ -1108,10 +1132,20 @@
Checks for method calls with a space before the opening
parenthesis.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
Enabled: true
+Lint/PercentStringArray:
+ Description: >-
+ Checks for unwanted commas and quotes in %w/%W literals.
+ Enabled: true
+
+Lint/PercentSymbolArray:
+ Description: >-
+ Checks for unwanted commas and colons in %i/%I literals.
+ Enabled: true
+
Lint/RandOne:
Description: >-
Checks for `rand(1)` calls. Such calls always return `0`
and most likely a mistake.
Enabled: true
@@ -1125,10 +1159,16 @@
Lint/RescueException:
Description: 'Avoid rescuing the Exception class.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
Enabled: true
+Lint/ShadowedException:
+ Description: >-
+ Avoid rescuing a higher level exception
+ before a lower level exception.
+ Enabled: true
+
Lint/ShadowingOuterLocalVariable:
Description: >-
Do not use the same name as outer local variable
for block arguments or block local variables.
Enabled: true
@@ -1268,10 +1308,14 @@
Performance/LstripRstrip:
Description: 'Use `strip` instead of `lstrip.rstrip`.'
Enabled: true
+Performance/PushSplat:
+ Description: 'Use `concat` instead of `push(*)`.'
+ Enabled: true
+
Performance/RangeInclude:
Description: 'Use `Range#cover?` instead of `Range#include?`.'
Reference: 'https://github.com/JuanitoFatas/fast-ruby#cover-vs-include-code'
Enabled: true
@@ -1345,10 +1389,17 @@
Rails/Delegate:
Description: 'Prefer delegate method for delegations.'
Enabled: true
+Rails/Exit:
+ Description: >-
+ Favor `fail`, `break`, `return`, etc. over `exit` in
+ application or library code outside of Rake files to avoid
+ exits during unit testing or running in production.
+ Enabled: true
+
Rails/FindBy:
Description: 'Prefer find_by over where.first.'
Enabled: true
Rails/FindEach:
@@ -1361,20 +1412,28 @@
Rails/Output:
Description: 'Checks for calls to puts, print, etc.'
Enabled: true
+Rails/OutputSafety:
+ Description: 'The use of `html_safe` or `raw` may be a security risk.'
+ Enabled: true
+
Rails/PluralizationGrammar:
Description: 'Checks for incorrect grammar when using methods like `3.day.ago`.'
Enabled: true
Rails/ReadWriteAttribute:
Description: >-
Checks for read_attribute(:attr) and
write_attribute(:attr, val).
Enabled: true
+Rails/RequestReferer:
+ Description: 'Use consistent syntax for request.referer.'
+ Enabled: true
+
Rails/ScopeArgs:
Description: 'Checks the arguments of ActiveRecord scopes.'
Enabled: true
Rails/TimeZone:
@@ -1382,10 +1441,10 @@
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
Enabled: true
Rails/UniqBeforePluck:
- Description: 'Prefer the use of uniq before pluck.'
+ Description: 'Prefer the use of uniq or distinct before pluck.'
Enabled: true
Rails/Validation:
Description: 'Use validates :attribute, hash of validations.'
Enabled: true