.rubocop.yml in newrelic_rpm-8.8.0 vs .rubocop.yml in newrelic_rpm-8.9.0

- old
+ new

@@ -1,12 +1,12 @@ require: - rubocop-performance AllCops: - # Prevent RuboCop from exploding when it finds an older-than-2.4 .ruby-version TargetRubyVersion: 2.7 Exclude: [] + NewCops: enable Bundler/DuplicatedGem: Enabled: true Include: - '**/*.gemfile' @@ -31,21 +31,24 @@ - '**/gems.rb' Bundler/OrderedGems: Enabled: false -Gemspec/DateAssignment: +Gemspec/DeprecatedAttributeAssignment: Enabled: true Gemspec/DuplicatedAssignment: Enabled: true Include: - '**/*.gemspec' Gemspec/OrderedDependencies: Enabled: false +Gemspec/RequireMFA: + Enabled: false + Gemspec/RequiredRubyVersion: Enabled: false Gemspec/RubyVersionGlobalsUsage: Enabled: false @@ -236,11 +239,11 @@ IndentationWidth: ~ Layout/IndentationWidth: Enabled: true Width: 2 - IgnoredPatterns: [] + AllowedPatterns: [] Layout/InitialIndentation: Enabled: true Layout/LeadingCommentSpace: @@ -1315,10 +1318,16 @@ AutoCorrect: true Style/EndlessMethod: Enabled: false +# The use of Dir.home should be preferred over ENV['HOME'], but as of +# JRuby 9.3.3.0 the use of ENV['HOME'] is required to deliver the desired +# functionality +Style/EnvHome: + Enabled: false + # Disabling for now Style/EvalWithLocation: Enabled: false Style/EvenOdd: @@ -1331,10 +1340,15 @@ Enabled: false Style/ExponentialNotation: Enabled: false +# TODO: MAJOR VERSION - Re-enable FetchEnvVar after dropping support for Ruby 2.2 +# Ruby 2.3+ allows for ENV.fetch('KEY') { default } +Style/FetchEnvVar: + Enabled: false + Style/FloatDivision: Enabled: false # Disabling for now Style/For: @@ -1444,10 +1458,17 @@ # Disabling for now Style/LineEndConcatenation: Enabled: false # SafeAutoCorrect: false +# TODO: OLD RUBIES - enable this cop after support for Ruby <= 2.5 has been +# dropped. NewRelic::Agent::InfiniteTracing::Transformer.hash_to_attributes +# currently does `values.map {}.to_h`. Newer Rubies should +# use `values.to_h {}` instead. +Style/MapToHash: + Enabled: false + Style/MethodCallWithArgsParentheses: Enabled: false # Disabling for now Style/MethodCallWithoutArgsParentheses: @@ -1586,9 +1607,16 @@ Style/NumericPredicate: Enabled: false Style/OneLineConditional: Enabled: true + +# TODO: UNIT TESTS - tests relying on OpenStruct should be refactored to not +# do so, given that the use of OpenStruct instances can +# give a false sense of security with their extreme +# flexibility that may not match realistic code behavior. +Style/OpenStructUse: + Enabled: false Style/OptionHash: Enabled: false Style/OptionalArguments: