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