332 Commits

Author SHA1 Message Date
Alexander Bayandin
1b18a01779
Library/Homebrew/rubocops/uses_from_macos: add ssh-copy-id 2020-04-07 15:04:23 +01:00
Mike McQuaid
bd082011c2
Merge pull request #7280 from issyl0/audit-uses-from-macos
audit: Check if `uses_from_macos` usage is correct
2020-04-07 12:47:30 +01:00
Mike McQuaid
4dd70048d6
rubocops/uses_from_macos: tweak whitelist. 2020-04-07 12:16:17 +01:00
Dario Vladovic
3a21ca8956
Implement mdimporter cask stanza 2020-04-06 15:24:14 +02:00
Issy Long
857393ccfb
Audit correct uses_from_macos usage with RuboCop
- This builds on @jonchang's work that started in #6265.
- We now use `uses_from_macos` to declare dependencies that are implicit
  on macOS because they ship with macOS, but they're needed on Linux. We
  have to be sure that the dependencies people specify as
  `uses_from_macos` are actually shipped with macOS. So, we maintain a
  safelist of those dependencies and check against it.
- Also add more legitimate `uses_from_macos` dependencies to the list.
- This is runnable with `brew audit --only-cops=FormulaAudit/UsesFromMacos`.
- It produces different number of failures on macOS vs. Linux, because
  apparently we've not synced Homebrew/linuxbrew-core upstream thoroughly
  enough yet.
- Originally this was designed as a `--strict` audit, but we flipped it
  to be a normal audit because - to quote Mike - this is "sufficiently
  robust" now.
