diff options
| author | Mike McQuaid | 2016-09-24 20:48:03 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-09-24 20:48:03 +0100 |
| commit | e767fd3df9d179fca0445cc0bc0fdc061ad857d6 (patch) | |
| tree | 93e9db33313b36eebe7d7fb3aedf0f92cc2c3918 /Library/.rubocop_rules.yml | |
| parent | 7fc241765e3654718235791c32e5638bf7f8e15a (diff) | |
| parent | 232078df57418004bb9bf7abef877e734fcf7005 (diff) | |
| download | brew-e767fd3df9d179fca0445cc0bc0fdc061ad857d6.tar.bz2 | |
Merge branch 'master' into mkdir_with_intermediates
Diffstat (limited to 'Library/.rubocop_rules.yml')
| -rw-r--r-- | Library/.rubocop_rules.yml | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/Library/.rubocop_rules.yml b/Library/.rubocop_rules.yml index cde310930..543dc4018 100644 --- a/Library/.rubocop_rules.yml +++ b/Library/.rubocop_rules.yml @@ -1,4 +1,3 @@ - # ruby style guide favorite Style/StringLiterals: EnforcedStyle: double_quotes @@ -7,17 +6,30 @@ Style/StringLiterals: Style/StringLiteralsInInterpolation: EnforcedStyle: double_quotes +# only for numbers >= 1_000_000 +Style/NumericLiterals: + MinDigits: 7 + +# zero-prefixed octal literals are just too widely used (and mostly understood) +Style/NumericLiteralPrefix: + EnforcedOctalStyle: zero_only + # percent-x is allowed for multiline Style/CommandLiteral: EnforcedStyle: mixed +# depends_on foo: :bar looks rubbish +Style/HashSyntax: + EnforcedStyle: ruby19 + Exclude: + - 'Taps/**/*' + # paths abound, easy escape Style/RegexpLiteral: EnforcedStyle: slashes -# too prevalent to change this now, but might be discussed/changed later Style/Alias: - EnforcedStyle: prefer_alias_method + EnforcedStyle: prefer_alias # our current conditional style is established, clear and # requiring users to change that now would be confusing. @@ -58,14 +70,6 @@ Lint/ParenthesesAsGroupedExpression: Style/EmptyLineBetweenDefs: AllowAdjacentOneLineDefs: true -# port numbers and such tech stuff -Style/NumericLiterals: - Enabled: false - -# zero-prefixed octal literals are just too widely used (and mostly understood) -Style/NumericLiteralPrefix: - EnforcedOctalStyle: zero_only - # consistency and readability when faced with string interpolation Style/PercentLiteralDelimiters: PreferredDelimiters: @@ -93,15 +97,25 @@ Style/AlignParameters: # counterproductive in formulas, notably within the install method Style/GuardClause: - Enabled: false + Exclude: + - 'Taps/**/*' Style/IfUnlessModifier: + Exclude: + - 'Taps/**/*' + +# TODO: enforce when rubocop has fixed this +# https://github.com/bbatsov/rubocop/issues/3516 +Style/VariableNumber: + Enabled: false + +# TODO: enforce when rubocop has shipped this +# https://github.com/bbatsov/rubocop/pull/3513 +Style/TernaryParentheses: Enabled: false # dashes in filenames are typical -# TODO: enforce when rubocop has fixed this -# https://github.com/bbatsov/rubocop/issues/1545 Style/FileName: - Enabled: false + Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/ # no percent word array, being friendly to non-ruby users # TODO: enforce when rubocop has fixed this @@ -134,6 +148,7 @@ Style/MethodName: Style/PredicateName: Exclude: - 'Homebrew/compat/**/*' + NameWhitelist: is_32_bit?, is_64_bit? # `formula do` uses nested method definitions Lint/NestedMethodDefinition: |
