summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-04 01:01:51 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-04 01:12:35 +0100
commit94ef51d6e36faa742d465444b30c382b9de97ad9 (patch)
tree5fd13b25150c581d4f385dab492d216c9eba48b2
parentcc0ecea9dd64fa06d318e79d20ab985945b11648 (diff)
downloadbundler-globally_enable_some_layout_cops.tar.gz
Auto-correct `Style/TrailingCommaInHashLiteral` offensesglobally_enable_some_layout_cops
-rw-r--r--.rubocop_todo.yml11
-rw-r--r--lib/bundler/cli/gem.rb6
-rw-r--r--lib/bundler/fetcher.rb2
-rw-r--r--lib/bundler/graph.rb2
-rw-r--r--spec/support/artifice/endpoint.rb2
5 files changed, 6 insertions, 17 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index dcddcb2774..ef3186ee8d 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -595,17 +595,6 @@ Style/StderrPuts:
Style/SymbolArray:
EnforcedStyle: brackets
-# Offense count: 6
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyleForMultiline.
-# SupportedStylesForMultiline: comma, consistent_comma, no_comma
-Style/TrailingCommaInHashLiteral:
- Exclude:
- - 'lib/bundler/cli/gem.rb'
- - 'lib/bundler/fetcher.rb'
- - 'lib/bundler/graph.rb'
- - 'spec/support/artifice/endpoint.rb'
-
# Offense count: 2
# Cop supports --auto-correct.
Style/UnneededCondition:
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index 58e2f8a3fd..3db1ec7843 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -11,7 +11,7 @@ module Bundler
class CLI::Gem
TEST_FRAMEWORK_VERSIONS = {
"rspec" => "3.0",
- "minitest" => "5.0"
+ "minitest" => "5.0",
}.freeze
attr_reader :options, :gem_name, :thor, :name, :target
@@ -57,7 +57,7 @@ module Bundler
:ext => options[:ext],
:exe => options[:exe],
:bundler_version => bundler_dependency_version,
- :github_username => github_username.empty? ? "[USERNAME]" : github_username
+ :github_username => github_username.empty? ? "[USERNAME]" : github_username,
}
ensure_safe_gem_name(name, constant_array)
@@ -69,7 +69,7 @@ module Bundler
"Rakefile.tt" => "Rakefile",
"README.md.tt" => "README.md",
"bin/console.tt" => "bin/console",
- "bin/setup.tt" => "bin/setup"
+ "bin/setup.tt" => "bin/setup",
}
executables = %w[
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 7ab71d99a8..7df42adc34 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -226,7 +226,7 @@ module Bundler
"GO_SERVER_URL" => "go",
"SNAP_CI" => "snap",
"CI_NAME" => ENV["CI_NAME"],
- "CI" => "ci"
+ "CI" => "ci",
}
env_cis.find_all {|env, _| ENV[env] }.map {|_, ci| ci }
end
diff --git a/lib/bundler/graph.rb b/lib/bundler/graph.rb
index de6bba0214..648754df29 100644
--- a/lib/bundler/graph.rb
+++ b/lib/bundler/graph.rb
@@ -117,7 +117,7 @@ module Bundler
:style => "filled",
:fillcolor => "#B9B9D5",
:shape => "box3d",
- :fontsize => 16
+ :fontsize => 16,
}.merge(@node_options[group])
)
end
diff --git a/spec/support/artifice/endpoint.rb b/spec/support/artifice/endpoint.rb
index 9a0cfae8a2..fcced6ea35 100644
--- a/spec/support/artifice/endpoint.rb
+++ b/spec/support/artifice/endpoint.rb
@@ -59,7 +59,7 @@ class Endpoint < Sinatra::Base
:platform => spec.platform.to_s,
:dependencies => spec.dependencies.select {|dep| dep.type == :runtime }.map do |dep|
[dep.name, dep.requirement.requirements.map {|a| a.join(" ") }.join(", ")]
- end
+ end,
}
end.compact
end