rubocop: adjust rules.
This commit is contained in:
parent
db121c7b17
commit
4498303f9a
@ -21,10 +21,6 @@ Layout/HashAlignment:
|
|||||||
Layout/ArgumentAlignment:
|
Layout/ArgumentAlignment:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# favour parens-less DSL-style arguments
|
|
||||||
Lint/AmbiguousOperator:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# this is a bit less "floaty"
|
# this is a bit less "floaty"
|
||||||
Layout/CaseIndentation:
|
Layout/CaseIndentation:
|
||||||
EnforcedStyle: end
|
EnforcedStyle: end
|
||||||
@ -37,8 +33,7 @@ Layout/EndAlignment:
|
|||||||
Layout/SpaceAroundOperators:
|
Layout/SpaceAroundOperators:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Auto-correct is broken (https://github.com/rubocop-hq/rubocop/issues/6258)
|
# layout is not configurable (https://github.com/rubocop-hq/rubocop/issues/6254).
|
||||||
# and layout is not configurable (https://github.com/rubocop-hq/rubocop/issues/6254).
|
|
||||||
Layout/RescueEnsureAlignment:
|
Layout/RescueEnsureAlignment:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
@ -51,15 +46,6 @@ Lint/AmbiguousBlockAssociation:
|
|||||||
Lint/AmbiguousRegexpLiteral:
|
Lint/AmbiguousRegexpLiteral:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# assignment in conditions are useful sometimes
|
|
||||||
# TODO: add parentheses for these and remove
|
|
||||||
Lint/AssignmentInCondition:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# we output how to use interpolated strings too often
|
|
||||||
Lint/InterpolationCheck:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# so many of these in formulae and can't be autocorrected
|
# so many of these in formulae and can't be autocorrected
|
||||||
Lint/ParenthesesAsGroupedExpression:
|
Lint/ParenthesesAsGroupedExpression:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
@ -84,11 +70,6 @@ Layout/LineLength:
|
|||||||
# ignore manpage comments and long single-line strings
|
# ignore manpage comments and long single-line strings
|
||||||
IgnoredPatterns: ['#: ', ' url "', ' mirror "', ' plist_options :']
|
IgnoredPatterns: ['#: ', ' url "', ' mirror "', ' plist_options :']
|
||||||
|
|
||||||
# our current conditional style is established
|
|
||||||
# TODO: enable this when possible
|
|
||||||
Style/ConditionalAssignment:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# most of our APIs are internal so don't require docs
|
# most of our APIs are internal so don't require docs
|
||||||
Style/Documentation:
|
Style/Documentation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
@ -97,7 +78,7 @@ Style/Documentation:
|
|||||||
Style/FrozenStringLiteralComment:
|
Style/FrozenStringLiteralComment:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# so many of these in formulae and can't be autocorrected
|
# potential for errors in formulae too high with this
|
||||||
Style/GuardClause:
|
Style/GuardClause:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
@ -110,6 +91,14 @@ Style/HashSyntax:
|
|||||||
- '**/lib/**/*.rb'
|
- '**/lib/**/*.rb'
|
||||||
- '**/spec/**/*.rb'
|
- '**/spec/**/*.rb'
|
||||||
|
|
||||||
|
# autocorrectable and more readable
|
||||||
|
Style/HashEachMethods:
|
||||||
|
Enabled: true
|
||||||
|
Style/HashTransformKeys:
|
||||||
|
Enabled: true
|
||||||
|
Style/HashTransformValues:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
# ruby style guide favorite
|
# ruby style guide favorite
|
||||||
Style/StringLiterals:
|
Style/StringLiterals:
|
||||||
EnforcedStyle: double_quotes
|
EnforcedStyle: double_quotes
|
||||||
|
|||||||
@ -22,6 +22,10 @@ Layout/MultilineMethodCallIndentation:
|
|||||||
Lint/AmbiguousRegexpLiteral:
|
Lint/AmbiguousRegexpLiteral:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
# TODO: add parentheses for these and remove
|
||||||
|
Lint/AssignmentInCondition:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# `formula do` uses nested method definitions
|
# `formula do` uses nested method definitions
|
||||||
Lint/NestedMethodDefinition:
|
Lint/NestedMethodDefinition:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|||||||
@ -27,10 +27,10 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
update_path
|
update_path
|
||||||
if @version
|
@version = if @version
|
||||||
@version = Version.create(@version)
|
Version.create(@version)
|
||||||
else
|
else
|
||||||
@version = Version.detect(url, {})
|
Version.detect(url, {})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user