104 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
d0ad96a9b3
Fix audit_signing to check quarantine availability and attributes
Co-authored-by: bevanjkay <40621599+bevanjkay@users.noreply.github.com>
2025-08-14 19:09:57 +10: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
55f65ec375
audit: ensure that official formula and cask names don't conflict.
Co-authored-by: Eric Knibbe <enk3@outlook.com>
2025-06-23 16:08:13 +01:00
Rylan Polster
b242abfdf0
Fix cask API tests 2025-06-11 19:44:26 -04:00
Sam Ford
79e20b3512
Standardize livecheck block language formatting 2024-12-02 10:13:04 -05:00
Bevan Kay
5a39e1f238
test/cask/audit_spec: audit deprecate/disable reasons 2024-09-30 23:11:44 +10:00
Mike McQuaid
5b46ec70e9
cask/url: deprecate url do blocks.
We're removing these in
https://github.com/Homebrew/homebrew-cask/pull/186501
so let's deprecate them too.
2024-09-26 14:05:25 +01:00
Markus Reiter
3b4e1cb573
Share code between cask token and formula name audits. 2024-07-30 21:41:15 +02:00
Patrick Linnane
7aa10a13a4
brew style --fix
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-05-26 16:03:03 -07:00
Aaron Ruan
0778379501
change tests for auditing OSDN download urls 2024-05-27 00:34:08 +08:00
Razvan Azamfirei
0b0fcdcdd2
homebrew/cask-versions: remove 2024-05-02 16:59:33 -04:00
Michael Cho
85a08bcdc4
cask/audit: allow @ for versioned casks
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-03-09 12:20:27 -05:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Douglas Eichelberger
26eda5a303
git grep -l '^describe' | xargs gsed -i 's|^describe|RSpec.describe|g' 2024-02-19 13:57:27 +00:00
Douglas Eichelberger
2255b9d43d
Enable verify_partial_doubles 2024-02-19 13:57:27 +00:00
Markus Reiter
d42f419217
Don't use slashes when loading casks in tests. 2024-02-09 23:17:25 +01:00
Douglas Eichelberger
caf8259ae6 Code review changes 2023-12-27 15:29:33 -08:00
Douglas Eichelberger
3abbf4447e Some minor regexp match perf improvements 2023-12-27 13:16:36 -08:00
Rylan Polster
254fcf7c1f
Update livecheck test fixtures to use deprecate! and disable! 2023-12-17 16:31:04 -05:00
Bo Anderson
5692c8ecbf
Fix style violations under newer RuboCop 2023-12-14 05:47:12 +00:00
Mike McQuaid
79a6091d08
Cask#full_name: properly output Homebrew org names
This was not returning the full name correctly for e.g. anything in
Homebrew/homebrew-fonts.

While we're here, fix up a few other places where `tap.core_cask_tap?`
can be used more appropriately.
2023-12-13 13:17:12 +00:00
Mike McQuaid
22553cd34a
Fix cask sharding issues
- Fix cask info output being incorrect
- Improve some code referring to casks as formulae
- Move livecheck cask fixtures to not shadow existing names
- Adjust the cask tap symlinking logic to make handling outdated
  shadowed casks significantly easier
- Fix various flaky tests caused by casks sharding logic
- Prefer longer paths when there's multiple formulae or casks in a tap
  with the same name rather than always using the first
2023-08-10 16:08:47 +01:00
Mike McQuaid
7da934f7e2
Deprecate/disable/delete code.
The next release after this is merged will be 4.1.0.

Co-authored-by: Markus Reiter <me@reitermark.us>
2023-07-06 16:56:20 +01:00
Douglas Eichelberger
ec39fe7bb1
Merge pull request #15283 from dduugg/no-false-sigil
Remove `# typed: false` sigil in tests
2023-04-21 19:44:09 -07:00
Douglas Eichelberger
9075cbae62 brew style --fix 2023-04-21 09:58:50 -07:00
Douglas Eichelberger
ac1e6ded9a git grep -l '# typed: false' | xargs gsed -i 's|# typed: false||g' 2023-04-21 09:57:47 -07:00
apainintheneck
a2f9f89d30 cask/audit_spec: fix outdated test
We used the binary artifact as an example of an unsigned artifact
before in this test. Now that we're adding it as a signed artifact
the test has been updated with another example of an unsigned one.
2023-04-20 23:37:05 -07:00
Issy Long
d636d2de37
Apply suggestions from review comments
- Rename `strictish` to `strict_only` in `add_error` method.
- Return just `errors`, a Set, not `{ errors: errors }`, a Hash,
  from `Auditor.audit`.
