Michka Popoff
1cc7ca33c0
update: migrate everyone from linuxbrew-core to homebrew-core
...
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-10-20 11:01:38 +01:00
Bo Anderson
629dbb7c59
rubocops/urls: allow plain HTTP mirrors
2021-10-01 13:42:05 +01:00
Mike McQuaid
41e94afda5
Fix brew style
...
Fixes for https://github.com/Homebrew/brew/pull/12152 .
Extracted into a separate PR so this can be merged immediately.
2021-09-30 10:13:53 +01:00
Bo Anderson
3e4cb206bb
rubocops: silence parser warning
2021-09-23 03:45:15 +01:00
Mike McQuaid
56753c9d08
rubocops/lines: be less strict about OS.{mac,linux}? in taps.
...
Fixes #12040 .
2021-09-15 12:23:07 +01:00
Mike McQuaid
6992ad0caa
rubocops/uses_from_macos: remove versioned aliases.
...
It makes more sense to use the unversioned formulae with `uses_from_macos`
because macOS isn't shipping multiple versions of this.
If you wish to e.g. pin to a specific version you can do that by specifying the
dependency directly in an `os_linux` block.
2021-09-14 11:01:42 +01:00
Bo Anderson
861dea9ada
Bump various type strictnesses
2021-09-11 01:00:23 +01:00
Mike McQuaid
365e554f67
Revert "rubocops: allow uses_from_macos openssl@3
"
2021-09-09 09:16:59 +01:00
Mike McQuaid
ebc4cce456
rubocops/lines: add some OS cop comments/exceptions.
...
Exclude and comment the cases the autocorrect currently doesn't work.
Follow-up from #11955 .
2021-09-08 13:46:01 +01:00
Mike McQuaid
a6e4e195c1
rubocops/lines: recommend on_os/OS.os? based on context.
...
Recommend the use of `on_macos` and `on_linux` unless we're in
`def install`, `def post_install` or `test do` in which case recommend
`OS.mac?` and `OS.linux?` instead.
2021-09-08 13:18:07 +01:00
Jonathan Chang
b463ad0124
rubocops: allow uses_from_macos openssl@3
2021-09-07 11:20:55 -07:00
Mike McQuaid
227a96fd7f
rubocops/lines: remove OS.mac?/OS.linux? check.
...
This will be reimplemented in https://github.com/Homebrew/brew/pull/11955
but this allows us to merge the homebrew-core changes before that PR is
merged.
Closes https://github.com/Homebrew/brew/pull/11946
2021-09-02 13:50:23 +01:00
Sam Ford
ddde0f7589
livecheck: allow inheriting from a formula/cask
2021-08-02 09:12:22 -04:00
Nanda H Krishna
5ccfbcd1d2
Autocorrect style issues with brew style --fix
2021-07-08 12:36:39 +05:30
Dawid Dziurla
d50bd605b8
components_order: allow ignore_missing_libraries in on_os
2021-07-04 18:34:03 +02:00
Carlo Cabrera
92d224f0fc
rubocops/lines: check allowlist for use of ENV.runtime_cpu_detection
...
This is implements the first audit discussed in #11608 .
2021-07-01 18:38:54 +01:00
Michael Cho
b44ecaceb7
docs: fix cask doc urls to use docs.brew.sh
2021-06-25 13:20:40 -07:00
Bo Anderson
a06d136d2c
Move Sorbet gems into an optional group
2021-06-11 08:10:30 +01:00
Alexander Bayandin
909a7aea9e
rubocops: allow uses_from_macos "git"
2021-06-08 13:03:25 +01:00
danielnachun
5af7521ab8
components_order: allow keg_only in on_macos/on_linux blocks
2021-05-30 19:03:04 -07:00
Mike McQuaid
321c165bd3
Merge pull request #11350 from Gcenx/audit-fix-xcode-build-check
...
audit: Remove SYMROOT
2021-05-13 13:50:40 +01:00
Dean M Greer
ceeb5ea9ec
audit: Remove SYMROOT
...
SYMROOT is only a valid argument when -project is used.
xcodebuild has other uses than building Xcode projects.
2021-05-13 08:07:06 -04:00
Bo Anderson
e5285b5ed8
Add cop for IO.read usage
2021-05-12 13:07:24 +01:00
Bo Anderson
6e2f194e09
rubocops/shell_commands: add cop for shell metacharacters in exec
2021-05-10 16:30:00 +01:00
Carlo Cabrera
0214196b4f
rubocops/uses_from_macos: remove openlibm
...
This is not provided by macOS. See
https://github.com/Homebrew/homebrew-core/pull/76528
2021-05-03 20:40:39 +01:00
Rylan Polster
ae89577b26
style: re-enable GitLab patch URL check
2021-04-19 11:19:35 -04:00
Rylan Polster
b5dec5fdbd
style: temporarily disable GitLab patch URL check
2021-04-19 09:13:06 -04:00
Jonathan Chang
ef1e07b88b
rubocops/patches: GitLab patches should use .diff
...
Only `.diff` URLs return output comparable to the diffs from
`git diff --full-index`. While the extra metadata from `.patch` is
nice, the instability of the patch contents is undesirable.
Co-Authored-By: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2021-04-19 09:08:14 -04:00
Nanda H Krishna
1c2d76c4e4
rubocops/patches: remove autocorrection of some URLs
2021-04-17 01:44:28 +05:30
Issy Long
a328acc9a1
rubocops/patches: Fix quoting of the patch url
when autocorrecting
...
- The autocorrections here before were leading to changes like:
```
➜ brew style --fix brewsci/science/beetl
Formula/beetl.rb:15:11: C: [Corrected] GitHub patches should use the full_index parameter: https://github.com/BEETL/BEETL/commit/ba47b6f9.patch?full_index=1
url "https://github.com/BEETL/BEETL/commit/ba47b6f9.patch "
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
➜ git diff
diff --git a/Formula/beetl.rb b/Formula/beetl.rb
index bbd049aa..7ec6d7bc 100644
--- a/Formula/beetl.rb
+++ b/Formula/beetl.rb
@@ -12,7 +12,7 @@ class Beetl < Formula
# Fixes "error: 'accumulate' is not a member of 'std'"
# Upstream commit "Little fix for compilation on mac"
patch do
- url "https://github.com/BEETL/BEETL/commit/ba47b6f9.patch "
+ url https://github.com/BEETL/BEETL/commit/ba47b6f9.patch?full_index=1
sha256 "63b67f3282893d1f74c66aa98f3bf2684aaba2fa9ce77858427b519f1f02807d"
end
end
```
- This fixes the URLs generated to have quotes:
```
➜ git diff
diff --git a/Formula/beetl.rb b/Formula/beetl.rb
index bbd049aa..7ec6d7bc 100644
--- a/Formula/beetl.rb
+++ b/Formula/beetl.rb
@@ -12,7 +12,7 @@ class Beetl < Formula
# Fixes "error: 'accumulate' is not a member of 'std'"
# Upstream commit "Little fix for compilation on mac"
patch do
- url "https://github.com/BEETL/BEETL/commit/ba47b6f9.patch "
+ url "https://github.com/BEETL/BEETL/commit/ba47b6f9.patch?full_index=1 "
sha256 "63b67f3282893d1f74c66aa98f3bf2684aaba2fa9ce77858427b519f1f02807d"
end
end
```
2021-04-16 19:41:02 +01:00
Bo Anderson
450bc4ab33
Fix brew style
2021-03-26 14:11:03 +00:00
Bo Anderson
9063945b3e
Promote shell commands audit to global cop
2021-03-17 20:45:41 +00:00
Shaun Jackman
0bba3bc6f6
rubocops: Permit uses_from_macos "cyrus-sasl"
...
macOS provides /usr/lib/libsasl2.dylib
2021-03-10 08:16:24 -08:00
danielnachun
24af65302d
add pcsc-lite to uses_from_macos
2021-03-08 23:40:29 -08:00
Mike McQuaid
61427d6682
Merge pull request #10770 from SeekingMeaning/unless_logical_operators
...
rubocops: use `Style/UnlessLogicalOperators`
2021-03-05 11:45:42 +00:00
nandahkrishna
d68452f232
rubocops/patches: autocorrect some offenses
2021-03-04 12:36:18 +05:30
Seeker
7e7274aaeb
rubocops: use Style/UnlessLogicalOperators
...
Replaces `Style/UnlessMultipleConditions`
2021-03-03 01:39:11 -08:00
Nanda H Krishna
b9cbeb3019
Merge pull request #10608 from nandahkrishna/assignment-condition-parentheses
...
style: use parentheses for assignment in conditions
2021-02-15 18:43:54 +05:30
nandahkrishna
8e5451df2f
style: use parentheses for assignment in conditions
2021-02-12 18:33:37 +05:30
Mike McQuaid
e8c71aeb8c
rubocops/lines: check for if ENV["CI"]
usage.
...
Suggested in:
https://github.com/Homebrew/homebrew-core/pull/70675#issuecomment-775092539
2021-02-12 11:25:44 +00:00
Michka Popoff
865fb15ad7
on_os block: allow to contain conflicts_with
...
Some conflicts are os-specific.
2021-02-08 13:27:04 +01:00
Rylan Polster
5f57601fd8
style: re-enable bottle order cop
2021-02-04 17:18:20 -05:00
Carlo Cabrera
2de172e050
rubocops/bottle: disable bottle order check
...
This is causing CI failures at homebrew/core [1], so let's disable this
for now.
[1] 01b6830646
2021-02-04 11:18:09 +00:00
Seeker
4c42d717fd
rubocops: add cops to check bottle format, indentation, and order
...
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
Co-authored-by: Seeker <meaningseeking@protonmail.com>
2021-02-03 20:46:20 -05:00
Mike McQuaid
d6957a3acb
Homebrew 3.0.0 deprecations/disables
2021-01-29 19:50:24 +00:00
Michka Popoff
38ae6e0c0d
style: re-enable sha256 checks for bottle blocks
...
Follow up PR to #10450
2021-01-28 20:35:31 +01:00
Michka Popoff
b87c23bb7e
style: do not fail on sha256 lines with cellar information
...
Fixes:
1-01-28T17:17:10.7152456Z [31m==>[0m [1m[31mFAILED[0m[0m
2021-01-28T17:17:10.7163169Z [36mFormula/dhall-json.rb[0m:14:12: [33mC[0m: sha256 should be 64 characters
2021-01-28T17:17:10.7175011Z sha256 cellar: :any_skip_relocation, big_sur: "a1e0cb4f7e4a7e0994b43ecd783240356631d36655cfbf59a903cc3f6a799242"
2021-01-28T17:17:10.7176620Z ^^^^^^
2021-01-28T17:17:10.7178131Z [36mFormula/dhall-json.rb[0m:14:15: [33mC[0m: sha256 contains invalid characters
2021-01-28T17:17:10.7179886Z sha256 cellar: :any_skip_relocation, big_sur: "a1e0cb4f7e4a7e0994b43ecd783240356631d36655cfbf59a903cc3f6a799242"
2021-01-28T17:17:10.7181198Z ^^
2021-01-28T17:17:10.7182390Z [36mFormula/dhall-json.rb[0m:15:12: [33mC[0m: sha256 should be 64 characters
2021-01-28T17:17:10.7183801Z sha256 cellar: :any_skip_relocation, catalina: "050f219d8050cf46a54487e0cad414374a5d2b4a6422d1e2e2c7a682149c3afb"
2021-01-28T17:17:10.7184956Z ^^^^^^
2021-01-28T17:17:10.7186016Z [36mFormula/dhall-json.rb[0m:15:15: [33mC[0m: sha256 contains invalid characters
2021-01-28T17:17:10.7187458Z sha256 cellar: :any_skip_relocation, catalina: "050f219d8050cf46a54487e0cad414374a5d2b4a6422d1e2e2c7a682149c3afb"
2021-01-28T17:17:10.7188630Z ^^
2021-01-28 18:27:21 +01:00
EricFromCanada
a427de5bee
capitalization fixes
...
"curl" is the binary, while "cURL" is the umbrella project.
2021-01-26 15:36:44 -05:00
Seeker
5c3dec6476
rubocops: move some methods from FormulaCop to HelperFunctions
2021-01-15 10:15:11 -08:00
Seeker
33edb9f901
rubocops: point to offending OS-specific block in resource blocks
2021-01-13 23:18:32 -08:00