Commit 4b3ec11e authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Rémy Coutable

FIx Lint/RaiseException cop

parent e50df6b6
...@@ -153,15 +153,6 @@ Lint/NonDeterministicRequireOrder: ...@@ -153,15 +153,6 @@ Lint/NonDeterministicRequireOrder:
- 'qa/spec/spec_helper.rb' - 'qa/spec/spec_helper.rb'
- 'spec/spec_helper.rb' - 'spec/spec_helper.rb'
# Offense count: 3
# Configuration parameters: AllowedImplicitNamespaces.
# AllowedImplicitNamespaces: Gem
Lint/RaiseException:
Exclude:
- 'db/migrate/20190402150158_backport_enterprise_schema.rb'
- 'ee/spec/requests/api/helpers_spec.rb'
- 'spec/requests/api/helpers_spec.rb'
# Offense count: 27 # Offense count: 27
# Cop supports --auto-correct. # Cop supports --auto-correct.
Lint/RedundantCopDisableDirective: Lint/RedundantCopDisableDirective:
......
---
title: Fix Lint/RaiseException cop
merge_request: 41099
author: Rajendra Kadam
type: fixed
...@@ -914,7 +914,7 @@ class BackportEnterpriseSchema < ActiveRecord::Migration[5.0] ...@@ -914,7 +914,7 @@ class BackportEnterpriseSchema < ActiveRecord::Migration[5.0]
MSG MSG
end end
raise Exception.new(message) raise StandardError.new(message)
end end
def create_missing_tables def create_missing_tables
......
...@@ -25,7 +25,7 @@ RSpec.describe API::Helpers do ...@@ -25,7 +25,7 @@ RSpec.describe API::Helpers do
let(:params) { request.params } let(:params) { request.params }
def error!(message, status, header) def error!(message, status, header)
raise Exception.new("#{status} - #{message}") raise StandardError.new("#{status} - #{message}")
end end
before do before do
......
...@@ -39,7 +39,7 @@ RSpec.describe API::Helpers do ...@@ -39,7 +39,7 @@ RSpec.describe API::Helpers do
end end
def error!(message, status, header) def error!(message, status, header)
raise Exception.new("#{status} - #{message}") raise StandardError.new("#{status} - #{message}")
end end
def set_param(key, value) def set_param(key, value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment