641 Commits

Author SHA1 Message Date
Mike McQuaid
d8a5e467e8
audit: quieten down and make casks audit consistent with formulae.
The current casks audit is very noisy in the no-op case (i.e. no errors)
https://github.com/Homebrew/brew/pull/10234/checks?check_run_id=1655630568#step:15:7

This means when there are errors and you're querying all casks it's
pretty hard to quickly identify the problems.

This commit silences the `passing`, `warning` and header/summary output
when you're querying all casks (rather than a specific cask or tap).

This is more consistent with `brew audit` for formulae which is silent
unless there are audit failures.
2021-01-07 13:31:14 +00:00
hyuraku
0a97cd18a5 set default args 2020-12-17 21:14:18 +09:00
hyuraku
7be216fcbe change function name 2020-12-17 21:07:43 +09:00
hyuraku
d7f9bb6247 add function to define path 2020-12-17 21:07:43 +09:00
Issy Long
c784d9b955
dev-cmd/audit: Fix "undefined method audit_exceptions"
- When running `brew audit` on formulae that aren't in a Homebrew tap
  location (ie, in a directory outside of
  `/usr/local/Homebrew/Library/Taps`), `brew audit` falls over because
  it can't determine which tap a formula is in.
2020-11-21 20:24:34 +00:00
Markus Reiter
9bfbeace54 Fix corrected_problem_count and new_formula_problem_lines. 2020-11-18 18:37:53 +01:00
Markus Reiter
873b2a0042 Fix brew audit --tap=<tap>. 2020-11-18 18:29:20 +01:00
Markus Reiter
24cef5c2ce Support casks in brew audit. 2020-11-18 13:21:49 +01:00
Markus Reiter
dc11f02e16 Move auditor classes into separate files. 2020-11-18 11:22:27 +01:00
Markus Reiter
04272f5f68 Move TapAuditor into separate file. 2020-11-18 10:25:32 +01:00
Dustin Rodrigues
d26567a65d audit: allow checksum to be added/removed when changing download scheme 2020-11-17 08:02:55 -05:00
EricFromCanada
f784b7107f manpage: fixes for grammar 2020-11-16 07:56:50 -05:00
Jonathan Chang
e547e3aba9 audit: don't error on old OS X versions 2020-11-15 17:18:32 +11:00
Markus Reiter
78f1761802
Merge pull request #8956 from reitermarkus/sorbet
Add more type signatures.
2020-11-13 16:14:35 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Dustin Rodrigues
ba0699a8d7 audit: only flag if checksum changes when version and full url stay the same 2020-11-11 23:12:58 -05:00
Rylan Polster
e05b0fc7f5
Merge pull request #9092 from Rylan12/fix-checksum-audit
audit: fix checksum audit
2020-11-10 15:28:26 -05:00
Dustin Rodrigues
a8a83d1f24 dev-cmd/audit: only go back in git history until revision or version changes 2020-11-09 22:04:25 -05:00
Rylan Polster
59b1309900
Merge pull request #9039 from Rylan12/move-audit-allowlist-to-core
audit: migrate throttle list to Homebrew/core
2020-11-09 15:14:06 -05:00
Mike McQuaid
93362547c9
dev-cmd/audit: don't do dependency checks on Linux.
Alternate approach to #9091 for
https://github.com/Homebrew/homebrew-core/pull/64423
2020-11-09 16:26:44 +00:00
Rylan Polster
8a58dc09cd audit: fix checksum audit 2020-11-09 09:44:03 -05:00
Rylan Polster
4ae72e0bdf tap: add constants for json files 2020-11-09 08:39:56 -05:00
Rylan Polster
b4d4f6d504 audit: require JSON arrays/objects for audit exceptions 2020-11-06 12:33:28 -05:00
Rylan Polster
f2f2de6ff0 audit: cleanup and only check certain JSON files 2020-11-06 11:23:11 -05:00
Rylan Polster
fe95b23736 audit: refactor tap_audit_exception method 2020-11-06 10:49:21 -05:00
Rylan Polster
2d76e830a8 audit: always run and don't fail after tap audits 2020-11-06 10:12:09 -05:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
EricFromCanada
dddfbf80fc apidoc: add/update yard tags 2020-11-06 00:16:35 -05:00
Rylan Polster
2a941ec6b1 audit, tap: incorporate suggestions from code review 2020-11-05 16:14:09 -05:00
Rylan Polster
089810709c audit: add tap_audit_exceptions attribute 2020-11-05 09:27:06 -05:00
Mike McQuaid
c4fc81b26b
audit: tweak versioned formulae logic (again).
References https://github.com/Homebrew/brew/pull/9027#issuecomment-722042589
2020-11-05 10:28:02 +00:00
Rylan Polster
6171b51a82 audit: migrate VERSIONED_HEAD_SPEC_ALLOWLIST to Homebrew/core 2020-11-05 01:43:01 -05:00
Rylan Polster
fe1c7c16b0 audit: add tap audits for audit exceptions 2020-11-05 01:25:13 -05:00
Rylan Polster
e1f463ff26 audit: use name tap_audit_exceptions 2020-11-04 23:42:42 -05:00
Rylan Polster
55e86125a6 audit: don't fail if exception list doesn't exist 2020-11-03 14:38:44 -05:00
Rylan Polster
869941bccd audit: migrate throttle list to Homebrew/core 2020-11-03 13:06:33 -05:00
Mike McQuaid
bd7969c2b2
audit: fix non-core versioned formulae handling/
Fixes issue mentioned in #9016.
2020-11-02 11:25:51 +00:00
Jonathan Chang
006fd4985f audit: fdroidserver can have mixed python versions 2020-11-01 15:00:10 +11:00
FX Coudert
be4723fac8
Allow both python@3.8 and python@3.9 2020-10-25 13:19:00 +01:00
FX Coudert
672bb870ef
Make python@3.9 the main formula 2020-10-24 01:05:36 +02:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid
e60e41d548
audit: allow Linux checking Homebrew dependencies.
This applies to linuxbrew-core rather than Linux, really.
2020-10-09 13:06:09 +01:00
Mike McQuaid
548c6ef62d
audit: check versioned dependency conflicts.
We don't want to have a formula depending on e.g. both `python@3.8` and
`python@3.9` in the same dependency tree (generally).

As this isn't a blanket rule: add an allowlist with the expectation that
we'll need to use it.
2020-10-09 12:14:47 +01:00
Dustin Rodrigues
ea57ef794e audit: remove python 3.9 from unstable allowlist 2020-10-05 20:49:40 -04:00
Dustin Rodrigues
9f9ec0dcc6 audit: remove legit version exception 2020-10-05 10:04:15 -04:00
Dustin Rodrigues
15fca9661d audit: temporarily allow redundant version for legit 2020-10-05 08:44:03 -04:00
Jonathan Chang
187b56304b
Merge pull request #8631 from chenrui333/include-micropython-homepage-to-cert-error-allow-list
audit: allowlist some formulae homepage cert issues
2020-09-21 23:45:03 +10:00
Dustin Rodrigues
04504d119a audit: temporarily allow python3.9 rc 2020-09-17 07:59:45 -04:00
Markus Reiter
1c04ba7e4d
Merge pull request #8684 from reitermarkus/audit-annotations
Output annotations for `brew audit`.
2020-09-13 02:39:55 +02:00
Mike McQuaid
fb4d08a49a Fix brew style 2020-09-11 10:29:22 +01:00