diff --git a/.rubocop.yml b/.rubocop.yml index 20ae2605a..e165f8234 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -68,6 +68,11 @@ Style/TrailingCommaInArguments: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas' Enabled: false +Style/RescueStandardError: + Description: 'Avoid rescuing without specifying an error class.' + Enabled: true + EnforcedStyle: implicit + Layout/SpaceInsideParens: Description: 'No spaces after ( or before ).' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 8f398071e..77ea7405f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -83,9 +83,3 @@ Rails/HasManyOrHasOneDependent: Style/Documentation: Enabled: false -# Offense count: 172 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: implicit, explicit -Style/RescueStandardError: - Enabled: false diff --git a/app/models/channel.rb b/app/models/channel.rb index 568626841..1dade53bc 100644 --- a/app/models/channel.rb +++ b/app/models/channel.rb @@ -347,7 +347,7 @@ get instance of channel driver options[:outbound][:options][:password] = result[:access_token] save! - rescue StandardError => e + rescue => e logger.error e raise "Failed to refresh XOAUTH2 access_token of provider '#{options[:auth][:provider]}'! #{e.inspect}" end