brew/Library/Homebrew/.rubocop.yml
Mike McQuaid d44d686cd5
dev-cmd: avoid uploading identical bottles.
If the `rebuild`, `root_url`, `cellar` and checksums are all identical
between an old and new bottle block: we don't need a new bottle at
all. Handle this by deleting the relevant files with
`brew bottle --merge --write` and gracefully notifying the caller of
`brew pr-upload`.

This should avoid e.g.
39340a11ea
occurring in future.
2021-04-29 14:48:45 +01:00

58 lines
1.1 KiB
YAML

inherit_from:
- ../.rubocop_rspec.yml
- .rubocop_todo.yml
# make rspec formatting more flexible
Layout/MultilineMethodCallIndentation:
Exclude:
- "**/*_spec.rb"
# `formula do` uses nested method definitions
Lint/NestedMethodDefinition:
Exclude:
- "test/**/*"
# TODO: Try to bring down all metrics maximums.
Metrics/AbcSize:
Max: 280
Metrics/BlockLength:
Max: 100
Exclude:
# TODO: extract more of the bottling logic
- "dev-cmd/bottle.rb"
- "test/**/*"
Metrics/BlockNesting:
Max: 5
Metrics/ClassLength:
Max: 800
Exclude:
- "formula.rb"
- "formula_installer.rb"
Metrics/CyclomaticComplexity:
Max: 80
Metrics/PerceivedComplexity:
Max: 90
Metrics/MethodLength:
Max: 260
Metrics/ModuleLength:
Max: 500
Exclude:
# TODO: extract more of the bottling logic
- "dev-cmd/bottle.rb"
- "test/**/*"
Naming/PredicateName:
# Can't rename these.
AllowedMethods:
- is_a?
- is_32_bit?
- is_64_bit?
Style/HashAsLastArrayItem:
Exclude:
- "test/utils/spdx_spec.rb"
Style/BlockDelimiters:
BracesRequiredMethods:
- "sig"