summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-05-23 13:06:36 -0400
committerRobert Speicher <rspeicher@gmail.com>2016-05-23 13:06:36 -0400
commit013bccbd93c4d44994126a52bf997ea59ffe594e (patch)
treee6a82162bc1b9f8c17d1f0554c487146e4c3d908
parentbc806831e818b6e1ec2d1ae81221126f03c01f11 (diff)
downloadgitlab-ce-013bccbd93c4d44994126a52bf997ea59ffe594e.tar.gz
Enable Style/DefWithParentheses cop and fix single offense
-rw-r--r--.rubocop.yml2
-rw-r--r--lib/api/helpers.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 0946ef5d848..d09e493ef38 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -152,7 +152,7 @@ Style/ConstantName:
# Use def with parentheses when there are arguments.
Style/DefWithParentheses:
- Enabled: false
+ Enabled: true
# Checks for use of deprecated Hash methods.
Style/DeprecatedHashMethods:
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index cadf9f98fe3..2aaa0557ea3 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -29,7 +29,7 @@ module API
@current_user
end
- def sudo_identifier()
+ def sudo_identifier
identifier ||= params[SUDO_PARAM] || env[SUDO_HEADER]
# Regex for integers