config/enabled.yml in rubocop-0.42.0 vs config/enabled.yml in rubocop-0.43.0
- old
+ new
@@ -258,11 +258,11 @@
Description: 'Use Unix-style line endings.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
Enabled: true
Style/EvenOdd:
- Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
+ Description: 'Favor the use of Integer#even? && Integer#odd?'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
Enabled: true
Style/ExtraSpacing:
Description: 'Do not use unnecessary spacing.'
@@ -400,11 +400,11 @@
line end.
Enabled: true
Style/MethodCallParentheses:
Description: 'Do not use parentheses for method calls with no arguments.'
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-invocation-parens'
Enabled: true
Style/MethodDefParentheses:
Description: >-
Checks if the method definitions have or don't have
@@ -554,10 +554,11 @@
Style/NumericPredicate:
Description: >-
Checks for the use of predicate- or comparison methods for
numeric comparisons.
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
Enabled: true
Style/OneLineConditional:
Description: >-
Favor the ternary operator(?:) over
@@ -661,10 +662,17 @@
Style/RescueModifier:
Description: 'Avoid using rescue in its modifier form.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
Enabled: true
+Style/SafeNavigation:
+ Description: >-
+ This cop transforms usages of a method call safeguarded by
+ a check for the existance of the object to
+ safe navigation (`&.`).
+ Enabled: true
+
Style/SelfAssignment:
Description: >-
Checks for places where self-assignment shorthand should have
been used.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
@@ -909,10 +917,14 @@
Style/VariableName:
Description: 'Use the configured style when naming variables.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
Enabled: true
+Style/VariableNumber:
+ Description: 'Use the configured style when numbering variables.'
+ Enabled: true
+
Style/WhenThen:
Description: 'Use when x then ... for one-line cases.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
Enabled: true
@@ -991,11 +1003,11 @@
Lint/AmbiguousOperator:
Description: >-
Checks for ambiguous operators in the first argument of a
method invocation without parentheses.
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-invocation-parens'
Enabled: true
Lint/AmbiguousRegexpLiteral:
Description: >-
Checks for ambiguous regexp literals in the first argument of
@@ -1195,17 +1207,25 @@
Lint/UnderscorePrefixedVariableName:
Description: 'Do not use prefix `_` for a variable that is used.'
Enabled: true
+Lint/UnifiedInteger:
+ Description: 'Use Integer instead of Fixnum or Bignum'
+ Enabled: true
+
Lint/UnneededDisable:
Description: >-
Checks for rubocop:disable comments that can be removed.
Note: this cop is not disabled when disabling all cops.
It must be explicitly disabled.
Enabled: true
+Lint/UnneededSplatExpansion:
+ Description: 'Checks for splat unnecessarily being called on literals'
+ Enabled: true
+
Lint/UnusedBlockArgument:
Description: 'Checks for unused block arguments.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
Enabled: true
@@ -1221,14 +1241,10 @@
Lint/UselessAccessModifier:
Description: 'Checks for useless access modifiers.'
Enabled: true
ContextCreatingMethods: []
-Lint/UselessArraySplat:
- Description: 'Checks for useless array splats.'
- Enabled: true
-
Lint/UselessAssignment:
Description: 'Checks for useless assignment to a local variable.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
Enabled: true
@@ -1324,14 +1340,10 @@
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
@@ -1361,21 +1373,25 @@
Enabled: true
Performance/Sample:
Description: >-
Use `sample` instead of `shuffle.first`,
- `shuffle.last`, and `shuffle[Fixnum]`.
+ `shuffle.last`, and `shuffle[Integer]`.
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
Enabled: true
Performance/Size:
Description: >-
Use `size` instead of `count` for counting
the number of elements in `Array` and `Hash`.
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
Enabled: true
+Performance/SortWithBlock:
+ Description: 'Use `sort_by(&:foo)` instead of `sort_by { |a, b| a.foo <=> b.foo }`.'
+ Enabled: true
+
Performance/StartWith:
Description: 'Use `start_with?` instead of a regex match anchored to the beginning of a string.'
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
Enabled: true
@@ -1427,10 +1443,14 @@
Rails/HasAndBelongsToMany:
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#has-many-through'
Enabled: true
+Rails/NotNullColumn:
+ Description: 'Do not add a NOT NULL column without a default value'
+ Enabled: true
+
Rails/Output:
Description: 'Checks for calls to puts, print, etc.'
Enabled: true
Rails/OutputSafety:
@@ -1450,10 +1470,14 @@
Rails/RequestReferer:
Description: 'Use consistent syntax for request.referer.'
Enabled: true
+Rails/SafeNavigation:
+ Description: "Use Ruby's safe navigation operator (`&.`) instead of `try!`"
+ Enabled: true
+
Rails/ScopeArgs:
Description: 'Checks the arguments of ActiveRecord scopes.'
Enabled: true
Rails/TimeZone:
@@ -1466,6 +1490,10 @@
Description: 'Prefer the use of uniq or distinct before pluck.'
Enabled: true
Rails/Validation:
Description: 'Use validates :attribute, hash of validations.'
+ Enabled: true
+
+Security/JSONLoad:
+ Description : 'Prefer usage of JSON.parse'
Enabled: true