445 Commits

Author SHA1 Message Date
Dominyk Tiller
f4f2266923 audit: check for more unused shorthand
Adding a strict check for usage that should be using pkgshare.

Pulled onto two unique checks to provide a better problem message, with a
clearer solution, but open to thoughts.

 * Use pkgshare instead of (share/"example")
 * Use #{pkgshare} instead of #{share}/example

Closes Homebrew/homebrew#47900.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-01-11 09:49:54 +00:00
Xu Cheng
885022a5e3 add Keg#empty_installation?
Avoid using `FormulaAuditor` in `FormulaInstaller`.

Closes Homebrew/homebrew#47887.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-09 20:28:15 +08:00
Baptiste Fontaine
f11bea0153 audit: typo 2016-01-06 17:58:16 +01:00
Jason Tedor
4b2eb86bbf audit: allow whitelisting of versioned Kibana.
This commit modifies the whitelisting of the Kibama formula from the
npm audit check to allow the versioned Kibana formulae to receive the
same whitelisting.

Closes Homebrew/homebrew#47500.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-29 19:17:55 +00:00
Jason Tedor
076cbf55be kibana 4.3.0
Closes Homebrew/homebrew#46593.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-28 19:08:51 +00:00
Xu Cheng
0f60f76f26 lsyncd: use MACOS_FULL_VERSION
This commit partial reverts beed39e46fa021dd1c133c2c8eaaa81b524e68c7.

For users whose local brew is at around 2015-06-02 to 2015-06-11,
running `brew update` will emit following error:

  Error: undefined method 'full_version' for OS::Mac:Module

This is caused by the same bug described in Homebrew/homebrew#42553.

Let's use `MACOS_FULL_VERSION` for now to restore `brew update` compatibility
for these users.

TODO: revert this commit after core code and formulae separation.
2015-12-19 21:14:12 +08:00
Baptiste Fontaine
50f94e5233 audit: don't fail if there's no tap
Closes Homebrew/homebrew#47041.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-15 15:52:05 +01:00
Baptiste Fontaine
48b39ba1e7 audit: flag '--with{,out}-check' options
Closes Homebrew/homebrew#46794.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-09 11:29:47 +01:00
Xu Cheng
fe032e3e96 avoid using FORMULA_RENAMES directly 2015-12-09 16:56:59 +08:00
Xu Cheng
d948ec231d audit: tap is a Tap object now 2015-12-09 16:56:59 +08:00
Mike McQuaid
22b0abbfb8 audit: only run brew style when on Ruby 2.0. 2015-11-25 09:26:42 +00:00
Martin Afanasjew
cd267e0bce audit: check position of 'revision' and 'keg_only'
Closes Homebrew/homebrew#46178.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-11-23 04:56:27 +00:00
Martin Afanasjew
c55080abd5 audit: respect umask in formula file mode check
Closes Homebrew/homebrew#45837.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-11-16 20:07:23 +00:00
Xu Cheng
14af3e3515 audit: add godep and sphinx-doc to build time deps
Closes Homebrew/homebrew#46031.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-11-16 21:12:54 +08:00
Martin Afanasjew
8091b33f85 ruby 1.8: address syntax warnings in Homebrew core
Closes Homebrew/homebrew#45849.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-11-11 14:22:44 +08:00
Mike McQuaid
39a1ff2aa0 audit: don't flag Gnome devel releases < 1.0. 2015-11-01 09:26:43 -08:00
Baptiste Fontaine
a2e2553bd8 audit: flag any desc that starts with the formula name
The previous version didn’t work with descs like:

  "TheFormula serves a web page"
2015-10-30 17:56:55 +01:00
Baptiste Fontaine
18bda1c9b1 audit: uniformize the desc problems
Closes Homebrew/homebrew#45492.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-30 09:59:43 +01:00
Baptiste Fontaine
a5f6295b62 audit: flag descs starting with the formula name
Closes Homebrew/homebrew#45493.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-30 09:51:20 +01:00
Dominyk Tiller
2b9561b837 audit: add bottle modifier checks
* Checks for placement of the bottle modifier variable.

* Checks there isn't a bottle modifier and a bottle do block - The former makes
the latter redundant.

Closes Homebrew/homebrew#45146.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-10-24 00:25:46 +01:00
Baptiste Fontaine
e7ef3e36e2 audit: merge the template comments checks
Closes Homebrew/homebrew#45263.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-23 15:20:10 +02:00
Baptiste Fontaine
774a508d1a audit: warn about unknown bottle modifiers
This prevents typos like `bottle :uneeded` or `bottle :disable`

