Douglas Eichelberger
0caaa1fa36
Vendor SafeNavigationWithBlank cop
2024-01-26 15:03:59 -08:00
Douglas Eichelberger
665bda0fbd
Vendor Presence cop
2024-01-26 15:03:59 -08:00
Douglas Eichelberger
f99d39faf9
Vendor CompactBlank cop
2024-01-26 15:03:59 -08:00
Douglas Eichelberger
9d081a67cc
Replace Rails/NegateInclude with Inverse/Invertible cops
2024-01-26 12:27:50 -08:00
Douglas Eichelberger
8c832e0905
Remove some fixed FIXMEs
2024-01-26 12:00:13 -08:00
Issy Long
a6b8a795b4
Merge pull request #16365 from issyl0/rubocop-cask-zap-arrays-alphabetical
...
Add a new RuboCop for alphabetizing `zap trash` array elements
2024-01-24 21:34:18 +00:00
Issy Long
693a27d48b
Treat zap
and uninstall
the same
...
- Since `zap` can have more than just `trash`.
2024-01-21 19:48:30 +00:00
Issy Long
d5f9eef1b5
Empty line after guard clause, gah
2024-01-21 12:47:33 +00:00
Issy Long
458844af44
Move multi-line comments with the code they're 'attached' to
...
Co-authored-by: Bevan J. Kay <email@bevankay.me>
2024-01-21 12:42:22 +00:00
Issy Long
eec7a96fbe
Use Ruby 3.1's intersect\?
method
2024-01-20 00:38:34 +00:00
Issy Long
e9bcb64000
Double quotes not single
2024-01-20 00:35:40 +00:00
Bevan J. Kay
779f1bba7d
Move comments in tandem with the lines they belong to
2024-01-20 00:03:34 +00:00
Douglas Eichelberger
8e9d294df2
Add File.atomic_write to extend/
2024-01-19 13:36:16 -08:00
Issy Long
c63723bd7d
Merge pull request #16501 from issyl0/rubocop-new-rules-style-redundant-freeze
...
Fix RuboCop `Style/RedundantFreeze` offenses
2024-01-19 15:05:08 +00:00
Issy Long
f682147598
Fix RuboCop Style/RedundantFreeze
offenses
2024-01-18 22:20:01 +00:00
Issy Long
0e27dc2564
Fix RuboCop Style/ArrayIntersect
offenses
2024-01-18 14:11:43 +00:00
Issy Long
dae9b0cd53
very wip and bad comment handling
2024-01-18 12:53:23 +00:00
Issy Long
338e30ff9b
There are more arrays that contain non-alphabetizeable commands
2024-01-14 20:55:51 +00:00
Issy Long
6a1cb62b42
Appease RuboCop
2024-01-14 20:55:22 +00:00
Michael Cho
b4657e1eef
rubocops/components_redundancy: stable/head block removal
...
When a `stable do` or `head do` block only contains `url`, `sha256`,
`mirror`, and/or `version`, then the block should be removed.
2024-01-12 19:07:10 -05:00
Patrick Linnane
3fdba532a2
various: fix miscellaneous typos
...
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-01-12 10:56:49 -08:00
Issy Long
9070f6d829
Check uninstall
too, avoiding arrays containing commands
2024-01-02 23:31:13 +00:00
Michael Cho
2f3f017a6e
rubocops/uses_from_macos: audit when depends_on :linux
2023-12-30 18:30:05 -05:00
Douglas Eichelberger
caf8259ae6
Code review changes
2023-12-27 15:29:33 -08:00
Douglas Eichelberger
3abbf4447e
Some minor regexp match perf improvements
2023-12-27 13:16:36 -08:00
Issy Long
fb124f92ed
Ignore non-zap trash
methods
2023-12-22 00:41:56 +00:00
Issy Long
b9f13fc35d
Better detection and replacement of non-alphabetized arrays
...
- Use `sort_by` to sort the array, rather than comparing each element
to the next.
- This doesn't error with complaints about clobbering at all when run on
`homebrew/cask`, hurray. And it also handles interpolations correctly,
rather than ignoring them.
Co-authored-by: Bevan Kay <email@bevankay.me>
2023-12-22 00:26:38 +00:00
Issy Long
f4754baa00
Ignore zap trash
stanzas with interpolation
...
- Interpolating the version into a path is a common pattern, but the interpolations
trip up the alphabetization autocorrect quite spectacularly, so let's
ignore them (for now?).
2023-12-22 00:19:03 +00:00
Mike McQuaid
a21b2dc833
rubocops/cask/on_system_conditionals: allow blocks.
...
Without this, there's an infinite loop on `brew style --fix` if you have
a `if Hardware::CPU.arm?` in a `postflight` block where it will change
back and forward between `if` and `on_os` syntax forever.
2023-12-21 10:00:46 +00:00
Issy Long
73b3ace77c
Apparently N
is alphabetically before c
; downcase the comparison
2023-12-21 01:25:18 +00:00
Mike McQuaid
4d93a50ad6
Merge pull request #16364 from cho-m/pybuild-rubocopy
...
rubocops/lines: consistency with single non-runtime Python
2023-12-20 11:57:17 +00:00
Rylan Polster
841a0623c6
Don't have a comment saying to remove this cop
2023-12-19 20:47:20 -05:00
Issy Long
8cf58e36e6
Add a new RuboCop for alphabetizing zap trash
array elements
...
- Part of issue 16323.
- Previously this was being done manually by Cask maintainers.
- While we're here, enforce that the `zap trash` path is not in `[]` if
it only contains a single element.
- This is buggy on actual Casks, hence the draft PR.
2023-12-19 23:42:08 +00:00
Michael Cho
61b512c72c
rubocops/lines: consistency with single non-runtime Python
2023-12-19 15:20:45 -05:00
Rylan Polster
8d8cd23414
Add rubocop to enforce deprecate!
over discontinued
2023-12-17 16:49:53 -05:00
Rylan Polster
53c1e6ecdb
Add deprecate!
and disable!
to cask stanza order
2023-12-16 20:01:47 -05:00
Bo Anderson
5692c8ecbf
Fix style violations under newer RuboCop
2023-12-14 05:47:12 +00:00
Bo Anderson
b42256d286
Deprecate, disable & delete code for Homebrew 4.2.0
2023-12-07 23:42:13 +00:00
Rylan Polster
f98b8f948c
Add rubocop to remove MacOS
references
2023-11-22 21:19:01 -05:00
Mahrud Sayrafi
eebffa8be3
audit(github): also permit refs/heads in GitHub URLs
2023-10-28 00:53:49 -05:00
Rui Chen
b954e20d12
audit(github): also need to consider commit artifact
...
Signed-off-by: Rui Chen <rui@chenrui.dev>
2023-10-23 14:58:03 -04:00
Rui Chen
a496f6708e
audit(github): prefer /archive/refs/tags
urls over /archive
...
Signed-off-by: Rui Chen <rui@chenrui.dev>
2023-10-23 11:00:27 -04:00
Issy Long
5ddebe1640
rubocops/text: Declare "revision 0" in formulae as unnecessary
...
- This came up in a user contribution recently so here's a RuboCop for it.
2023-10-04 23:28:30 +01:00
Dawid Dziurla
b4366b61ef
audit: check for cargo build only in install method
2023-08-18 11:20:56 +02:00
Mike McQuaid
d30fee25e4
formula_cop: fix style_exceptions_dir
handling.
...
This needed to be adjusted to handle a sharded homebrew/core and
repositories with formulae in the root.
2023-08-09 15:20:57 +01:00
Mike McQuaid
68aa5da833
Merge pull request #15614 from carlocab/quictls-cop
...
rubocops/lines: disallow `quictls` dependencies in homebrew/core
2023-07-18 10:44:09 +01:00
Francois-Xavier Coudert
639f59473d
Do not insist on using macOS texinfo
2023-07-18 08:57:11 +02:00
Carlo Cabrera
95c06f5ad5
rubocops/lines: simplify PyoxidizerCheck
2023-07-14 12:57:23 +08:00
Carlo Cabrera
470c1e6683
Implement rustup
audit as a style check
...
This allows results to be cached and auto-corrected.
2023-07-12 10:49:47 +08:00
Carlo Cabrera
83f2a69acb
rubocops/lines: disallow quictls
dependencies in homebrew/core
...
QuicTLS is a fork of OpenSSL that adds support for QUIC. We'll probably
end up adding it to homebrew/core at some point (see
Homebrew/homebrew-core#134975 ), but I don't think we want to actually
use it as a dependency of any formulae in place of OpenSSL.
We ought to only allow it for software that actually require QuicTLS in
place of OpenSSL, but I'm not aware of any existing formulae that have
this requirement.
2023-07-01 23:07:28 +08:00