summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-06-30 13:31:52 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-06-30 13:31:52 +0200
commitefd70c18784690473b93714982e75c0c87210588 (patch)
tree2c4f96e4235eb337385d6ab3751c511139028d25
parent2efee5f6410f4e8e40e9b0339393de80f4affdde (diff)
downloadgitlab-ce-rubocop/enable-unneeded-capital-w-cop.tar.gz
Enable Style/UnneededCapitalW Rubocop coprubocop/enable-unneeded-capital-w-cop
-rw-r--r--.rubocop.yml2
-rw-r--r--lib/gitlab/key_fingerprint.rb2
-rw-r--r--spec/lib/gitlab/popen_spec.rb6
3 files changed, 5 insertions, 5 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index cc3055ef66e..cdcfd8150e5 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -681,7 +681,7 @@ Style/UnlessElse:
# Checks for %W when interpolation is not needed.
Style/UnneededCapitalW:
- Enabled: false
+ Enabled: true
# TODO: Enable UnneededInterpolation Cop.
# Checks for strings that are just an interpolated expression.
diff --git a/lib/gitlab/key_fingerprint.rb b/lib/gitlab/key_fingerprint.rb
index 8684b4636ea..b75ae512d92 100644
--- a/lib/gitlab/key_fingerprint.rb
+++ b/lib/gitlab/key_fingerprint.rb
@@ -39,7 +39,7 @@ module Gitlab
# OpenSSH 6.8 introduces a new default output format for fingerprints.
# Check the version and decide which command to use.
- version_output, version_status = popen(%W(ssh -V))
+ version_output, version_status = popen(%w(ssh -V))
return false unless version_status.zero?
version_matches = version_output.match(/OpenSSH_(?<major>\d+)\.(?<minor>\d+)/)
diff --git a/spec/lib/gitlab/popen_spec.rb b/spec/lib/gitlab/popen_spec.rb
index 795cf241278..e8b236426e9 100644
--- a/spec/lib/gitlab/popen_spec.rb
+++ b/spec/lib/gitlab/popen_spec.rb
@@ -10,7 +10,7 @@ describe 'Gitlab::Popen', lib: true, no_db: true do
context 'zero status' do
before do
- @output, @status = @klass.new.popen(%W(ls), path)
+ @output, @status = @klass.new.popen(%w(ls), path)
end
it { expect(@status).to be_zero }
@@ -19,7 +19,7 @@ describe 'Gitlab::Popen', lib: true, no_db: true do
context 'non-zero status' do
before do
- @output, @status = @klass.new.popen(%W(cat NOTHING), path)
+ @output, @status = @klass.new.popen(%w(cat NOTHING), path)
end
it { expect(@status).to eq(1) }
@@ -34,7 +34,7 @@ describe 'Gitlab::Popen', lib: true, no_db: true do
context 'without a directory argument' do
before do
- @output, @status = @klass.new.popen(%W(ls))
+ @output, @status = @klass.new.popen(%w(ls))
end
it { expect(@status).to be_zero }