- Change name of rubocop warning
- Disable linting on remaining offending lines
- Add todos to move lines with disabled linting
checks to extend/os in the future
- As I was looking through the RuboCop configs for
`Naming/MethodParameterName`, since there was a fairly long-standing
TODO here, I found that in the default RuboCop configs the method
names `to` and `io` are
[allowed by default](41a8249b35/config/default.yml (L2794)).
- But we weren't inheriting those allowed names correctly from the
default configuration. This fixes that so that we get future
enhancements automatically for this particular cop allowlist.
- The usage in the `xmlsectool` formula went away in
76618ad7fc.
- If I revert the changes in that commit and run
`brew style --only="Naming/InclusiveLanguage" xmlsectool`, RuboCop reports an
offense and suggests an alternative term.
The " was for a previous syntax we had, but we dropped that and changed our minds.
This PR fixes the style check for the current implementation of the new bottle blocks.
- rename to `homebrew_bootsnap.rb` to avoid conflicting with the
`bootsnap.rb` we need to `require`
- if the `require` fails: run bundler (until we vendor this gem)
> Bootsnap is a library that plugs into Ruby, with optional support
> for ActiveSupport and YAML, to optimize and cache expensive
> computations.
https://github.com/Shopify/bootsnap
For our case that translates to "repeated calls to `brew` have
reductions in the time spend `require`ing speeding up the process
boot time".
For example:
```
$ hyperfine --warmup=2 "unset HOMEBREW_BOOTSNAP; brew info wget" "export HOMEBREW_BOOTSNAP=1; brew info wget"
Benchmark #1: unset HOMEBREW_BOOTSNAP; brew info wget
Time (mean ± σ): 2.417 s ± 0.032 s [User: 659.0 ms, System: 855.5 ms]
Range (min … max): 2.382 s … 2.464 s 10 runs
Benchmark #2: export HOMEBREW_BOOTSNAP=1; brew info wget
Time (mean ± σ): 1.862 s ± 0.064 s [User: 425.3 ms, System: 566.8 ms]
Range (min … max): 1.736 s … 1.952 s 10 runs
Summary
'export HOMEBREW_BOOTSNAP=1; brew info wget' ran
1.30 ± 0.05 times faster than 'unset HOMEBREW_BOOTSNAP; brew info wget'
```