From a5cac267664afae53f8f6e51865b718d50990fd8 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Tue, 30 Apr 2019 18:14:08 +0530 Subject: [PATCH] Bump RuboCop to v0.68.x (#7637) Merge pull request 7637 --- .rubocop.yml | 5 +++-- Gemfile | 5 ++--- lib/jekyll/configuration.rb | 4 ++-- test/helper.rb | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index e3a80caa..38652ca8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,7 @@ --- require: + - rubocop-performance - ./rubocop/jekyll Jekyll/NoPutsAllowed: @@ -23,9 +24,9 @@ Layout/AlignHash: EnforcedHashRocketStyle: table Layout/IndentationWidth: Severity: error -Layout/IndentArray: +Layout/IndentFirstArrayElement: EnforcedStyle: consistent -Layout/IndentHash: +Layout/IndentFirstHashElement: EnforcedStyle: consistent Layout/MultilineMethodCallIndentation: EnforcedStyle: indented diff --git a/Gemfile b/Gemfile index e2c935fa..522bbb0a 100644 --- a/Gemfile +++ b/Gemfile @@ -26,9 +26,8 @@ group :test do gem "nokogiri", "~> 1.7" gem "rspec" gem "rspec-mocks" - # Temporary lock on RuboCop version for Windows since Pysch-3.1.0 is not available - # for use on Ruby 2.6-mingw32 platforms - gem "rubocop", Gem.win_platform? ? "~> 0.64.0" : "~> 0.66.0" + gem "rubocop", "~> 0.68.0" + gem "rubocop-performance" gem "test-dependency-theme", :path => File.expand_path("test/fixtures/test-dependency-theme", __dir__) gem "test-theme", :path => File.expand_path("test/fixtures/test-theme", __dir__) gem "test-theme-symlink", :path => File.expand_path("test/fixtures/test-theme-symlink", __dir__) diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index d7e00d32..7b2cb430 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -199,10 +199,10 @@ module Jekyll new_config = read_config_file(config_file) configuration = Utils.deep_merge_hashes(configuration, new_config) end - rescue ArgumentError => err + rescue ArgumentError => e Jekyll.logger.warn "WARNING:", "Error reading configuration. " \ "Using defaults (and options)." - warn err + warn e end configuration.backwards_compatibilize.add_default_collections diff --git a/test/helper.rb b/test/helper.rb index ffd9434a..c4bf5b1d 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -196,8 +196,8 @@ class JekyllUnitTest < Minitest::Test rescue Errno::EACCES skip "Permission denied for creating a symlink to #{target.inspect} " \ "on this machine".magenta - rescue NotImplementedError => error - skip error.to_s.magenta + rescue NotImplementedError => e + skip e.to_s.magenta end end