Bump Rubocop to 0.49.1 (#6093)

Merge pull request 6093
This commit is contained in:
Anatoliy Yastreb 2017-06-15 21:29:35 +09:00 committed by jekyllbot
parent 2c0f5b3059
commit d3b00cb84c
14 changed files with 57 additions and 58 deletions

View File

@ -9,6 +9,38 @@ AllCops:
- benchmark/**/* - benchmark/**/*
- script/**/* - script/**/*
- vendor/**/* - vendor/**/*
Layout/AlignArray:
Enabled: false
Layout/AlignHash:
EnforcedHashRocketStyle: table
Layout/AlignParameters:
Enabled: false
Layout/EmptyLinesAroundAccessModifier:
Enabled: false
Layout/EmptyLinesAroundModuleBody:
Enabled: false
Layout/EndOfLine:
EnforcedStyle: lf
Layout/ExtraSpacing:
AllowForAlignment: true
Layout/FirstParameterIndentation:
EnforcedStyle: consistent
Layout/IndentationWidth:
Severity: error
Layout/IndentArray:
EnforcedStyle: consistent
Layout/IndentHash:
EnforcedStyle: consistent
Layout/IndentHeredoc:
Enabled: false
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
Layout/SpaceAroundOperators:
Enabled: true
Layout/SpaceInsideBrackets:
Enabled: false
Lint/EndAlignment: Lint/EndAlignment:
Severity: error Severity: error
Lint/UnreachableCode: Lint/UnreachableCode:
@ -59,13 +91,6 @@ Security/YAMLLoad:
- !ruby/regexp /test\/.*.rb$/ - !ruby/regexp /test\/.*.rb$/
Style/Alias: Style/Alias:
Enabled: false Enabled: false
Style/AlignArray:
Enabled: false
Style/AlignHash:
EnforcedHashRocketStyle: table
Style/AlignParameters:
Enabled: false
EnforcedStyle: with_fixed_indentation
Style/AndOr: Style/AndOr:
Severity: error Severity: error
Style/Attr: Style/Attr:
@ -80,18 +105,8 @@ Style/Documentation:
- !ruby/regexp /features\/.*.rb$/ - !ruby/regexp /features\/.*.rb$/
Style/DoubleNegation: Style/DoubleNegation:
Enabled: false Enabled: false
Style/EmptyLinesAroundAccessModifier:
Enabled: false
Style/EmptyLinesAroundModuleBody:
Enabled: false
Style/EndOfLine:
EnforcedStyle: lf
Style/ExtraSpacing:
AllowForAlignment: true
Style/FileName: Style/FileName:
Enabled: false Enabled: false
Style/FirstParameterIndentation:
EnforcedStyle: consistent
Style/GuardClause: Style/GuardClause:
Enabled: false Enabled: false
Style/HashSyntax: Style/HashSyntax:
@ -99,22 +114,10 @@ Style/HashSyntax:
Severity: error Severity: error
Style/IfUnlessModifier: Style/IfUnlessModifier:
Enabled: false Enabled: false
Style/IndentArray:
EnforcedStyle: consistent
Style/IndentHash:
EnforcedStyle: consistent
Style/IndentHeredoc:
Enabled: false
Style/IndentationWidth:
Severity: error
Style/InverseMethods: Style/InverseMethods:
Enabled: false Enabled: false
Style/ModuleFunction: Style/ModuleFunction:
Enabled: false Enabled: false
Style/MultilineMethodCallIndentation:
EnforcedStyle: indented
Style/MultilineOperationIndentation:
EnforcedStyle: indented
Style/MultilineTernaryOperator: Style/MultilineTernaryOperator:
Severity: error Severity: error
Style/PercentLiteralDelimiters: Style/PercentLiteralDelimiters:
@ -138,10 +141,6 @@ Style/SignalException:
EnforcedStyle: only_raise EnforcedStyle: only_raise
Style/SingleLineMethods: Style/SingleLineMethods:
Enabled: false Enabled: false
Style/SpaceAroundOperators:
Enabled: false
Style/SpaceInsideBrackets:
Enabled: false
Style/StringLiterals: Style/StringLiterals:
EnforcedStyle: double_quotes EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation: Style/StringLiteralsInInterpolation:

View File

@ -25,7 +25,7 @@ group :test do
gem "nokogiri" gem "nokogiri"
gem "rspec" gem "rspec"
gem "rspec-mocks" gem "rspec-mocks"
gem "rubocop", "~> 0.48.1" gem "rubocop", "~> 0.49.1"
gem "test-dependency-theme", :path => File.expand_path("./test/fixtures/test-dependency-theme", File.dirname(__FILE__)) gem "test-dependency-theme", :path => File.expand_path("./test/fixtures/test-dependency-theme", File.dirname(__FILE__))
gem "test-theme", :path => File.expand_path("./test/fixtures/test-theme", File.dirname(__FILE__)) gem "test-theme", :path => File.expand_path("./test/fixtures/test-theme", File.dirname(__FILE__))

View File

@ -34,7 +34,7 @@ module Jekyll
if docs.respond_to?(method.to_sym) if docs.respond_to?(method.to_sym)
Jekyll.logger.warn "Deprecation:", Jekyll.logger.warn "Deprecation:",
"#{label}.#{method} should be changed to #{label}.docs.#{method}." "#{label}.#{method} should be changed to #{label}.docs.#{method}."
Jekyll.logger.warn "", "Called by #{caller.first}." Jekyll.logger.warn "", "Called by #{caller(0..0)}."
docs.public_send(method.to_sym, *args, &blck) docs.public_send(method.to_sym, *args, &blck)
else else
super super

View File

@ -136,7 +136,7 @@ module Jekyll
private private
def format_url(ssl_enabled, address, port, baseurl = nil) def format_url(ssl_enabled, address, port, baseurl = nil)
format("%{prefix}://%{address}:%{port}%{baseurl}", { format("%<prefix>s://%<address>s:%<port>i%<baseurl>s", {
:prefix => ssl_enabled ? "https" : "http", :prefix => ssl_enabled ? "https" : "http",
:address => address, :address => address,
:port => port, :port => port,

View File

@ -8,7 +8,7 @@ module Jekyll
# #
# Returns the String prefix. # Returns the String prefix.
def self.highlighter_prefix(highlighter_prefix = nil) def self.highlighter_prefix(highlighter_prefix = nil)
if !defined?(@highlighter_prefix) || !highlighter_prefix.nil? unless defined?(@highlighter_prefix) && highlighter_prefix.nil?
@highlighter_prefix = highlighter_prefix @highlighter_prefix = highlighter_prefix
end end
@highlighter_prefix @highlighter_prefix
@ -22,7 +22,7 @@ module Jekyll
# #
# Returns the String suffix. # Returns the String suffix.
def self.highlighter_suffix(highlighter_suffix = nil) def self.highlighter_suffix(highlighter_suffix = nil)
if !defined?(@highlighter_suffix) || !highlighter_suffix.nil? unless defined?(@highlighter_suffix) && highlighter_suffix.nil?
@highlighter_suffix = highlighter_suffix @highlighter_suffix = highlighter_suffix
end end
@highlighter_suffix @highlighter_suffix

View File

@ -160,7 +160,7 @@ module Jekyll
# #
# Returns true if extname == .coffee, false otherwise. # Returns true if extname == .coffee, false otherwise.
def coffeescript_file? def coffeescript_file?
".coffee" == ext ext == ".coffee"
end end
# Determine whether the file should be rendered with Liquid. # Determine whether the file should be rendered with Liquid.

View File

@ -150,7 +150,7 @@ module Jekyll
# #
# Returns true if extname == .coffee, false otherwise. # Returns true if extname == .coffee, false otherwise.
def coffeescript_file? def coffeescript_file?
".coffee" == extname extname == ".coffee"
end end
# Determine whether the file should be rendered with Liquid. # Determine whether the file should be rendered with Liquid.
@ -371,7 +371,7 @@ module Jekyll
if data.key?(method.to_s) if data.key?(method.to_s)
Jekyll::Deprecator.deprecation_message "Document##{method} is now a key "\ Jekyll::Deprecator.deprecation_message "Document##{method} is now a key "\
"in the #data hash." "in the #data hash."
Jekyll::Deprecator.deprecation_message "Called by #{caller.first}." Jekyll::Deprecator.deprecation_message "Called by #{caller(0..0)}."
data[method.to_s] data[method.to_s]
else else
super super

View File

@ -60,7 +60,7 @@ module Jekyll
# #
# Returns the safety Boolean. # Returns the safety Boolean.
def self.safe(safe = nil) def self.safe(safe = nil)
if !defined?(@safe) || !safe.nil? unless defined?(@safe) && safe.nil?
@safe = safe @safe = safe
end end
@safe || false @safe || false