diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 5902ef8e967..4dd84cacd2c 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -585,17 +585,6 @@ Layout/TrailingWhitespace: Lint/ConstantDefinitionInBlock: Enabled: false -# This cop supports safe auto-correction (--auto-correct). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: standard_error, runtime_error -Lint/InheritException: - Exclude: - - 'lib/puppet/agent.rb' - - 'lib/puppet/network/http/error.rb' - - 'lib/puppet/pops/evaluator/closure.rb' - - 'lib/puppet/util/logging.rb' - - 'lib/puppet/util/retry_action.rb' - Lint/MissingSuper: Enabled: false diff --git a/lib/puppet/agent.rb b/lib/puppet/agent.rb index 96ab1ac3588..65c1eb3b9f6 100644 --- a/lib/puppet/agent.rb +++ b/lib/puppet/agent.rb @@ -18,7 +18,7 @@ class Puppet::Agent include Puppet::Util::Splayer # Special exception class used to signal an agent run has timed out. - class RunTimeoutError < Exception + class RunTimeoutError < Exception # rubocop:disable Lint/InheritException end attr_reader :client_class, :client, :should_fork diff --git a/lib/puppet/network/http/error.rb b/lib/puppet/network/http/error.rb index 74ec877ef5b..f0136efec14 100644 --- a/lib/puppet/network/http/error.rb +++ b/lib/puppet/network/http/error.rb @@ -4,7 +4,7 @@ module Puppet::Network::HTTP::Error Issues = Puppet::Network::HTTP::Issues - class HTTPError < Exception + class HTTPError < Exception # rubocop:disable Lint/InheritException attr_reader :status, :issue_kind def initialize(message, status, issue_kind) diff --git a/lib/puppet/pops/evaluator/closure.rb b/lib/puppet/pops/evaluator/closure.rb index f5af2646b8d..65fe9964a58 100644 --- a/lib/puppet/pops/evaluator/closure.rb +++ b/lib/puppet/pops/evaluator/closure.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Puppet::Pops module Evaluator - class Jumper < Exception + class Jumper < Exception # rubocop:disable Lint/InheritException attr_reader :value attr_reader :file attr_reader :line diff --git a/lib/puppet/util/logging.rb b/lib/puppet/util/logging.rb index 79e0b2a1f1f..2e006c904ef 100644 --- a/lib/puppet/util/logging.rb +++ b/lib/puppet/util/logging.rb @@ -125,7 +125,7 @@ def log_and_raise(exception, message) raise exception, message + "\n" + exception.to_s, exception.backtrace end - class DeprecationWarning < Exception; end + class DeprecationWarning < Exception; end # rubocop:disable Lint/InheritException # Logs a warning indicating that the Ruby code path is deprecated. Note that # this method keeps track of the offending lines of code that triggered the