2020-04-06 13:42:27 +01:00
Mike McQuaid
37a79498a0
rubocops/urls: whitelist cspice.
As explained in https://github.com/Homebrew/brew/pull/7256#issuecomment-607787949
2020-04-03 13:53:03 +01:00
Mike McQuaid
ddaf467741
rubocops/urls: reorder for quicker scanning. 2020-04-03 13:52:44 +01:00
Mike McQuaid
9da6c9b521
rubocops/urls: stricter binary URL requirements.
Don't rely on x86_64 detection but instead whitelist the few projects
that fun afoul of these regex.
2020-04-02 09:54:14 +01:00
Alexander Bayandin
b37c3e9cb2 rubocops/patches: suggest url with full_index=1 2020-03-15 11:24:38 +00:00
Mike McQuaid
1e265247ca
rubocop: apply autofixes. 2020-03-13 21:16:18 +00:00
Issy Long
9f80a7bce2
rubocops/patches: Make more GitHub patch locations enforce revisions
- We recently deleted a load of old Homebrew/formula-patches patches for
  non-existent core formulae
  (https://github.com/Homebrew/formula-patches/pull/283). This is a good
  action to take. Users should always be able to retrieve the patch once
  it's been deleted from the repo, if the formula they continue to use
  specifies a git revision to pull from, not just `master`.
- The code to detect `master` formulae was already here, so this adds
  another GitHub host to the detection: `raw.githubusercontent.com` as
  that's what the current patches that use `master`
  (https://github.com/Homebrew/homebrew-core/pull/51329) link to.
- Fixes https://github.com/Homebrew/homebrew-core/issues/51313.
2020-03-08 20:21:43 +00:00
Bo Anderson
79811537fb rubocop/urls: add go@1.13 to binary URLs whitelist 2020-02-26 09:26:49 +00:00
EricFromCanada
29006396dd audit: check apache.org URLs 2020-02-24 13:07:46 -05:00
Mike McQuaid
ba52e7f932
rubocop/urls: remove deleted ghc@8.2. 2020-02-24 11:40:46 +00:00
Seeker
f60e2a0c4a
Add ghc@8.6 to binary formula URLs whitelist 2020-02-23 11:09:02 -08:00
Sam Ford
486a557cf5
rubocop/lines: add protobuf to whitelist 2020-02-16 09:34:09 -05:00
Michka Popoff
f96342713b rubocop: remove BINARY_URLS_WHITELIST and rust nightly
This url is not used anymore, we replaced it with a new stable version
of rust.
2020-02-01 13:17:25 +01:00
Mike McQuaid
6bc72cf18a
rubocop/lines: add whitelist.
Let's only allow cryto or libraries.
2020-01-29 12:17:21 +00:00
Jonathan Chang
abf2b83b35 audit: add uses_from_macos dependency ordering 2020-01-12 11:12:27 -08:00
Jonathan Chang
cf66c05d87 audit: avoid build-time checks in core
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-01-11 09:48:54 -08:00
Jonathan Chang
9634041f82 audit: unnecessary comments from external taps
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-01-11 09:44:20 -08:00
Jonathan Chang
7239b3099a audit: check for build.with? in core
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-01-11 09:37:10 -08:00
Jonathan Chang
779304df68 audit: add "homebrew/core" for relevant checks 2020-01-08 15:38:48 -05:00
Dawid Dziurla
a6b08ecaed
rubocops: add go@1.12 to BINARY_FORMULA_URLS_WHITELIST 2019-11-01 20:54:38 +01:00
Tim Masliuchenko
22d821323c Feedbacks 2019-10-23 16:28:00 +03:00
Tim Masliuchenko
3ef5e06943 Add Manpage artifact 2019-10-22 15:21:49 +03:00
Markus Reiter
6cff8aff90 Fix cop for interpolated strings. 2019-10-16 19:06:39 +02:00
Markus Reiter
3d0fae4621 Fix #match? on nil. 2019-10-16 18:37:28 +02:00
Issy Long
1f6168fe8a
Change regexp.match?(string) to string.match?(regexp) everywhere
- Only try to call `.match?` on strings that aren't nil.
2019-10-13 23:22:51 +01:00
Issy Long
3570cb6e77
Auto-fix Style/NegatedUnless offenses 2019-10-13 16:04:36 +01:00
Issy Long
37fee928b5
Auto-fix Style/NegatedIf offenses 2019-10-13 16:04:35 +01:00
Issy Long
b78028b9c2
Auto-fix Performance/RegexpMatch offenses 2019-10-13 16:04:26 +01:00
Markus Reiter
b1d0c61fea Update Gems. 2019-10-03 09:22:44 +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
Jonathan Chang
7ddc185b35 Fix various typos 2019-08-19 16:12:34 +10:00
Mike McQuaid
11de7de49d
rubocops/text: fix long line. 2019-06-07 09:31:24 +01:00
Izaak Beekman
75bc30bfff
Limit veclibfort & lapack cop to core & add tests 2019-06-06 18:09:44 -04:00
Izaak Beekman
ffe30058ab
Add MPICH cop and test
- Split off from PR Homebrew/brew#6209
 - Create stand alone class for cop w/ auto-correct
2019-06-06 16:28:54 -04:00
Izaak Beekman
0cf8ec7547
Allow Accelerate linkage, deny veclibfort & lapack
- Accelerate provides more than just BLAS and LAPACK functionality, see
   https://developer.apple.com/documentation/accelerate
 - Veclibfort exists only to wrap Accelerate's BLAS/LAPACK
 - LAPACK is a slow, seldom updated reference implementation
 - Encourage usage of OpenBLAS
 - Reverts PR #6130
2019-05-23 19:07:17 -04:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
d1ea6f38d3
Fix mutable constants violations. 2019-04-19 21:46:20 +09:00
EricFromCanada
89f0fcedbe whitespace fixes 2019-04-13 21:32:04 -04:00
EricFromCanada
fa6404e0f5 grammar fixes 2019-04-13 21:29:32 -04:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
1aa8ad09e2
Deprecate macOS versions below Mavericks
And remove all dead/unneeded code.
2019-01-27 12:27:47 +00:00
Mike McQuaid
db7fd7b7a2
Tweak audits
- Ensure that new formulae problems aren't duplicated
- Now that homebrew/core will imminently not have options adjust the
  various audits so they make more sense (and exclude taps)
- Exclude taps from more preferential audits
2019-01-22 13:30:24 +00:00
Mike McQuaid
170c5493a4
Update deprecations
- Add some `odeprecated`
- Make some `odeprecated` now `odisabled`
- Remove `odisabled` code.
- Remove old update migrations
- Remove GCC 4.0 compiler
- Remove Tiger-only code
- Remove 32-bit-only code
- Remove use of LD64
- Remove GCC 4.3 - 4.8 support.
2019-01-08 19:13:46 +00:00
Mike McQuaid
b917cccf19
rubocops: remove scons audit.
This will be deprecated in #5477.
2019-01-06 14:41:37 +00:00
Shaun Jackman
8461cf24f1 rubocop: Use include? rather than match 2018-12-10 10:23:39 -08:00
Shaun Jackman
f62955688f audit: Disable "Don't use OS.mac?" for Linuxbrew 2018-11-26 11:55:28 -08:00