Mike McQuaid
ee253e465b
Vendor all Homebrew's gems.
...
Homebrew's actually ended up using a fair few gems. While we want to
avoid Bundler at runtime (and this PR still does that, in fact uses
Bundler even less at runtime than it did before) writing our own version
to use at build-time seems redundant.
2017-05-07 13:52:57 +01:00
Mike McQuaid
555505ec54
Merge pull request #2531 from GauthamGoli/audit_cops_options_refactor
...
audit: Allow skipping/selective running of cops and cops refactor
2017-05-03 11:28:25 +01:00
Gautham Goli
fed668b330
Add --only-cops
,--except-cops
options for brew style and simplify cop names
2017-05-03 14:49:23 +05:30
Dominyk Tiller
9aeb8f0f0b
audit: match start of string, not line
2017-05-02 19:30:41 +01:00
Dominyk Tiller
80483c0206
audit: whitelist 'Firefox' in keg_only_style
2017-05-02 19:05:56 +01:00
Gautham Goli
c3330c289d
Add --only-cops
,--except-cops
options for brew audit
...
Also refactor audit cops into two "departments"
- FormulaAudit
- FormulaAuditStrict
2017-05-02 23:26:12 +05:30
Gautham Goli
a4568a8697
Let cops run without --strict flag
2017-05-02 23:14:44 +05:30
Dominyk Tiller
85053b1476
audit: add audit_keg_only_style
2017-05-01 19:22:34 +01:00
Dominyk Tiller
2ad43cb1fd
audit: formally ban go get usage
...
There's been an informal ban for a while but let's
be punchier because this crops up still.
2017-04-28 17:38:01 +01:00
Mike McQuaid
1c9cfb2419
audit: tweak dependency option audit.
...
Make sure that `if build.with?` isn't caught.
2017-04-27 16:30:05 +01:00
Mike McQuaid
5647fdb2f9
audit: fix audit of new formulae.
...
When auditing new formulae without `--new-formula` the
`audit_revision_and_version_scheme` method fails ungracefully. Instead,
set some better defaults so fewer checks are needed.
Fixes #2551 .
2017-04-26 11:33:13 +01:00
Mike McQuaid
b2a291529d
audit: fix use of search_tap method.
...
This was removed in #2540 but this call site was note updated to use
the `search_taps` method instead.
2017-04-25 12:08:50 +01:00
Mike McQuaid
ceb1629ad7
Merge pull request #2465 from GauthamGoli/audit_components_port_rubocop
...
audit: audit_components method to rubocops and tests
2017-04-24 10:06:41 +01:00
Mike McQuaid
d5155256ce
Fix audit version_scheme and revision checks.
...
Another attempt at fixing `brew audit` issues around detecting
`revision` and `version_scheme` changes correctly. First done in #1754
and #2086 (reverted in #2099 and #2100 ).
To ease future debugging a `ph` helper has been added to print a hash
and a series of RSpec tests to verify that the `revision`,
`version_scheme` and `version` formula version audits behave as
expected.
Fixes #1731 .
2017-04-23 18:56:22 +01:00
Gautham Goli
413a7e5dae
Port audit_components method to rubocops and add corresponding tests
2017-04-22 21:53:16 +05:30
Mike McQuaid
5c82e0d552
Merge pull request #2526 from MikeMcQuaid/audit-gnu-mirror-flip
...
audit: flip GNU mirror preference.
2017-04-22 16:54:50 +01:00
Mike McQuaid
94ef7318ae
audit: flip GNU mirror preference.
...
Now that both the primary and mirror URLs use HTTPS we can flip these
around so the primary URL is the primary URL and we don't have problems
with waiting for mirror propagation.
2017-04-22 13:10:03 +01:00
Mike McQuaid
185b1787c6
audit: lookup unversioned formulae with Formulary.
...
This means that if e.g. the unversioned formulae exists in another tap
this audit won't produce a false positive.
2017-04-22 13:00:38 +01:00
Mike McQuaid
fdcffb25a9
Merge pull request #2482 from MikeMcQuaid/audit-dependency-options
...
audit: ensure default dependencies don't use options.
2017-04-22 11:07:16 +01:00
Mike McQuaid
3011cbac34
audit: ensure dependencies don't use options.
...
Option dependencies are nasty as they cause unnecessary builds from
source.
2017-04-21 18:24:10 +01:00
Mike McQuaid
1775c32210
audit: new formulae should not require patches.
...
We may under some circumstances accept these anyway but it's better to
nudge people into the right behaviours on local `audit`s.
2017-04-21 18:23:55 +01:00
Steven Peters
3982d24d8b
audit: fix swapped audit messages
2017-04-19 10:59:11 -07:00
Mike McQuaid
3f8722c971
audit: allow skipping audit methods.
...
Add `--only` and `--except` methods which can be used to selectively
enable or disable audit groups.
2017-04-18 08:17:26 +01:00
Mike McQuaid
417f49dd32
Merge pull request #2477 from MikeMcQuaid/audit-more-universal
...
audit: check for more universal usage.
2017-04-17 15:50:21 +01:00
Mike McQuaid
29b54dc16d
Merge pull request #2473 from MikeMcQuaid/audit-language-module-requirements
...
audit: deprecate language module requirements.
2017-04-17 14:20:51 +01:00
Mike McQuaid
88a75af1c3
audit: don't recommend version aliases on --devel.
...
As requested in #11462 by @neutric as this produces confusing,
incorrect output.
2017-04-10 19:03:44 -07:00
Mike McQuaid
0948d2013a
audit: deprecate language module requirements.
...
Make `brew audit` complain about language module requirements because
they provide a crappy user experience compared to vendoring and we’re
not really fixing bugs in them any more.
2017-04-10 22:42:57 +01:00
Mike McQuaid
2c370f3677
audit: check for more universal usage.
...
Also check for `ENV.universal_binary` and `build.universal?`. The prior
is still required for `wine` and the latter should never be required any
longer.
2017-04-10 22:36:39 +01:00
Mike McQuaid
3f51406212
Merge pull request #2242 from GauthamGoli/audit_custom_cops
...
Port audit_desc audit rules to a cop
2017-04-05 08:37:43 +01:00
Mike McQuaid
57b230dd5c
audit: fix core formula alias check.
...
Was missing a formula object being passed.
2017-04-04 18:38:18 +01:00
Mike McQuaid
7d66e29927
Merge pull request #2399 from MikeMcQuaid/unversioned-formulae-check
...
audit: check for unversioned formulae.
2017-03-30 19:06:47 +01:00
William Woodruff
e7554b0b3f
audit: Fix cctools invocation check regular expression.
...
Additionally, ignore the cctools formula itself, since it obviously
needs to check cctools invocations.
2017-03-29 09:52:35 -04:00
William Woodruff
8608d1ea78
Merge pull request #1828 from woodruffw/audit-cctools
...
audit: Check for invocations of cctools.
2017-03-28 22:03:57 -04:00
ilovezfs
70685f3017
audit: bump whitelisted elm-format version to 0.6.0-alpha
2017-03-26 22:43:08 -07:00
Mike McQuaid
181275c016
audit: check for unversioned formulae.
...
If we're adding a versioned formulae we want to ensure that there's also
an unversioned one too.
2017-03-26 20:36:37 +01:00
Raza Hussain
543529c054
indenting
2017-03-26 14:29:38 -04:00
Raza Hussain
86cf8873b6
changing if condition
2017-03-26 12:54:25 -04:00
Raza Hussain
94769652e0
simplify the regex and make a line max 80 char long
2017-03-26 12:43:09 -04:00
Mike McQuaid
4117d198cc
Merge pull request #1732 from zmwangx/hint-migrations
...
Hint at new location of migrated formulae
2017-03-21 17:31:31 +00:00
Mike McQuaid
7d068d468d
Merge pull request #2365 from MikeMcQuaid/audit-provided-by-macos
...
audit: check system dupe deps on new formulae.
2017-03-21 14:49:22 +01:00
Mike McQuaid
80e95b684e
blacklist: move to missing_formula class instead.
...
This will allow extending this class so it can be used by more than
just blacklisting.
2017-03-20 18:20:31 +02:00
Mike McQuaid
8efc0a608d
audit: deprecate depends_on :tex.
...
This has known issues with our `ghostscript` formula, we can't test it
on CI and is a ludicrously heavy dependency that in many cases can be
avoided by upstream providing prebuilt documentation.
2017-03-19 20:46:31 +02:00
Mike McQuaid
eadbd95d2c
audit: check system dupe deps on new formulae.
...
Provide a gentle nudge to users to check if these dependencies are
definitely required.
2017-03-19 20:45:21 +02:00
JCount
5e8a9fa3f3
audit: online - limit download time based on HTTPS determination
...
Previously, the http_content_headers_and_checksum method always
downloaded the entire url, including headers. These downloads
periodically hang, outputting false positives or wreaking havoc on
the CI. Therefore, use curl's --max-time arg to prevent this by
setting a hard limit of 600 seconds when the entire file is going
to be used to detect whether the url can be changed to use the HTTPS
protocol instead of HTTP. Otherwise, if the url already is HTTPS, limit
the download time to 25 seconds since only the headers, not contents, matter.
2017-03-16 17:37:22 -04:00
ilovezfs
45aa7b9a14
Revert "audit: exempt wine's deps from the universal deprecation"
2017-03-12 13:59:43 -07:00
Markus Reiter
c594ffefbc
Add Formatter::pluralize
.
2017-03-11 21:12:51 +01:00
Mike McQuaid
c4c3588de8
Merge pull request #2252 from zmwangx/audit-no-warn-brew-mirror-url
...
audit: do not warn about reachability of `brew mirror`ed URL
2017-03-08 09:32:37 +00:00
JCount
3db3b08d72
audit: freeze versioned_conflicts_whitelist
2017-03-05 15:44:03 -05:00
JCount
460c4a3200
audit: deconstruct versioned_conflicts_whitelist using splat
2017-03-05 15:06:02 -05:00
JCount
4e50562424
audit: whitelist bash-completion@* to use conflicts_with
...
this is necessary because they install conflicting scripts into
HOMEBREW_PREFIX/etc/profile.d
2017-03-05 14:19:32 -05:00