Commit 4628d6ef authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'raise-exceptio-cop' into 'master'

FIx Lint/RaiseException cop

See merge request gitlab-org/gitlab!41099
parents 887642fd 4b3ec11e
......@@ -123,15 +123,6 @@ Lint/NonDeterministicRequireOrder:
- 'qa/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
# Cop supports --auto-correct.
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]
MSG
end
raise Exception.new(message)
raise StandardError.new(message)
end
def create_missing_tables
......
......@@ -25,7 +25,7 @@ RSpec.describe API::Helpers do
let(:params) { request.params }
def error!(message, status, header)
raise Exception.new("#{status} - #{message}")
raise StandardError.new("#{status} - #{message}")
end
before do
......
......@@ -39,7 +39,7 @@ RSpec.describe API::Helpers do
end
def error!(message, status, header)
raise Exception.new("#{status} - #{message}")
raise StandardError.new("#{status} - #{message}")
end
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