From 34d0dd6c7de0dd013d40925597ea1f0933b9d317 Mon Sep 17 00:00:00 2001 From: Artyom Tokachev <32881748+tokachev@users.noreply.github.com> Date: Wed, 15 Jan 2020 09:06:31 +0300 Subject: [PATCH] Bump RuboCop to v0.79.x (#7970) Merge pull request 7970 --- .rubocop.yml | 8 ++++---- Gemfile | 2 +- lib/jekyll/excerpt.rb | 2 +- test/test_liquid_renderer.rb | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 3c6813a1..734cb297 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -21,13 +21,13 @@ AllCops: - script/**/* - vendor/**/* - tmp/**/* -Layout/AlignHash: +Layout/HashAlignment: EnforcedHashRocketStyle: table Layout/IndentationWidth: Severity: error -Layout/IndentFirstArrayElement: +Layout/FirstArrayElementIndentation: EnforcedStyle: consistent -Layout/IndentFirstHashElement: +Layout/FirstHashElementIndentation: EnforcedStyle: consistent Layout/MultilineMethodCallIndentation: EnforcedStyle: indented @@ -65,7 +65,7 @@ Metrics/CyclomaticComplexity: Exclude: - lib/jekyll/utils.rb - lib/jekyll/commands/serve.rb -Metrics/LineLength: +Layout/LineLength: Exclude: - !ruby/regexp /features\/.*.rb/ - Rakefile diff --git a/Gemfile b/Gemfile index 80ab3d7d..ba239e20 100644 --- a/Gemfile +++ b/Gemfile @@ -27,7 +27,7 @@ group :test do gem "nokogiri", "~> 1.7" gem "rspec" gem "rspec-mocks" - gem "rubocop", "~> 0.76.0" + gem "rubocop", "~> 0.79.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/excerpt.rb b/lib/jekyll/excerpt.rb index c7048e6e..696ca794 100644 --- a/lib/jekyll/excerpt.rb +++ b/lib/jekyll/excerpt.rb @@ -56,7 +56,7 @@ module Jekyll # # Returns true if the string passed in def include?(something) - (output&.include?(something)) || content.include?(something) + output&.include?(something) || content.include?(something) end # The UID for this doc (useful in feeds). diff --git a/test/test_liquid_renderer.rb b/test/test_liquid_renderer.rb index 13e68672..8739ada5 100644 --- a/test/test_liquid_renderer.rb +++ b/test/test_liquid_renderer.rb @@ -14,13 +14,13 @@ class TestLiquidRenderer < JekyllUnitTest output = @renderer.stats_table - # rubocop:disable Metrics/LineLength + # rubocop:disable Layout/LineLength expected = [ %r!^\| Filename\s+|\s+Count\s+|\s+Bytes\s+|\s+Time$!, %r!^\+(?:-+\+){4}$!, %r!^\|_posts/2010-01-09-date-override\.markdown\s+|\s+\d+\s+|\s+\d+\.\d{2}K\s+|\s+\d+\.\d{3}$!, ] - # rubocop:enable Metrics/LineLength + # rubocop:enable Layout/LineLength expected.each do |regexp| assert_match regexp, output