Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
72373bf5
Commit
72373bf5
authored
Sep 03, 2020
by
Rajendra Kadam
Committed by
Rémy Coutable
Sep 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Style/AccessModifierDeclarations cop
MR fixes the cop for the files Adds changelog for change
parent
0422c4a6
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
18 deletions
+15
-18
.rubocop.yml
.rubocop.yml
+3
-0
.rubocop_todo.yml
.rubocop_todo.yml
+0
-11
app/helpers/lazy_image_tag_helper.rb
app/helpers/lazy_image_tag_helper.rb
+1
-1
changelogs/unreleased/access-modifier-cop.yml
changelogs/unreleased/access-modifier-cop.yml
+5
-0
lib/gitlab/cache/request_cache.rb
lib/gitlab/cache/request_cache.rb
+1
-1
lib/gitlab/request_profiler.rb
lib/gitlab/request_profiler.rb
+4
-4
spec/support/forgery_protection.rb
spec/support/forgery_protection.rb
+1
-1
No files found.
.rubocop.yml
View file @
72373bf5
...
@@ -60,6 +60,9 @@ Style/MutableConstant:
...
@@ -60,6 +60,9 @@ Style/MutableConstant:
Style/SafeNavigation
:
Style/SafeNavigation
:
Enabled
:
false
Enabled
:
false
Style/AccessModifierDeclarations
:
AllowModifiersOnSymbols
:
true
# Frozen String Literal
# Frozen String Literal
Style/FrozenStringLiteralComment
:
Style/FrozenStringLiteralComment
:
Enabled
:
true
Enabled
:
true
...
...
.rubocop_todo.yml
View file @
72373bf5
...
@@ -498,17 +498,6 @@ Security/YAMLLoad:
...
@@ -498,17 +498,6 @@ Security/YAMLLoad:
-
'
spec/initializers/secret_token_spec.rb'
-
'
spec/initializers/secret_token_spec.rb'
-
'
spec/lib/gitlab/prometheus/additional_metrics_parser_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
# Offense count: 148
# Cop supports --auto-correct.
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# Configuration parameters: EnforcedStyle.
...
...
app/helpers/lazy_image_tag_helper.rb
View file @
72373bf5
...
@@ -25,5 +25,5 @@ module LazyImageTagHelper
...
@@ -25,5 +25,5 @@ module LazyImageTagHelper
end
end
# Required for Banzai::Filter::ImageLazyLoadFilter
# Required for Banzai::Filter::ImageLazyLoadFilter
module_function
:placeholder_image
module_function
:placeholder_image
# rubocop: disable Style/AccessModifierDeclarations
end
end
changelogs/unreleased/access-modifier-cop.yml
0 → 100644
View file @
72373bf5
---
title
:
Fix Style/AccessModifierDeclarations co cop
merge_request
:
41252
author
:
Rajendra Kadam
type
:
fixed
lib/gitlab/cache/request_cache.rb
View file @
72373bf5
...
@@ -55,7 +55,7 @@ module Gitlab
...
@@ -55,7 +55,7 @@ module Gitlab
.
join
(
':'
)
.
join
(
':'
)
end
end
private
cache_key_method_name
private
cache_key_method_name
# rubocop: disable Style/AccessModifierDeclarations
end
end
end
end
end
end
...
...
lib/gitlab/request_profiler.rb
View file @
72373bf5
...
@@ -11,7 +11,7 @@ module Gitlab
...
@@ -11,7 +11,7 @@ module Gitlab
Profile
.
new
(
File
.
basename
(
path
))
Profile
.
new
(
File
.
basename
(
path
))
end
.
select
(
&
:valid?
)
end
.
select
(
&
:valid?
)
end
end
module_function
:all
module_function
:all
# rubocop: disable Style/AccessModifierDeclarations
def
find
(
name
)
def
find
(
name
)
file_path
=
File
.
join
(
PROFILES_DIR
,
name
)
file_path
=
File
.
join
(
PROFILES_DIR
,
name
)
...
@@ -19,18 +19,18 @@ module Gitlab
...
@@ -19,18 +19,18 @@ module Gitlab
Profile
.
new
(
name
)
Profile
.
new
(
name
)
end
end
module_function
:find
module_function
:find
# rubocop: disable Style/AccessModifierDeclarations
def
profile_token
def
profile_token
Rails
.
cache
.
fetch
(
'profile-token'
)
do
Rails
.
cache
.
fetch
(
'profile-token'
)
do
Devise
.
friendly_token
Devise
.
friendly_token
end
end
end
end
module_function
:profile_token
module_function
:profile_token
# rubocop: disable Style/AccessModifierDeclarations
def
remove_all_profiles
def
remove_all_profiles
FileUtils
.
rm_rf
(
PROFILES_DIR
)
FileUtils
.
rm_rf
(
PROFILES_DIR
)
end
end
module_function
:remove_all_profiles
module_function
:remove_all_profiles
# rubocop: disable Style/AccessModifierDeclarations
end
end
end
end
spec/support/forgery_protection.rb
View file @
72373bf5
...
@@ -8,7 +8,7 @@ module ForgeryProtection
...
@@ -8,7 +8,7 @@ module ForgeryProtection
ActionController
::
Base
.
allow_forgery_protection
=
false
ActionController
::
Base
.
allow_forgery_protection
=
false
end
end
module_function
:with_forgery_protection
module_function
:with_forgery_protection
# rubocop: disable Style/AccessModifierDeclarations
end
end
RSpec
.
configure
do
|
config
|
RSpec
.
configure
do
|
config
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment