32 Commits

Author SHA1 Message Date
Natalie Weizenbaum
da624b2f3c
Don't require "branch: main" for resources with revisions set
Just like when a tag is set, when a revision is set for a resource it shouldn't _also_ specify that it comes from the main branch.
2024-02-08 23:54:12 +00:00
Bo Anderson
e80bb70bed
Add retries to some online audit checks 2023-10-14 17:43:18 +01:00
Mike McQuaid
c1f79499af
Merge pull request #15942 from issyl0/audit-pypi-package-names-match-resource-names
Add an audit for mismatched Python resource and PyPi package names
2023-09-13 09:32:09 +01:00
Mike McQuaid
e7c4d7ebeb
resource_auditor: handle potential nil case. 2023-09-13 08:51:54 +01:00
Issy Long
bf163013d9
Use a regex instead of splitting the URL on / etc 2023-09-12 00:30:21 +01:00
Issy Long
08f58ab5f7
Skip when the resource name is the same as the formula name
- Otherwise we get an audit failure in, for example, the `twine-pypi`
  formula for the package name from its `url` that's actually `twine`.
- For this we only should track `resource "name"` blocks.
2023-09-06 23:29:09 +01:00
Issy Long
bb44d66e79
Python package names can have more characters in than just _ and - 2023-09-06 23:28:23 +01:00
Issy Long
94d4061589
Improve PyPI package name audit wording 2023-09-06 23:16:25 +01:00
Mike McQuaid
31b94e21ee
resource_auditor: also check versions based on bottle root_url. 2023-09-06 09:51:16 -04:00
Steve Peters
0ae29cc7fa
resource_auditor: relax version audit in taps
Disable the version regex audit for 3rd-party taps,
at least for now to allow time to comply.
2023-09-05 22:51:58 -07:00
Mike McQuaid
de4207f6d0
Audit invalid versions
We have a bunch of versions we've been meaning to adjust to not use
invalid GitHub Packages characters for a while. Let's audit for them
and plan for deprecating their use in future.
2023-09-05 16:43:36 -04:00
Ruoyu Zhong
41a810b2e0
resource_auditor: fix Utils::Curl usage
Needed after #15940.
2023-09-06 00:05:19 +08:00
Mike McQuaid
b7114651ac
utils/curl: include or use explicitly.
Include or use `Utils::Curl` explicitly everywhere it is used.
2023-09-04 22:17:57 -04:00
Issy Long
5d2ae98d0c
Add an audit for mismatched Python resource and PyPi package names
- Issue 14537.
- When people manually add or modify PyPI resources the `Resource#name`
  sometimes ends up out-of-sync with the PyPI package name.
2023-09-03 00:44:24 +01:00
Douglas Eichelberger
89eb891891 Disable false positive 2023-04-25 09:26:24 -07:00
Douglas Eichelberger
08af78a2a5 brew style --fix 2023-04-25 09:26:24 -07:00
Sam Ford
942f419a48
ResourceAuditor: Fix #audit_head_branch error
The existing logic in `#audit_head_branch` for identifying the `HEAD`
branch in a Git repository will give an ```undefined method `[]' for
nil:NilClass``` error when a repository doesn't provide this
reference. Expected output is as follows:

```
ref: refs/heads/master  HEAD
1a8f9ac700873d1a08de31a17a2fd654245d5085  HEAD
```

However, I encountered this error for a repository with the following
output (i.e., where no symref is provided for HEAD):

```
f86be659718c0cd0a67f88b42f07044c23d0d028  HEAD
```

This commit resolves the error by modifying the related logic to
account for a `nil` value.
2022-10-17 13:28:20 -04:00
Rylan Polster
ea1f2098ac
Move HOMEBREW_SIMULATE_MACOS_ON_LINUX handling to SimulateSystem 2022-07-28 15:04:25 -04:00
Sam Ford
d649026c10
ResourceAuditor: Skip branch error when using tag 2021-10-20 12:46:53 -04:00
Bo Anderson
f0e4fb9cb8
resource_auditor: restore curl HTTP mirror auditing 2021-10-05 13:27:42 +01:00
Michka Popoff
07df4a7e70
Use Homebrew curl for audit and fetch when specified in the formula
Introduce new :using for urls
2021-08-17 13:35:55 +02:00
Nanda H Krishna
5191199957
resource_auditor: use if instead of unless
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-08-12 19:28:06 +05:30
Nanda H Krishna
f69f9be233
Add allowlist, make branch: mandatory 2021-08-12 12:43:22 +05:30
Nanda H Krishna
d75320069f
resource_auditor: add audit for HEAD default branch 2021-08-12 12:43:21 +05:30
Sam Ford
a1cf581118
ResourceAuditor: Allow only/except options 2021-06-16 10:30:52 -04:00
Kenneth Chew
af594739dc
audit: specify which URL has a content problem in problem message 2021-04-22 13:52:18 +01:00
Mike McQuaid
d73351251c
Deprecate, disable, delete code for next major/minor version.
Do the usual dance for bumping our major/minor version.
2021-04-09 09:30:36 +01:00
nandahkrishna
8e5451df2f
style: use parentheses for assignment in conditions 2021-02-12 18:33:37 +05:30
Rylan Polster
180d8ca2b2
utils/curl: use specs when checking http content problems 2021-01-23 17:30:59 -05:00
Alexander Bayandin
8717f82b9d dev-cmd/audit: add audit for checksum 2020-12-08 23:42:46 +00:00
Markus Reiter
5be4c9b5e0 Upgrade typed sigils. 2020-11-25 17:04:19 +01:00
Markus Reiter
dc11f02e16 Move auditor classes into separate files. 2020-11-18 11:22:27 +01:00