Remove `testbottest` formula (this should have lived in the `brew
test-bot` repository from the outset) and make various other changes to
fix the Linux build here.
This requires updating to Rubocop 0.49.0 which will require some fixes
to rules, in Homebrew/brew and Homebrew/homebrew-core but opening this
for now so I remember.
Don't try to `fetch --depth=1` unless we've confirmed the repository is
already shallow. Otherwise this can discard history from a full clone.
Additionally, if the repository wasn't shallow but there's no tags found
assume that Git is too old and try a naive sort if on Linux where `sort`
is able to sort versions.
- The regexp for the "check if formula name is used in formula's
description" cop matches every instance of the formula name if it
exists, whether it's in a word or not.
- For example, the formula `mon` has the description "Monitor
hosts/services/whatever and alert about problems". This makes
`brew audit --strict` complain because it matches "Monitor",
which isn't the formula name! The formula `pass` has the description
"Password manager". Again, the strict audit matches "Password",
which isn't an issue.
- Instead, this change matches on a word boundary, so it will match
`mon:`, or `mon `, but not "Monitor", or, for example, "harmony".
- I've changed the tests to account for this change.
Improve the messaging around `brew install` when there's a possible user
action such as an `upgrade` or `link` and don't tell people to
`install --force` when it's unnecessary.
While I did this, tweak the output and function usage in a couple of
related places.
Some example output before this change:
```
Warning: openssl is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: mysql@5.6 is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: analog-6.0_1 already installed
Warning: bash-completion@2-2.5 already installed, it's just not linked.
```
Some example output after this change:
```
Error: openssl 1.0.2k is already installed
To upgrade to 1.0.2l, run `brew upgrade openssl`
Warning: mysql@5.6 5.6.36_1 is already installed
Warning: analog 6.0_1 is already installed
Warning: bash-completion@2 2.5 is already installed, it's just not linked.
You can use `brew link bash-completion@2` to link this version.
```
Ruby first gained flock in 1.8.7, which is a problem since we're using
this lock utility in `vendor-install` in order to install a newer Ruby.
Fortunately, Python 2.3(!) has flock support.