Mike McQuaid
ea8be174f6
Merge pull request #2631 from GauthamGoli/audit_homepage_rubocop
...
audit: Port audit_homepage method to rubocop and add tests
2017-05-15 10:02:47 +01:00
Gautham Goli
91efcb045e
Port audit_homepage method to rubocop and add tests
2017-05-14 22:05:46 +05:30
Mike McQuaid
75d230318a
Merge pull request #2627 from MikeMcQuaid/audit-fix-option-detection
...
audit: fix dependency option detection.
2017-05-14 15:09:07 +01:00
Mike McQuaid
d5006ef012
audit: fix dependency option detection.
...
Instead of trying to do this all with a single regex give up and do a
two stage process. Eventually I'll end up implementing a full ruby
parser here 🧌 .
2017-05-13 13:00:00 +01:00
Mike McQuaid
b14f1572b7
audit: more checks for versioned aliases.
...
Check that a required versioned alias has a valid name (rather than
assuming it’s fine based on it’s existence alone) and check for
the presence of invalid version aliases.
This should handle the case where someone bumps a formula but forgets
to rename the alias that’s mentioned in #2596 .
2017-05-09 15:10:29 +01:00
Markus Reiter
5828eefd01
Remove to_s
from some Pathname
s.
2017-05-08 13:37:28 +02:00
Mike McQuaid
9853a78397
Travis CI tweaks.
...
Attempt to improve Travis CI. This time without any vendoring gems
nonsense.
2017-05-08 08:38:25 +01:00
Mike McQuaid
57db2e539e
Revert "Merge pull request #2597 from MikeMcQuaid/vendor-gems"
...
This reverts commit 3e4547f52e7ebec633f8bfefc8a396d944edf908, reversing
changes made to 6edf9382bcc1240ad6f97c8b752cfe56cef9965d.
2017-05-07 17:28:39 +01:00
Mike McQuaid
a76392dd5f
Revert "Merge pull request #2602 from MikeMcQuaid/travis-ci-tweaks"
...
This reverts commit 8d948e4b0b55912c592d34cb5ea83c649b1f9d5e, reversing
changes made to 2372872974d1049c2beafe7dedb7f8f882502058.
2017-05-07 17:28:34 +01:00
Mike McQuaid
5cdb0d0a6d
Travis CI tweaks
...
Tweak our Travis CI configuration and the one we suggest for taps to
be faster and use caching.
2017-05-07 16:00:04 +01:00
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
Mike McQuaid
0c9047a2b8
Merge pull request #2562 from DomT4/you_shall_not_pass_go_get
...
audit: formally ban go get usage
2017-04-30 13:32:22 +01:00
Zhiming Wang
7a75de7cb1
pull: fix status code check in check_bintray_mirror
...
The status code of the last redirect should be 2xx to be deemed successful.
2017-04-29 19:30:19 -04: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
0cedb4db08
tap-new: bump Xcode to 8.3.
...
Update this to the current latest Travis CI supports (which we're using)
2017-04-27 08:56:46 +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
Mike McQuaid
11acadaa50
Merge pull request #2524 from MikeMcQuaid/more-env-filtering-fixes
...
Hide sensitive tokens from install/test/post.
2017-04-23 09:45:47 +01:00
Mike McQuaid
a937ed0a20
Merge pull request #2522 from MikeMcQuaid/more-deprecations
...
More deprecations.
2017-04-22 17:47:39 +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
d02b4f321d
Hide sensitive tokens from install/test/post.
...
Hide these tokens to avoid malicious subprocesses e.g. sending them
over the network. Also, support using these tokens with environment
filtering and clear `HOMEBREW_PATH` from subprocesses to stop them
sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s
PATH for e.g. `brew doctor` etc.
2017-04-22 16:31:19 +01:00
Mike McQuaid
ba3c46d24f
More deprecations.
...
Deprecate more methods. Internal APIs have been verified to be unused
elsewhere and removed. External APIs have had deprecation methods added.
Existing deprecations have been either upgraded to produce warnings or
no longer deprecated and the reasoning documented.
2017-04-22 16:28:07 +01:00
Mike McQuaid
044bd974e4
Merge pull request #2484 from MikeMcQuaid/unversion-formula-tap-match
...
audit: lookup unversioned formulae with Formulary.
2017-04-22 15:04:21 +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
a6df701fad
tests: reduce some noise.
...
- Tweak the way offline skipping happens
- Skip more tests that break when offline
- Hide more stdout output from tests.
2017-04-22 12:49:14 +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
Mike McQuaid
2be7999878
Merge pull request #2274 from rwhogg/fuse-requirement
...
Port OsxfuseRequirement to Linux
2017-04-20 17:14:42 +01:00
Steven Peters
3982d24d8b
audit: fix swapped audit messages
2017-04-19 10:59:11 -07:00
Mike McQuaid
55c02ae774
Merge pull request #2478 from MikeMcQuaid/audit-skip-methods
...
audit: allow skipping audit methods.
2017-04-18 09:18:55 +01:00
Mike McQuaid
43253ede65
create: use GitHub metadata where available.
...
GitHub provides a description and homepage field so let `brew create`
use them where possible. Also, detect GitHub repositories based on
`releases` as well as `archive`s.
2017-04-18 08:22:41 +01: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
Bob W. Hogg
7b6abc7630
Only run Linux-specific tests on Linux
2017-04-15 21:20:09 -07: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