273 Commits

Author SHA1 Message Date
Lionell Loh Jian An
5b3530b23d
Apply suggestions from code review
Code review changes

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-06-30 22:11:36 +08:00
lionellloh
ff95f08591 audit test: modified code for reading json file 2020-06-30 22:08:36 +08:00
Lionell
5f6917ae7c Merge branch 'master' into license 2020-06-28 02:07:53 +08:00
Frank Lam
b2eafdf11d
Remove patch checks from audit 2020-06-27 02:37:57 +08:00
Lionell
5aa0eb487e rename spec file 2020-06-25 17:51:47 +08:00
lionellloh
fbd5c32d22 bunch of style fixes 2020-06-25 05:46:18 +08: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
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
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
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
vidusheeamoli
f851688541 audit: Port audit_keg_only to rubocop and add tests
audit: add test

audit: fixed test

audit: added another test case

audit: fix test

audit: fix test

audit: fix keg only
2020-05-05 10:47:49 +05:30
Dawid Dziurla
3dd5a7465d
add pr-upload command 2020-04-20 13:37:05 +02:00
Mike McQuaid
8eed72cd8b
Move file mode audit to RuboCop. 2020-04-18 15:44:24 +01:00
Mike McQuaid
5e2351cde6
dev-cmd/audit: add --skip-style option.
This will allow `brew style` and `brew audit` to be run separately
without providing duplicates.

Additionally, run RuboCop style rules when `--strict` isn't provided and
remove a confusing reference to `style`.
2020-04-16 08:24:38 +01:00
Bo Anderson
9a8a4cff9f
test/dev-cmd/style_spec: fix flaky test 2020-04-15 10:56:09 +01:00
Mike McQuaid
85e65f6d9c
Move some cmd to dev-cmd.
None of these made sense as end-user commands.
2020-04-14 14:29:38 +01:00
Jonathan Chang
5a95fe14aa dev-cmd: add pr-automerge
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-04-13 20:14:40 +10:00
Mike McQuaid
6ea6db9026
dev-cmd/audit: test presence of formulae in lists. 2020-04-12 14:17:06 +01:00
Jonathan Chang
bab564f203 pr-pull: add tests 2020-03-30 22:41:17 +11:00
Jonathan Chang
86f245effb dev-cmd: new pr-publish command 2020-03-22 13:35:15 +11:00
Mike McQuaid
1e265247ca
rubocop: apply autofixes. 2020-03-13 21:16:18 +00:00
Alexander Regueiro
68047abc0e audit: ignore group write bit 2020-03-05 23:01:41 +00:00
Issy Long
b3abf3d7c9
dev-cmd/tap-new: Set up GitHub Actions CI instead of Azure
- We recently removed Azure as a supported CI provider
  (Homebrew/homebrew-test-bot PR 325), so `brew test-bot` won't run on
  Azure any more.
- Homebrew CI is moving towards GitHub Actions as the standard.
2020-02-15 17:39:33 +00:00
Jonathan Chang
779304df68 audit: add "homebrew/core" for relevant checks 2020-01-08 15:38:48 -05:00
Mike McQuaid
bed5297b6c
.github/workflows/tests: run config, doctor.
This should help with debugging why the `brew bundle` tests are now
failing.
2019-12-04 15:35:31 +00:00
Figroc Chen
3c09ab0d06 extract: semver aware 2019-12-03 21:45:55 +08:00
Mike McQuaid
eb0be5f6fe
test: re-enable portable Ruby tests.
Let's try to get these working again.
2019-11-06 15:36:28 +00:00
Mike McQuaid
a1a0569f75
Merge pull request #6578 from dawidd6/audit-uses-from-macos
audit: replace depends_on with uses_from_macos
2019-10-10 19:20:17 +01:00
Dawid Dziurla
86feb5a9de
audit: replace depends_on with uses_from_macos 2019-10-10 17:59:32 +02:00
Mike McQuaid
2d51b8189b
test: disable some tests on Linux portable ruby. 2019-10-10 16:17:06 +01:00
Sean Molenaar
8cb833f7da
Audit bitbucket.com repositories 2019-09-05 20:56:25 +02:00
Sean Molenaar
0cca6cb8bd
Audit gitlab.com repositories 2019-09-05 12:14:33 +02:00
Mike McQuaid
4add1d1cb3
Check binary URL resources with RuboCop
- Migrate the existing binary URL audit to a RuboCop.
- Check resources as well as main URLs
- Also check for "macos" and "osx" in URLs
- Add whitelists for URLs and formulae
2019-09-02 10:50:49 +01:00
Michka Popoff
fb643a28f0 pull_spec: fix test 2019-07-03 21:05:21 +02:00
Michka Popoff
3c25ddc6ed pull: allow to pull from merge commits 2019-07-03 21:05:21 +02:00
Thierry Moisan
c5640acae5
Add bump-revision bump command
bump-revision will increase by one the revision or add "revision 1" if
it doesn't exist.
2019-04-24 22:17:59 -04:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
cc6c6afffb
test/dev-cmd: add more parseable arguments tests. 2019-03-27 14:22:30 +00:00
Mike McQuaid
1e5cfcc028
Separate tap tests into separate, correct files. 2019-03-27 13:35:42 +00:00
Mike McQuaid
aa44509be9
Test dev-cmd *_args methods
Also, add a few missing invocations.
2019-03-27 13:35:42 +00:00
Mike McQuaid
59d680a626
dev-cmd: only one integration test per command.
Integration tests are useful in detecting breakages but much slower so
let's only use one per command and install formula outside the
integration test framework (which is also slow).
2019-03-27 09:45:48 +00:00