Commit 0bf918f0 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Fix rubocop offenses. It's not checked before when

it's inside lib/tasks/*
parent e042baeb
...@@ -19,6 +19,10 @@ AllCops: ...@@ -19,6 +19,10 @@ AllCops:
- 'builds/**/*' - 'builds/**/*'
CacheRootDirectory: tmp CacheRootDirectory: tmp
# TODO: Remove me after updating gitlab-style
Style/TrailingUnderscoreVariable:
Enabled: false
# Gitlab ################################################################### # Gitlab ###################################################################
Gitlab/ModuleWithInstanceVariables: Gitlab/ModuleWithInstanceVariables:
......
require 'rainbow/ext/string' require 'rainbow/ext/string'
require 'gitlab/utils/strong_memoize' require 'gitlab/utils/strong_memoize'
# rubocop:disable Rails/Output
module Gitlab module Gitlab
TaskFailedError = Class.new(StandardError) TaskFailedError = Class.new(StandardError)
TaskAbortedByUserError = Class.new(StandardError) TaskAbortedByUserError = Class.new(StandardError)
...@@ -96,11 +97,9 @@ module Gitlab ...@@ -96,11 +97,9 @@ module Gitlab
end end
def gid_for(group_name) def gid_for(group_name)
begin Etc.getgrnam(group_name).gid
Etc.getgrnam(group_name).gid rescue ArgumentError # no group
rescue ArgumentError # no group "group #{group_name} doesn't exist"
"group #{group_name} doesn't exist"
end
end end
def gitlab_user def gitlab_user
......
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