Another look at the current Rubocop rules and how they fit with our
existing and desired future style. Almost all of these changes were
automatic. Split some rules between formulae/brew where brew doesn't
have millions of cases that need fixed.
Changes to our style configuration:
- Consolidate all rules related to Ruby 1.8 compatibility in one place.
- Codify our de-facto preference for `alias_method` over `alias` (drops
offense count by 54 after turning this on).
- Drop `Style/SignalException` as `only_raise` has been the new default
for quite a while (since RuboCop 0.37.0).
Tweak `Style/NumericLiteralPrefix` cop settings as we're using octal
literals a lot (both in formulae and the package manager) for file
permissions and aren't ready just yet to transition them to the more
beginner-friendly `0o` prefix (instead of the more obscure `0` prefix).
This collects all violations for each formula in a single place, instead
of doing `brew style` outputs for all formulae first, and then the other
audit checks.
Closes#112.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
Stop using Style/TrailingComma as it is no longer recognized and start using
Style/TrailingCommaInArguments and Style/TrailingCommaInLiteral instead.
ClosesHomebrew/homebrew#48144.
Signed-off-by: Xu Cheng <xucheng@me.com>