From 52a1db530aa7139a09fcb258f0179ac955907b1e Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 22 Jun 2020 20:02:29 +0530 Subject: [PATCH] Bump RuboCop to v0.86.x --- .rubocop.yml | 3 +++ Gemfile | 2 +- lib/jekyll/entry_filter.rb | 2 -- lib/jekyll/filters.rb | 3 +-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 3447c46f..a6649146 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -88,6 +88,7 @@ Metrics/CyclomaticComplexity: Exclude: - lib/jekyll/utils.rb - lib/jekyll/commands/serve.rb + Max: 11 Metrics/MethodLength: CountComments: false Max: 20 @@ -171,6 +172,8 @@ Style/PercentLiteralDelimiters: "%w": "()" "%W": "()" "%x": "()" +Style/RedundantFetchBlock: + Enabled: false Style/RedundantRegexpCharacterClass: Enabled: true Style/RedundantRegexpEscape: diff --git a/Gemfile b/Gemfile index 754ae955..fb3a3edd 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,7 @@ group :test do gem "nokogiri", "~> 1.7" gem "rspec" gem "rspec-mocks" - gem "rubocop", "~> 0.85.0" + gem "rubocop", "~> 0.86.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__) diff --git a/lib/jekyll/entry_filter.rb b/lib/jekyll/entry_filter.rb index 787625e2..936dd7c3 100644 --- a/lib/jekyll/entry_filter.rb +++ b/lib/jekyll/entry_filter.rb @@ -28,7 +28,6 @@ module Jekyll ) end - # rubocop:disable Metrics/CyclomaticComplexity def filter(entries) entries.reject do |e| # Reject this entry if it is just a "dot" representation. @@ -51,7 +50,6 @@ module Jekyll special?(e) || backup?(e) end end - # rubocop:enable Metrics/CyclomaticComplexity def included?(entry) glob_include?(site.include, entry) || diff --git a/lib/jekyll/filters.rb b/lib/jekyll/filters.rb index 5f05029a..ec40d1a9 100644 --- a/lib/jekyll/filters.rb +++ b/lib/jekyll/filters.rb @@ -399,7 +399,6 @@ module Jekyll # `where` filter helper # - # rubocop:disable Metrics/CyclomaticComplexity # rubocop:disable Metrics/PerceivedComplexity def compare_property_vs_target(property, target) case target @@ -421,7 +420,7 @@ module Jekyll false end - # rubocop:enable Metrics/CyclomaticComplexity + # rubocop:enable Metrics/PerceivedComplexity def item_property(item, property)