11 Commits

Author SHA1 Message Date
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