18 Commits

Author SHA1 Message Date
Issy Long
577aec3f60
Encourage using a default branch for HEAD core formulae
- We don't mind if third-party taps have non-default HEAD branches - they have their reasons.
- But we want -core to be consistent, hence why there's the allowlist file.
- https://github.com/Homebrew/brew/pull/20402#discussion_r2292366323
2025-08-26 14:26:11 +02:00
Eric Knibbe
827480f06b
messages/comments: wording fixes 2025-08-16 00:57:59 -04:00
Issy Long
d0e9a2d7d6
Always suggest a HEAD branch name if we can find one
- If a HEAD branch name isn't specified at all, then the user probably
  wants to shortcut adding one by being told what the default branch for
  the repo is. Otherwise they have to click the URL, look at the GitHub
  UI, then type the branch name into `branch: "foo"` syntax.
2025-08-11 13:46:49 +01:00
Issy Long
37eaed5bb7
Ensure that head Git URLs always specify a branch
- There's a TODO on the "someday" list [1] to ensure that `head` Git
  URLs always specify a branch.
- So I thought I'd automate this worry by adding an audit.
- Since `resource` block URLs tend to be pinned to SHAs, if indeed
  they are Git URLs, this audit only applies to `head` URLs.

[1]: https://github.com/orgs/Homebrew/projects/5?pane=issue&itemId=98789749
2025-08-10 20:28:50 +01:00
botantony
5450e730ed
Audit no_autobump! reason for new packages
Signed-off-by: botantony <antonsm21@gmail.com>
2025-07-17 17:12:33 +02:00
Mike McQuaid
e9f55a8f71
tests: default to API mode enabled.
While we're here, also add `brew tests --no-parallel` which I relied
on during testing.

Pretty much anywhere we rely on a stubbed formula on disk to work: we
need to disable the API.
2025-06-10 15:53:27 +01:00
Eric Knibbe
cd6777fc73
audits: quote and reword problem description text 2025-05-30 23:49:26 -04:00
Bevan Kay
1c5bfa3d80
test/formula_auditor_spec: audit deprecate/disable reasons 2024-09-30 23:11:44 +10:00
Michael Cho
a618512d7a
formula_auditor: make deprecate license check non-strict in core
Also add some more incompatible licenses. These are all not allowed by
Fedora and have are classified as not OSI and FSF approved on SPDX.
2024-09-04 13:21:40 -04:00
apainintheneck
a3e917afe1 Refactor method to remove extra tap requires
We were selectively requiring the tap.rb file in a few places for
performance reasons. The main method we were referencing was the
`Tap.cmd_directories` method which uses `Pathname` and the `TAP_DIRECTORY`
constant internally. `Tap.cmd_directories` is mostly used in the `Commands`
module and that is loaded very early on in the program so it made sense
to move that command to that module. To facilitate that I moved the
`TAP_DIRECTORY` constant to the top-level and renamed it to
`HOMEBREW_TAP_DIRECTORY`. It now lies in the tap_constants.rb file.

A nice bonus of this refactor is that it speeds up loading external
commands since the tap.rb file is no longer required by default in
those cases.
2024-08-10 13:49:10 -07:00
Markus Reiter
3b4e1cb573
Share code between cask token and formula name audits. 2024-07-30 21:41:15 +02:00
William Woodruff
fdabfd15dc
formula_auditor_spec: add wheel resource test
Signed-off-by: William Woodruff <william@yossarian.net>
2024-07-14 13:19:36 -04:00
John Bampton
f6ee19239d Fix spelling; Github -> GitHub 2024-06-15 19:08:53 +10:00
Issy Long
9f915a6a62
Replace FormulaTextAuditor usage
- Only two audits were using this: `audit_keg_only_reason` and `audit_text`,
  and they weren't using any of its text processing methods, so there's little
  reason to keep it around.
- The "`keg_only_reason` shouldn't contain 'HOMEBREW_PREFIX'" audit can easily
  be replaced with a RuboCop since that's "just" text parsing.
- The "tests should invoke binaries with `bin/<command>`" audit had to stay as
  a FormulaAudit because it requires accessing attributes about the Formula
  like its name, aliases, which RuboCop can't get to, but it was easy to move the
  singular "read the text in the file" line from `FormulaTextAuditor`.
2024-05-04 22:14:55 +01:00
Michael Cho
2d50ef1bc0
formula_auditor: check livecheck throttle
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-04-01 00:54:13 -04:00
Douglas Eichelberger
fde7d380f7 Don't include FileUtils everywhere 2024-03-30 19:10:56 -07:00
Douglas Eichelberger
330d209e03 Set ivars directly 2024-03-30 13:50:39 -07:00
Douglas Eichelberger
03b815df82 Enable and fix RSpec/DescribedClassModuleWrapping 2024-03-30 11:29:34 -07:00