Commit 72373bf5 authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Rémy Coutable

Fix Style/AccessModifierDeclarations cop

MR fixes the cop for the files

Adds changelog for change
parent 0422c4a6
......@@ -60,6 +60,9 @@ Style/MutableConstant:
Style/SafeNavigation:
Enabled: false
Style/AccessModifierDeclarations:
AllowModifiersOnSymbols: true
# Frozen String Literal
Style/FrozenStringLiteralComment:
Enabled: true
......
......@@ -498,17 +498,6 @@ Security/YAMLLoad:
- 'spec/initializers/secret_token_spec.rb'
- 'spec/lib/gitlab/prometheus/additional_metrics_parser_spec.rb'
# Offense count: 10
# Configuration parameters: EnforcedStyle, AllowModifiersOnSymbols.
# SupportedStyles: inline, group
Style/AccessModifierDeclarations:
Exclude:
- 'app/helpers/issues_helper.rb'
- 'app/helpers/lazy_image_tag_helper.rb'
- 'lib/gitlab/cache/request_cache.rb'
- 'lib/gitlab/request_profiler.rb'
- 'spec/support/forgery_protection.rb'
# Offense count: 148
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
......
......@@ -25,5 +25,5 @@ module LazyImageTagHelper
end
# Required for Banzai::Filter::ImageLazyLoadFilter
module_function :placeholder_image
module_function :placeholder_image # rubocop: disable Style/AccessModifierDeclarations
end
---
title: Fix Style/AccessModifierDeclarations co cop
merge_request: 41252
author: Rajendra Kadam
type: fixed
......@@ -55,7 +55,7 @@ module Gitlab
.join(':')
end
private cache_key_method_name
private cache_key_method_name # rubocop: disable Style/AccessModifierDeclarations
end
end
end
......
......@@ -11,7 +11,7 @@ module Gitlab
Profile.new(File.basename(path))
end.select(&:valid?)
end
module_function :all
module_function :all # rubocop: disable Style/AccessModifierDeclarations
def find(name)
file_path = File.join(PROFILES_DIR, name)
......@@ -19,18 +19,18 @@ module Gitlab
Profile.new(name)
end
module_function :find
module_function :find # rubocop: disable Style/AccessModifierDeclarations
def profile_token
Rails.cache.fetch('profile-token') do
Devise.friendly_token
end
end
module_function :profile_token
module_function :profile_token # rubocop: disable Style/AccessModifierDeclarations
def remove_all_profiles
FileUtils.rm_rf(PROFILES_DIR)
end
module_function :remove_all_profiles
module_function :remove_all_profiles # rubocop: disable Style/AccessModifierDeclarations
end
end
......@@ -8,7 +8,7 @@ module ForgeryProtection
ActionController::Base.allow_forgery_protection = false
end
module_function :with_forgery_protection
module_function :with_forgery_protection # rubocop: disable Style/AccessModifierDeclarations
end
RSpec.configure do |config|
......
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