Closes Homebrew/homebrew#45264.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-23 19:44:19 +08:00
Baptiste Fontaine
abfaa59e06 MacOS: full_version added
Closes Homebrew/homebrew#44988.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-18 22:57:42 +08:00
Xu Cheng
8c4bd3dae2 audit: use ARGV.resolved_formula
There are audit rules which check cellar. Therefore, we need
`ARGV.resolved_formula` to get proper spec and prefix.

Closes Homebrew/homebrew#44781.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-10 01:34:43 +08:00
Xu Cheng
ee332c4550 handle TapFormulaWithOldnameAmbiguityError
Closes Homebrew/homebrew#44705.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-08 16:02:33 +08:00
Daniel Lee Harple
6b3b398858 audit: fix GitHub repository audit
In the data returned from the GitHub API, “watchers_count” is actually the
number of stars.

See https://developer.github.com/v3/activity/starring/#starring-vs-watching

Closes Homebrew/homebrew#44477.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-07 19:48:24 +08:00
Andrew Janke
4c80bf4324 audit: add check for 'head' and 'head do' both present
Closes Homebrew/homebrew#44626.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-07 09:41:24 +02:00
Xu Cheng
bd4525b64a mpich2 is renamed as mpich 2015-09-13 20:57:43 +08:00
Xu Cheng
002f8f2eb7 audit: handle tap aliases 2015-09-13 17:33:35 +08:00
Xu Cheng
67c3f8ff27 audit: cache formula names during audit_formula_name
Before `audit_formula_name: 15.094845999999986`
After `audit_formula_name: 0.5617120000000043`

Closes Homebrew/homebrew#43663.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-08 11:04:49 +08:00
Xu Cheng
e370f005c0 audit: simplify remote_official_taps 2015-09-08 11:04:49 +08:00
Daniel Lee Harple
4e5d92dc10 audit: spelling fix
Closes Homebrew/homebrew#43273.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
2015-08-25 08:24:04 -07:00
Xu Cheng
a88c40b8c8 core file style update 2015-08-22 13:15:33 +08:00
Baptiste Fontaine
8ba0fb9fcf unnecessary calls to .select simplified
These are minor perf optimizations.

Closes Homebrew/homebrew#43028.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-18 00:18:22 +02:00
Viktor Szakats
0d4da4234a audit: enforce https on [*.]archive.org
Also:
* one minor regexp tweak

Closes Homebrew/homebrew#42761.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-11 19:04:23 +01:00
Dominyk Tiller
64bcb5a07f audit: catch insecure bitbucket 2015-08-10 19:12:24 +01:00
Vlad Shablinsky
556ab3bcd6 audit: add rules for naming
- restrict old names as names of new formulae
- warn about dependencies on old names
2015-08-10 13:57:58 +01:00
Dominyk Tiller
970992d5bf audit: prune redundant code 2015-08-10 02:39:38 +01:00
Dominyk Tiller
d25d3b07da audit: flag insecure launchpad 2015-08-10 02:25:59 +01:00
Mike McQuaid
3518cda792 audit: allow assert !.*.include?.
Came up on Homebrew/homebrew#34573.
2015-08-09 09:33:33 +01:00
Alexis Hildebrandt
f78a63984b audit: add check for indefinite article
at the beginning of desc.

Closes Homebrew/homebrew#42404.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-08-06 18:10:48 +01:00
Xu Cheng
ae0e270727 favor flat_map over map...flatten 2015-08-06 22:33:46 +08:00
Xu Cheng
b121e5fd7b more core file style updated by rubocop 2015-08-06 17:23:56 +08:00
Alexis Hildebrandt
e9180b39f5 audit: simplify command-line spelling check
Closes Homebrew/homebrew#42403.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-08-05 20:19:40 +01:00
Dominyk Tiller
150a9fe514 audit: flag plaintext mirrorservice 2015-08-05 19:45:24 +01:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Baptiste Fontaine
79678cb109 online audit: use GET instead of HEAD
I also removed the `-L` flag which is already present in
`HOMEBREW_CURL_ARGS`.

Closes Homebrew/homebrew#42352.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-02 11:15:52 +02:00
Xu Cheng
ea21f9bc4d audit: more fix on no-compat mode 2015-07-22 16:41:10 +08:00
Xu Cheng
2648684b3b audit: rename audit_patches to audit_legacy_patches 2015-07-22 16:34:08 +08:00
Xu Cheng
51810ae1ea audit: fix for no-compat mode 2015-07-22 15:27:58 +08:00