2023-04-06 00:10:28 +01:00
Issy Long
df8e97fef6
Consolidate add_{warning,error} methods into one
- Specify `strictish: true` in `add_error` to specify that it's not a
  super big critical error.
- These will be shown only if `brew audit --strict` is requested.
2023-04-01 01:56:47 +01:00
Issy Long
2b8127d518
Turn cask warnings into errors when --strict is passed (or implied)
- Ignore them and don't show them otherwise.
- Part three of issue 15074:
  > As a result, I propose that all current cask audit warnings are never
  > displayed as warnings but the underlying audit checks turned into
  > errors displayed only with --strict (or one of the other relevant
  > flags).
2023-04-01 01:56:46 +01:00
Markus Reiter
bdd6523ce8
Deprecate appcast. 2023-03-30 03:29:06 +02:00
Issy Long
3a83b5492c
rubocop: Clean up Style/BlockDelimiters excludes and autofix offenses
- The defaults of using "do ... end" for multi-line blocks everywhere is
  good, better than switching everything to braces everywhere.
2023-03-08 23:54:22 +00:00
Markus Reiter
cd18703582
Add audit for versions containing colons or slashes. 2023-02-14 02:08:56 +01:00
Markus Reiter
b821a00bc5
Pass only and except to cask audits. 2023-02-08 08:38:32 +01:00
Alexander Regueiro
b2b7072fbe Permit multiple uninstall stanzas in casks (temp)
Longer-term solution is described [here](https://github.com/Homebrew/brew/issues/14365#issuecomment-1398214354).
2023-01-21 18:45:58 +00:00
Sean Molenaar
f049e90e41
audit_spec: style fix 2022-09-15 15:33:25 +02:00
Sean Molenaar
5697ca79b1
audit_spec: limit stanza check 2022-09-15 15:27:43 +02:00
Sean Molenaar
ff54095b8a
Cask: automatically add cask audits
This reverts commit 16618374653dc5461dd971e8ed1992188cc3803d.
2022-09-13 11:19:33 +02:00
Mike McQuaid
1661837465
Revert "Cask: automatically add cask audits" 2022-09-06 11:46:40 +01:00
Sean Molenaar
86f011cefb
Cask: automatically add cask audits 2022-08-29 11:28:20 +02:00
Sean Molenaar
e90371f8ab
cask: add audit for incorrect signing 2022-08-11 09:11:29 +02:00
Sam Ford
77273fe2b3
Cask::Audit: Handle referenced cask in livecheck
`Cask::Audit#check_livecheck_version` was never updated to handle
a referenced cask in a `livecheck` block (e.g., `cask "other-cask"`).
As a result, this audit will wrongly give an error like `Version
'1.2.3' differs from '' retrieved by livecheck.` in this scenario.

This commit ensures that a referenced cask is handled by the audit
and it won't error when the referenced check provides a good version.
2021-11-02 12:32:38 -04:00
Sam Ford
e8f803bc75
Cask::Audit: Handle livecheck skip conditions 2021-06-14 14:28:27 -04:00
Markus Reiter
ba87bfc4e4
Only suggest adding livecheck it auto-detection fails. 2021-04-07 19:19:20 +02:00
Markus Reiter
72a79d934e
Fix audit annotations for casks. 2021-04-03 04:27:32 +02:00
Markus Reiter
c07205caf2
Adjust audit spec. 2021-04-02 01:55:36 +02:00
Markus Reiter
f0ece0432d
Fix appcast spec. 2021-04-01 01:07:28 +02:00
Mike McQuaid
9b725a5851
cask/dsl/version: reject invalid characters.
There was a `invalid_characters` method already but it was not being
used.
2021-03-30 14:15:14 +01:00
Bo Anderson
a8522c6db6
test/cask/audit_spec: add test for slashes in versions 2021-03-17 14:25:50 +00:00
Cassidy Marble
267040e5df
bugfix: Add args and options to lazy url block 2021-03-12 10:26:59 -07:00