Skip to content
Snippets Groups Projects
Verified Commit 473b59a4 authored by Abdul Wadood's avatar Abdul Wadood :two:
Browse files

Fix Lint/RedundantCopDisableDirective offenses

As we want to enable this cop after fixing all the offenses.
parent 6ecfb89f
No related branches found
No related tags found
2 merge requests!171309Draft: Fetch issues / MRs / epics count in the sidebar with GraphQL,!171068Fix Lint/RedundantCopDisableDirective offenses
Showing
with 13 additions and 16 deletions
# rubocop:disable Naming/FileName
# frozen_string_literal: true
module Gitlab
......@@ -13,5 +12,3 @@ def to_json(...)
end
end
end
# rubocop:enable Naming/FileName
......@@ -6,7 +6,7 @@ module Migrations
module Observers
class QueryLog < MigrationObserver
def before
@logger_was = ActiveRecord::Base.logger # rubocop:disable Database/MultipleDatabases
@logger_was = ActiveRecord::Base.logger
file_path = File.join(output_dir, "migration.log")
@logger = Logger.new(file_path)
ActiveRecord::Base.logger = @logger
......
......@@ -9,7 +9,7 @@ module MigrationHelpers
class_methods do
def enable_runner_backoff!
@enable_runner_backoff = true # rubocop:disable Gitlab/ModuleWithInstanceVariables
@enable_runner_backoff = true
end
def enable_runner_backoff?
......
# frozen_string_literal: true
require 'set' # rubocop:disable Lint/RedundantRequireStatement -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported.
require 'set' # -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported.
module Gitlab
module Database
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::BackfillFindingIdInVulnerabilities, schema: 20230912105945, feature_category: :vulnerability_management do # rubocop:disable Layout/LineLength
RSpec.describe Gitlab::BackgroundMigration::BackfillFindingIdInVulnerabilities, schema: 20230912105945, feature_category: :vulnerability_management do
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
let(:users) { table(:users) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::BackfillMissingCiCdSettings, schema: 20230721095222, feature_category: :source_code_management do # rubocop:disable Layout/LineLength
RSpec.describe Gitlab::BackgroundMigration::BackfillMissingCiCdSettings, schema: 20230721095222, feature_category: :source_code_management do
let(:projects_table) { table(:projects) }
let(:namespaces_table) { table(:namespaces) }
let(:ci_cd_settings_table) { table(:project_ci_cd_settings) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::BackfillRootStorageStatisticsForkStorageSizes, schema: 20230721095222, feature_category: :consumables_cost_management do # rubocop:disable Layout/LineLength
RSpec.describe Gitlab::BackgroundMigration::BackfillRootStorageStatisticsForkStorageSizes, schema: 20230721095222, feature_category: :consumables_cost_management do
describe '#perform' do
let(:namespaces_table) { table(:namespaces) }
let(:root_storage_statistics_table) { table(:namespace_root_storage_statistics) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::BackfillUuidConversionColumnInVulnerabilityOccurrences, schema: 20230721095222, feature_category: :vulnerability_management do # rubocop:disable Layout/LineLength
RSpec.describe Gitlab::BackgroundMigration::BackfillUuidConversionColumnInVulnerabilityOccurrences, schema: 20230721095222, feature_category: :vulnerability_management do
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
let(:users) { table(:users) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::BackfillVulnerabilityReadsClusterAgent, :migration, schema: 20230721095222 do # rubocop:disable Layout/LineLength
RSpec.describe Gitlab::BackgroundMigration::BackfillVulnerabilityReadsClusterAgent, :migration, schema: 20230721095222 do
let(:migration) do
described_class.new(
start_id: 1, end_id: 10,
......
......@@ -2,6 +2,6 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::BatchingStrategies::BackfillProjectStatisticsWithContainerRegistrySizeBatchingStrategy do # rubocop:disable Layout/LineLength
RSpec.describe Gitlab::BackgroundMigration::BatchingStrategies::BackfillProjectStatisticsWithContainerRegistrySizeBatchingStrategy do
it { expect(described_class).to be < Gitlab::BackgroundMigration::BatchingStrategies::PrimaryKeyBatchingStrategy }
end
......@@ -2,7 +2,7 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::ConvertCreditCardValidationDataToHashes, schema: 20230721095222, feature_category: :user_profile do # rubocop:disable Layout/LineLength
RSpec.describe Gitlab::BackgroundMigration::ConvertCreditCardValidationDataToHashes, schema: 20230721095222, feature_category: :user_profile do
let(:users_table) { table(:users) }
let(:credit_card_validations_table) { table(:user_credit_card_validations) }
let(:rows) { 5 }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::DropVulnerabilitiesWithoutFindingId, feature_category: :vulnerability_management do # rubocop:disable Layout/LineLength -- autogenerated
RSpec.describe Gitlab::BackgroundMigration::DropVulnerabilitiesWithoutFindingId, feature_category: :vulnerability_management do
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
let(:users) { table(:users) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::PopulateVulnerabilityDismissalFields, schema: 20230721095222, feature_category: :vulnerability_management do # rubocop:disable Layout/LineLength
RSpec.describe Gitlab::BackgroundMigration::PopulateVulnerabilityDismissalFields, schema: 20230721095222, feature_category: :vulnerability_management do
let(:users) { table(:users) }
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
......
......@@ -55,7 +55,7 @@
]
end
shared_context 'with vulnerability data' do # rubocop:disable RSpec/MultipleMemoizedHelpers -- we need to satifsy foreign keys
shared_context 'with vulnerability data' do
let!(:vulnerabilities_to_resolve) do
removed_scanners.map do |external_id|
create_vulnerability(project_id: project.id, external_id: external_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment