Configure cops introduced in RuboCop v1.2
This commit is contained in:
parent
80fce9fcc3
commit
d3e3225fc1
|
@ -92,6 +92,8 @@ Lint/MixedRegexpCaptureTypes:
|
||||||
Lint/NestedPercentLiteral:
|
Lint/NestedPercentLiteral:
|
||||||
Exclude:
|
Exclude:
|
||||||
- test/test_site.rb
|
- test/test_site.rb
|
||||||
|
Lint/NoReturnInBeginEndBlocks:
|
||||||
|
Enabled: false
|
||||||
Lint/OutOfRangeRegexpRef:
|
Lint/OutOfRangeRegexpRef:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Lint/RaiseException:
|
Lint/RaiseException:
|
||||||
|
@ -221,6 +223,8 @@ Style/ClassAndModuleChildren:
|
||||||
- test/**/*.rb
|
- test/**/*.rb
|
||||||
Style/ClassEqualityComparison:
|
Style/ClassEqualityComparison:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
Style/CollectionCompact:
|
||||||
|
Enabled: true
|
||||||
Style/CombinableLoops:
|
Style/CombinableLoops:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Style/Documentation:
|
Style/Documentation:
|
||||||
|
@ -266,6 +270,8 @@ Style/ModuleFunction:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/MultilineTernaryOperator:
|
Style/MultilineTernaryOperator:
|
||||||
Severity: error
|
Severity: error
|
||||||
|
Style/NegatedIfElseCondition:
|
||||||
|
Enabled: true
|
||||||
Style/OptionalBooleanParameter:
|
Style/OptionalBooleanParameter:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Style/PercentLiteralDelimiters:
|
Style/PercentLiteralDelimiters:
|
||||||
|
|
|
@ -350,11 +350,14 @@ module Jekyll
|
||||||
# True if the document has a collection and if that collection's #write?
|
# True if the document has a collection and if that collection's #write?
|
||||||
# method returns true, and if the site's Publisher will publish the document.
|
# method returns true, and if the site's Publisher will publish the document.
|
||||||
# False otherwise.
|
# False otherwise.
|
||||||
|
#
|
||||||
|
# rubocop:disable Naming/MemoizedInstanceVariableName
|
||||||
def write?
|
def write?
|
||||||
return @write_p if defined?(@write_p)
|
return @write_p if defined?(@write_p)
|
||||||
|
|
||||||
@write_p = collection&.write? && site.publisher.publish?(self)
|
@write_p = collection&.write? && site.publisher.publish?(self)
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Naming/MemoizedInstanceVariableName
|
||||||
|
|
||||||
# The Document excerpt_separator, from the YAML Front-Matter or site
|
# The Document excerpt_separator, from the YAML Front-Matter or site
|
||||||
# default excerpt_separator value
|
# default excerpt_separator value
|
||||||
|
|
Loading…
Reference in New Issue