2018-11-12 04:46:47 +01:00
|
|
|
inherit_from: ./.rubocop_shared.yml
|
2017-01-18 15:54:47 +05:30
|
|
|
|
2018-09-02 20:14:54 +01:00
|
|
|
# enable all formulae audits
|
2017-07-18 19:10:12 +05:30
|
|
|
FormulaAudit:
|
2017-05-24 00:08:31 +05:30
|
|
|
Enabled: true
|
|
|
|
|
|
2018-09-02 20:14:54 +01:00
|
|
|
# enable all formulae strict audits
|
2017-07-18 19:10:12 +05:30
|
|
|
FormulaAuditStrict:
|
2017-05-22 13:09:49 +05:30
|
|
|
Enabled: true
|
|
|
|
|
|
2018-09-02 20:14:54 +01:00
|
|
|
# disable all formulae strict audits by default
|
2017-07-18 19:10:12 +05:30
|
|
|
NewFormulaAudit:
|
|
|
|
|
Enabled: false
|
2017-06-30 11:43:47 +05:30
|
|
|
|
2018-11-02 17:17:35 +00:00
|
|
|
# make our hashes consistent
|
2019-11-28 15:10:50 +00:00
|
|
|
Layout/HashAlignment:
|
2018-11-02 17:17:35 +00:00
|
|
|
EnforcedHashRocketStyle: table
|
|
|
|
|
EnforcedColonStyle: table
|
|
|
|
|
|
2017-05-28 16:59:53 +01:00
|
|
|
# `system` is a special case and aligns on second argument
|
2019-11-28 15:10:50 +00:00
|
|
|
Layout/ArgumentAlignment:
|
2016-09-18 14:27:09 +01:00
|
|
|
Enabled: false
|
2016-09-25 02:41:14 +02:00
|
|
|
|
2018-09-02 20:14:54 +01:00
|
|
|
# favour parens-less DSL-style arguments
|
|
|
|
|
Lint/AmbiguousOperator:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
|
|
# this is a bit less "floaty"
|
2017-05-28 16:59:53 +01:00
|
|
|
Layout/CaseIndentation:
|
|
|
|
|
EnforcedStyle: end
|
2016-09-18 14:27:09 +01:00
|
|
|
|
2018-09-02 20:14:54 +01:00
|
|
|
# this is a bit less "floaty"
|
2018-03-05 11:46:38 +00:00
|
|
|
Layout/EndAlignment:
|
2018-09-02 20:14:54 +01:00
|
|
|
EnforcedStyleAlignWith: start_of_line
|
2016-09-25 02:41:14 +02:00
|
|
|
|
2017-05-28 16:59:53 +01:00
|
|
|
# conflicts with DSL-style path concatenation with `/`
|
|
|
|
|
Layout/SpaceAroundOperators:
|
2016-09-18 14:27:09 +01:00
|
|
|
Enabled: false
|
|
|
|
|
|
2018-09-18 10:30:59 +10:00
|
|
|
# Auto-correct is broken (https://github.com/rubocop-hq/rubocop/issues/6258)
|
|
|
|
|
# and layout is not configurable (https://github.com/rubocop-hq/rubocop/issues/6254).
|
|
|
|
|
Layout/RescueEnsureAlignment:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
2018-09-02 20:14:54 +01:00
|
|
|
# favour parens-less DSL-style arguments
|
|
|
|
|
Lint/AmbiguousBlockAssociation:
|
2016-09-18 14:27:09 +01:00
|
|
|
Enabled: false
|
2016-09-25 02:41:14 +02:00
|
|
|
|
2017-05-28 16:59:53 +01:00
|
|
|
# so many of these in formulae and can't be autocorrected
|
2018-09-02 20:14:54 +01:00
|
|
|
# TODO: fix these as `ruby -w` complains about them.
|
2016-09-18 14:27:09 +01:00
|
|
|
Lint/AmbiguousRegexpLiteral:
|
|
|
|
|
Enabled: false
|
2016-09-25 02:41:14 +02:00
|
|
|
|
2017-05-28 16:59:53 +01:00
|
|
|
# assignment in conditions are useful sometimes
|
2018-09-02 20:14:54 +01:00
|
|
|
# TODO: add parentheses for these and remove
|
2016-09-18 14:27:09 +01:00
|
|
|
Lint/AssignmentInCondition:
|
|
|
|
|
Enabled: false
|
2016-09-25 02:41:14 +02:00
|
|
|
|
2018-09-02 20:14:54 +01:00
|
|
|
# we output how to use interpolated strings too often
|
|
|
|
|
Lint/InterpolationCheck:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
2017-05-28 16:59:53 +01:00
|
|
|
# so many of these in formulae and can't be autocorrected
|
2016-09-18 14:27:09 +01:00
|
|
|
Lint/ParenthesesAsGroupedExpression:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
2017-10-26 16:06:29 +01:00
|
|
|
# most metrics don't make sense to apply for formulae/taps
|
2017-05-28 16:59:53 +01:00
|
|
|
Metrics/AbcSize:
|
2017-10-26 15:52:14 +01:00
|
|
|
Enabled: false
|
2017-05-28 16:59:53 +01:00
|
|
|
Metrics/ClassLength:
|
2017-10-26 15:52:14 +01:00
|
|
|
Enabled: false
|
2017-05-28 16:59:53 +01:00
|
|
|
Metrics/CyclomaticComplexity:
|
2017-10-26 15:52:14 +01:00
|
|
|
Enabled: false
|
2018-09-02 20:14:54 +01:00
|
|
|
Metrics/MethodLength:
|
|
|
|
|
Enabled: false
|
2018-12-03 13:23:20 +01:00
|
|
|
Metrics/ModuleLength:
|
|
|
|
|
Enabled: false
|
2018-09-02 20:14:54 +01:00
|
|
|
Metrics/PerceivedComplexity:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
|
|
# GitHub diff UI wraps beyond 118 characters (so that's the goal)
|
2017-05-28 16:59:53 +01:00
|
|
|
Metrics/LineLength:
|
2018-10-13 18:45:39 -07:00
|
|
|
Max: 170
|
2017-10-26 16:06:29 +01:00
|
|
|
# ignore manpage comments and long single-line strings
|
|
|
|
|
IgnoredPatterns: ['#: ', ' url "', ' mirror "', ' plist_options :']
|
2016-09-25 02:41:14 +02:00
|
|
|
|
2018-09-02 20:14:54 +01:00
|
|
|
# our current conditional style is established
|
|
|
|
|
# TODO: enable this when possible
|
2016-09-25 02:41:14 +02:00
|
|
|
Style/ConditionalAssignment:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
2017-05-28 16:59:53 +01:00
|
|
|
# most of our APIs are internal so don't require docs
|
2016-09-25 02:41:14 +02:00
|
|
|
Style/Documentation:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
2019-04-19 15:21:16 +09:00
|
|
|
# don't want this for formulae but re-enabled for Library/Homebrew
|
2018-09-02 20:14:54 +01:00
|
|
|
Style/FrozenStringLiteralComment:
|
2017-05-28 16:59:53 +01:00
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
|
|
# so many of these in formulae and can't be autocorrected
|
2016-10-01 12:13:09 +01:00
|
|
|
Style/GuardClause:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
2016-10-22 13:32:46 +01:00
|
|
|
# depends_on a: :b looks weird in formulae.
|
2016-10-01 12:13:09 +01:00
|
|
|
Style/HashSyntax:
|
|
|
|
|
EnforcedStyle: hash_rockets
|
2018-12-03 13:23:20 +01:00
|
|
|
Exclude:
|
2019-01-21 13:39:11 +00:00
|
|
|
- '**/Guardfile'
|
|
|
|
|
- '**/cmd/**/*.rb'
|
|
|
|
|
- '**/lib/**/*.rb'
|
|
|
|
|
- '**/spec/**/*.rb'
|
2016-09-25 02:41:14 +02:00
|
|
|
|
|
|
|
|
# ruby style guide favorite
|
|
|
|
|
Style/StringLiterals:
|
|
|
|
|
EnforcedStyle: double_quotes
|
2016-09-18 14:27:09 +01:00
|
|
|
|
2016-09-25 02:41:14 +02:00
|
|
|
# consistency with above
|
|
|
|
|
Style/StringLiteralsInInterpolation:
|
|
|
|
|
EnforcedStyle: double_quotes
|
2017-05-28 16:59:53 +01:00
|
|
|
|
2018-09-02 20:14:54 +01:00
|
|
|
# make things a bit easier to read
|
2016-09-21 15:14:15 +02:00
|
|
|
Style/TernaryParentheses:
|
2017-05-28 16:59:53 +01:00
|
|
|
EnforcedStyle: require_parentheses_when_complex
|
2016-09-21 15:14:15 +02:00
|
|
|
|
2018-09-02 20:14:54 +01:00
|
|
|
# messes with existing plist/caveats style
|
|
|
|
|
Style/TrailingBodyOnMethodDefinition:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
|
|
# a bit confusing to non-Rubyists but useful for longer arrays
|
2016-09-25 02:41:14 +02:00
|
|
|
Style/WordArray:
|
2017-05-28 16:59:53 +01:00
|
|
|
MinSize: 4
|