This is really, really slow at the moment for a few reasons:
- it goes through the list of revisions twice
- it checks many more revisions than it needs to
Even after these improvements it's still by far the slowest audit so
am also making it a `--git` only audit.
Additionally, to further improve default `brew audit` performance do not
run `brew style` checks when doing `brew audit` with no arguments.
`brew style` can be run quickly and efficiently on all of a tap (and is
cached) so no need to duplicate it here.
- Depending on context, I've gone for either "denylist" or "disallow"
here. "Disallow" for things in sentences, or actions, and "denylist"
for list of things.
```
➜ brew audit --online --new-formula --verbose turbogit
turbogit:
* GitHub repository not notable enough (<30 forks, <30 watchers and <75 stars)
* GitHub repository too new (<30 days old)
Error: undefined local variable or method `created_pr_comment' for Homebrew:Module
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:148:in `audit'
/usr/local/Homebrew/Library/Homebrew/brew.rb:110:in `<main>'
```
- This was removed in 4f75a77b089e65ff9e03c65d192808aa4ea6842f. We can't
post PR comments from GitHub Actions CI from forks.
- [For a formula named
turbogit](https://github.com/Homebrew/homebrew-core/pull/55208), we
didn't see any of the notability checks fail CI.
- The repo name was getting truncated to `turb`, which didn't exist, so
the audit didn't return anything for this check.
- The Regexp to strip `.git` from the end of was not escaping the `.`,
so it would match anything ending in `git`, not a literal `.git`.
This will allow `brew style` and `brew audit` to be run separately
without providing duplicates.
Additionally, run RuboCop style rules when `--strict` isn't provided and
remove a confusing reference to `style`.
This reverts commit 081f6cdcd514396b1d396ce7d0eb40291a1a317c, reversing
changes made to 12d3a2a2d269e0a26565eb3e63552803f826f366.
This fails on some formulae with:
Error: Not Found
See:
https://github.com/Homebrew/homebrew-core/pull/52031