3482 Commits

Author SHA1 Message Date
Rylan Polster
0faf17b1e6 use safe_popen_read instead of popen_read
RuboCop requires using Utils.safe_popen_read and Utils.safe_popen_write
instead of Utils.popen_read and Utils.popen_write respectively.

Using the "safe" version means that an error will be shown if the
command fails. Previously, when using `popen_read`, a failed command can
go unnoticed and have negative consequences that go undetected (as
happened for pipend in
https://github.com/Homebrew/homebrew-core/pull/55682)

RuboCop does not require Utils.safe_popen_read in a test do block
because there can be some legitimate uses for Utils.popen_read in these
cases.
2020-06-23 13:57:33 -04:00
William Ma
27abc8c50b home: Print info for each formula/cask opened 2020-06-23 09:44:17 -04:00
Adrian Ho
6044bb17ee Fix test cask macOS dependency
This should be updated when the minimum OS requirement changes.
2020-06-23 09:51:56 +08:00
William Ma
78ccb05166 Fix style issues 2020-06-22 16:07:18 -04:00
William Ma
0e61ca6715 update tests to match new output format 2020-06-22 15:55:51 -04:00
lionellloh
127d67e745 license: update tests and license checking logic 2020-06-23 02:59:55 +08:00
lionellloh
e4e55c5cb3 update-license-data: wrote rspec test and added one more parseable arg 2020-06-23 02:25:46 +08:00
Michka Popoff
a5025e9a9f
Merge pull request #7751 from iMichka/shared
formulae: add generic shared_library_extension
2020-06-22 18:25:35 +02:00
William Ma
bd2f5c3b32 test cache: split regex into multiple lines 2020-06-22 11:42:15 -04:00
William Ma
cf6ff4d84c cache: add test for casks 2020-06-22 11:24:49 -04:00
William Ma
0495281325 home: write tests using cask as argument 2020-06-22 10:46:59 -04:00
Dario Vladovic
8a62f891e1
formula: add std_cargo_args 2020-06-22 14:39:49 +02:00
Michka Popoff
955bca6574 formule: add generic shared-lib methods
We have strings containing hardcoded ".dylib" extensions in homebrew-core.
To be able to bring linuxbrew-core and homebrew-core closer together,
I am introducing a new generic attribute that can be used in formulae.
2020-06-20 23:14:18 +02:00
miccal
3263f796b6 cpu_spec: add :icelake 2020-06-20 14:14:56 +08:00
Lionell
fa412f9bb4 audit spec: editted strings to matach audit problem strings 2020-06-19 04:24:36 +08:00
Lionell
f78d4f41a0 audit spec: include cases for new formula 2020-06-18 00:45:13 +08:00
Lionell
f1cd404839 Merge branch 'master' into license 2020-06-17 22:58:12 +08:00
lionellloh
2b66968505 audit: cosmetic changes 2020-06-17 22:55:02 +08:00
lionellloh
0b95f030fd audit: fix code review changes 2020-06-17 22:13:04 +08:00
lionellloh
3bfca5bcee audit: change location of spdx.json file 2020-06-17 21:45:51 +08:00
lionellloh
03fc6b2c15 audit_spec: override core-tap attribute in online test 2020-06-17 05:19:38 +08:00
Lionell
e8f6e651d1 dev-cmd/audit_spec: WIP: online mismatch does not return any problems in test environment 2020-06-17 04:16:01 +08:00
Lionell
44aac2474e dev-cmd/audit_spec: check if license info exists and if it is a standard spdx-id 2020-06-17 03:39:00 +08:00
Sean Molenaar
523c24684d
cask: audit locales 2020-06-16 11:41:06 +02:00
Sean Molenaar
d64afece81
Merge pull request #7690 from SMillerDev/cask/audit/token
cask: codify the token rules
2020-06-16 11:40:25 +02:00
Sean Molenaar
4a24908fe4
cask: codify the token rules 2020-06-11 19:34:36 +02:00
Michka Popoff
3ad9009937 on_os block: test support for patches 2020-06-10 19:29:52 +02:00
Michka Popoff
2a50ef045f on_os blocks: remove url tests
This is not allowed by the style audit, and we do not want
to allow different source url's depending on the os.
2020-06-10 19:29:52 +02:00
Michka Popoff
1f8ebf5d20 resource: allow on_os blocks 2020-06-10 19:29:04 +02:00
Mike McQuaid
b58fa4ebb1
Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.

Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`.
2020-06-10 10:06:46 +01:00
Mike McQuaid
2a94d382ac
audit: make audit_revision_and_version_scheme faster.
This is really, really slow at the moment for a few reasons:
- it goes through the list of revisions twice
- it checks many more revisions than it needs to

Even after these improvements it's still by far the slowest audit so
am also making it a `--git` only audit.

Additionally, to further improve default `brew audit` performance do not
run `brew style` checks when doing `brew audit` with no arguments.

`brew style` can be run quickly and efficiently on all of a tap (and is
cached) so no need to duplicate it here.
2020-06-08 15:00:09 +01:00
Issy Long
8eba9b86ab
Change occurrences of "blacklist" to "denylist" or "disallow"
- Depending on context, I've gone for either "denylist" or "disallow"
  here. "Disallow" for things in sentences, or actions, and "denylist"
  for list of things.
2020-06-06 22:38:33 +01:00
Issy Long
0041ea21f5
Change occurrences of "whitelist" to "allowlist" 2020-06-06 22:38:32 +01:00
Michka Popoff
1be708922f
Merge pull request #7436 from iMichka/audit-block
on_os_blocks: add audit
2020-06-05 11:24:25 +02:00
Mike McQuaid
22857b56b9
formula: deprecate devel blocks.
As we haven't released 2.3.1 I think we can get away with sneaking this
in. I'm also prepared to back this out if it's too widely used and
there's too much backlash.
2020-06-05 09:22:49 +01:00
Michka Popoff
c494528f15 on_os_blocks: add audit 2020-06-04 17:36:28 +02:00
Mike McQuaid
aa81982aba
brew style --fix 2020-06-02 09:49:23 +01:00
nandahkrishna
1edff7934e
livecheck: modify regex in tests 2020-06-01 11:37:58 +05:30
nandahkrishna
9ffd0e66af
livecheck: reference Formula URLs 2020-05-31 13:52:55 +05:30
Sean Molenaar
3567892802
Add notibility checks for casks 2020-05-26 14:21:25 +02:00
Mike McQuaid
ef95b59ed4
Remove HomebrewArgvExtension
Fixes #5730
2020-05-23 19:39:11 +01:00
Mike McQuaid
bc27e38f18
Remove ARGV.debug?
Replace with `Homebrew.args.debug?`.

Part of #5730.
2020-05-23 14:38:58 +01:00
Mike McQuaid
e1f3c8d2b3
Merge pull request #7579 from MikeMcQuaid/deprecations
Update deprecations
2020-05-23 14:38:10 +01:00
Mike McQuaid
183670296f
Merge pull request #7493 from GauthamGoli/argv-cleanup-26
ARGV: Deprecate ARGV.cc and replace with Homebrew.args.cc
2020-05-23 14:10:20 +01:00
Mike McQuaid
e5d15c8b19
Merge branch 'master' into argv-cleanup-26 2020-05-23 13:44:42 +01:00
Mike McQuaid
11cf77be17
formula_installer: prelude before fetch.
This ensures that dependencies are verified and tapped before they are
fetched. `FormulaInstaller#lock` has been moved into
`FormulaInstaller#install` to avoid locking until necessary.

While we're here, don't compute dependencies before fetching if we're
not going to use them.
2020-05-23 13:40:13 +01:00
Mike McQuaid
e10ade758d
Revert "formulary: install tap if needed." 2020-05-22 16:19:30 +01:00
Mike McQuaid
61b48d8557
formulary: install tap if needed.
This matches what `cask_loader` does and is low risk given we no longer
allow tap pinning.

Fixes #7626
2020-05-22 14:21:40 +01:00
Mike McQuaid
ca47992a6c
Fix rubocop-performance brew style. 2020-05-22 08:52:26 +01:00
Mathäus Zingerle
bb9665ced8 Migrate scheme checks for cvs, bzr, hg, fossil, and svn+http to Rubocop 2020-05-20 20:52:00 -05:00