config/enabled.yml in rubocop-0.46.0 vs config/enabled.yml in rubocop-0.47.0

- old
+ new

@@ -402,11 +402,11 @@ Description: >- Use \ instead of + or << to concatenate two string literals at line end. Enabled: true -Style/MethodCallParentheses: +Style/MethodCallWithoutArgsParentheses: Description: 'Do not use parentheses for method calls with no arguments.' StyleGuide: '#method-invocation-parens' Enabled: true Style/MethodDefParentheses: @@ -708,14 +708,10 @@ Style/SignalException: Description: 'Checks for proper usage of fail and raise.' StyleGuide: '#prefer-raise-over-fail' Enabled: true -Style/SingleLineBlockParams: - Description: 'Enforces the names of some block params.' - Enabled: true - Style/SingleLineMethods: Description: 'Avoid single-line methods.' StyleGuide: '#no-single-line-methods' Enabled: true @@ -1118,14 +1114,10 @@ Lint/EnsureReturn: Description: 'Do not use return in an ensure block.' StyleGuide: '#no-return-ensure' Enabled: true -Lint/Eval: - Description: 'The use of eval represents a serious security risk.' - Enabled: true - Lint/FloatOutOfRange: Description: >- Catches floating-point literals too large or small for Ruby to represent. Enabled: true @@ -1174,10 +1166,14 @@ Use Kernel#loop with break rather than begin/end/until or begin/end/while for post-loop tests. StyleGuide: '#loop-with-break' Enabled: true +Lint/MultipleCompare: + Description: "Use `&&` operator to compare multiple value." + Enabled: true + Lint/NestedMethodDefinition: Description: 'Do not use nested method definitions.' StyleGuide: '#no-nested-methods' Enabled: true @@ -1223,10 +1219,14 @@ Lint/RescueException: Description: 'Avoid rescuing the Exception class.' StyleGuide: '#no-blind-rescues' Enabled: true +Lint/SafeNavigationChain: + Description: 'Do not chain ordinary method call after safe navigation operator.' + Enabled: true + Lint/ShadowedException: Description: >- Avoid rescuing a higher level exception before a lower level exception. Enabled: true @@ -1277,10 +1277,11 @@ Lint/UselessAccessModifier: Description: 'Checks for useless access modifiers.' Enabled: true ContextCreatingMethods: [] + MethodCreatingMethods: [] Lint/UselessAssignment: Description: 'Checks for useless assignment to a local variable.' StyleGuide: '#underscore-unused-vars' Enabled: true @@ -1406,10 +1407,14 @@ Performance/RedundantSortBy: Description: 'Use `sort` instead of `sort_by { |x| x }`.' Enabled: true +Performance/RegexpMatch: + Description: 'Use `match?` instead of `Regexp#match`, `String#match`, `Symbol#match`, `Regexp#===` or `=~` when `MatchData` is not used.' + Enabled: true + Performance/ReverseEach: Description: 'Use `reverse_each` instead of `reverse.each`.' Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code' Enabled: true @@ -1486,10 +1491,14 @@ 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/FilePath: + Description: 'Use `Rails.root.join` for file path joining.' + Enabled: true + Rails/FindBy: Description: 'Prefer find_by over where.first.' StyleGuide: 'https://github.com/bbatsov/rails-style-guide#find_by' Enabled: true @@ -1535,10 +1544,16 @@ Rails/RequestReferer: Description: 'Use consistent syntax for request.referer.' Enabled: true +Rails/ReversibleMigration: + Description: 'Checks whether the change method of the migration file is reversible.' + StyleGuide: 'https://github.com/bbatsov/rails-style-guide#reversible-migration' + Reference: 'http://api.rubyonrails.org/classes/ActiveRecord/Migration/CommandRecorder.html' + Enabled: true + Rails/SafeNavigation: Description: "Use Ruby's safe navigation operator (`&.`) instead of `try!`" Enabled: true Rails/ScopeArgs: @@ -1553,22 +1568,47 @@ Rails/UniqBeforePluck: Description: 'Prefer the use of uniq or distinct before pluck.' Enabled: true +Rails/SkipsModelValidations: + Description: >- + Use methods that skips model validations with caution. + See reference for more information. + Reference: 'http://guides.rubyonrails.org/active_record_validations.html#skipping-validations' + Enabled: true + Rails/Validation: Description: 'Use validates :attribute, hash of validations.' Enabled: true +Security/Eval: + Description: 'The use of eval represents a serious security risk.' + Enabled: true + Security/JSONLoad: Description: >- Prefer usage of `JSON.parse` over `JSON.load` due to potential security issues. See reference for more information. Reference: 'http://ruby-doc.org/stdlib-2.3.0/libdoc/json/rdoc/JSON.html#method-i-load' Enabled: true # Autocorrect here will change to a method that may cause crashes depending # on the value of the argument. AutoCorrect: false + +Security/MarshalLoad: + Description: >- + Avoid using of `Marshal.load` or `Marshal.restore` due to potential + security issues. See reference for more information. + Reference: 'http://ruby-doc.org/core-2.3.3/Marshal.html#module-Marshal-label-Security+considerations' + Enabled: true + +Security/YAMLLoad: + Description: >- + Prefer usage of `YAML.safe_load` over `YAML.load` due to potential + security issues. See reference for more information. + Reference: 'https://ruby-doc.org/stdlib-2.3.3/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security' + Enabled: true ##################### Bundler ############################# Bundler/DuplicatedGem: Description: 'Checks for duplicate gem entries in Gemfile.'