chore(deps): bump Rubocop to 0.93.0 (#8430)

Merge pull request 8430
This commit is contained in:
Frank Taillandier 2020-10-08 21:32:49 +02:00 committed by GitHub
parent 01d0b78abb
commit bcff13a16a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 9 deletions

View File

@ -77,6 +77,8 @@ Lint/EmptyFile:
Enabled: true
Lint/FloatComparison:
Enabled: true
Lint/HashCompareByIdentity:
Enabled: true
Lint/IdentityComparison:
Enabled: true
Lint/MissingSuper:
@ -90,6 +92,8 @@ Lint/OutOfRangeRegexpRef:
Enabled: true
Lint/RaiseException:
Enabled: true
Lint/RedundantSafeNavigation:
Enabled: true
Lint/SelfAssignment:
Enabled: true
Lint/StructNewOverride:
@ -205,6 +209,8 @@ Style/CaseLikeIf:
Style/ClassAndModuleChildren:
Exclude:
- test/**/*.rb
Style/ClassEqualityComparison:
Enabled: true
Style/CombinableLoops:
Enabled: true
Style/Documentation:

View File

@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2020-09-04 16:17:09 UTC using RuboCop version 0.90.0.
# `rubocop --auto-gen-config --auto-gen-only-exclude`
# on 2020-10-08 15:38:52 UTC using RuboCop version 0.93.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@ -20,8 +20,9 @@ Style/CombinableLoops:
Exclude:
- 'lib/jekyll/tags/post_url.rb'
# Offense count: 2
# Offense count: 1
# Configuration parameters: AllowedMethods.
# AllowedMethods: respond_to_missing?
Style/OptionalBooleanParameter:
Exclude:
- 'lib/jekyll/collection.rb'
- 'lib/jekyll/log_adapter.rb'

View File

@ -23,7 +23,7 @@ group :test do
gem "nokogiri", "~> 1.7"
gem "rspec"
gem "rspec-mocks"
gem "rubocop", "~> 0.92.0"
gem "rubocop", "~> 0.93.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__)

View File

@ -69,7 +69,7 @@ module Jekyll
end
def validate_permalink!(filename)
if self.data["permalink"]&.to_s&.empty?
if self.data["permalink"] == ""
raise Errors::InvalidPermalinkError, "Invalid permalink in #{filename}"
end
end

View File

@ -194,11 +194,11 @@ module Jekyll
def excerpt
return @excerpt if defined?(@excerpt)
@excerpt = data["excerpt"]&.to_s
@excerpt = data["excerpt"] ? data["excerpt"].to_s : nil
end
def generate_excerpt?
!excerpt_separator.empty? && self.class == Jekyll::Page && html?
!excerpt_separator.empty? && instance_of?(Jekyll::Page) && html?
end
private

View File

@ -15,7 +15,7 @@ class TestTags < JekyllUnitTest
site.read if override["read_all"]
info = { :filters => [Jekyll::Filters], :registers => { :site => site } }
@converter = site.converters.find { |c| c.class == converter_class }
@converter = site.converters.find { |c| c.instance_of?(converter_class) }
payload = { "highlighter_prefix" => @converter.highlighter_prefix,
"highlighter_suffix" => @converter.highlighter_suffix, }