118 Commits

Author SHA1 Message Date
Michael Cho
61b512c72c
rubocops/lines: consistency with single non-runtime Python 2023-12-19 15:20:45 -05:00
Rylan Polster
f98b8f948c
Add rubocop to remove MacOS references 2023-11-22 21:19:01 -05: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
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
Markus Reiter
8274920217
Rename OS::Mac::Version to MacOSVersion. 2023-05-09 05:08:38 +02:00
Douglas Eichelberger
08af78a2a5 brew style --fix 2023-04-25 09:26:24 -07:00
Issy Long
9302090404
Revert "Allow resource blocks to include on_* blocks or conditionals"
This reverts commit b4cd90a3cc47bc2f94e4449fa99b37445b878a5f.

This should never have been merged, given its extraction into PR 15062
had a reasonably long discussion and was decided against in
https://github.com/Homebrew/homebrew-core/pull/126705#discussion_r1149545828,
but I didn't realise I hadn't backed it out of PR 15060 before it was
approved and I merged it.
2023-03-29 00:40:46 +01:00
Issy Long
b4cd90a3cc
Allow resource blocks to include on_* blocks or conditionals
- d2a58a7853 was deemed "unwiedly", but it passes the RuboCop.
- https://github.com/Homebrew/homebrew-core/pull/126705#discussion_r1148558613 is more wieldy, but needed RuboCop tweaks.
2023-03-26 18:25:33 +01:00
Mike McQuaid
7ac31f7d65
Merge pull request #14732 from dduugg/formula-cop-mixin
Refactor FormulaCop as an abstract class
2023-02-21 23:05:58 +00:00
Douglas Eichelberger
387d2f859f Use exclude_from_registry instead 2023-02-20 18:14:47 -08:00
Douglas Eichelberger
d9db5e8825 Refactor FormulaCop as a mixin 2023-02-20 18:14:47 -08:00
Issy Long
298bb65dfb
rubocop: Entirely disable Metrics cops
- These are arbitrary length limits that had a load of disables in code.
- The limits were only increasing over time rather than decreasing.
- Fixing the problematic code to be shorter would take a long time for
  questionable gain since the problem has been around so long.
2023-02-21 00:34:17 +00:00
Douglas Eichelberger
6c93f6fe91 Enable typing in rubocops 2023-02-16 15:51:20 -08:00
Carlo Cabrera
86161e8c32
Fix test failures 2023-01-24 14:19:28 +08:00
Carlo Cabrera
8c5e6e10a7
rubocops/lines: update hard-coded compiler check
1. `llvm-g{cc,++}` has been gone for a long time. We don't need to check
   for this anymore.
2. Also check for calling the compiler as `cc`, `c89`, `c99`, or `c++`.
2023-01-24 14:04:51 +08:00
Mike McQuaid
e71d1e2dd4
rubocop/lines: cleanup weird interpolation. 2022-12-13 11:37:05 +00:00
Bo Anderson
6ede5d2dd5
rubocops: handle empty formula body in various cops 2022-11-05 04:40:16 +00:00
Max Eisner
088dce08d6
fix: return if no install def
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
2022-09-06 14:42:03 +02:00
Max Eisner
2c4ef98f0d
fix additional quotes already handled by #inspect 2022-09-06 14:42:03 +02:00
Max Eisner
ea4fb0fe09
update command comparison to *commands vararg 2022-09-06 14:42:03 +02:00
Max Eisner
3fec64f386
skip offenses for heredoc scripts and calls with custom env
needed for e.g. àwscli`, `hatch`, `pipenv`
2022-09-06 14:42:02 +02:00
Max Eisner
02c9cc0720
add check if executable and subcmd are the same before combining
e.g. ˚jrsonnet˚ needs this
2022-09-06 14:42:01 +02:00
Max Eisner
cf84800939
fix style 2022-09-06 14:42:01 +02:00
Max Eisner
5b3f5dcbf2
fix whitespace removal, fix string concatenation 2022-09-06 14:42:01 +02:00
Max Eisner
8282b15a2a
simplify and unify node handling 2022-09-06 14:42:01 +02:00
Max Eisner
e18432089b
fix typecheck 2022-09-06 14:42:00 +02:00
Max Eisner
ab6a4d757a
fix dangling enclosed comma 2022-09-06 14:42:00 +02:00
Max Eisner
a175d6b7a1
fix style 2022-09-06 14:42:00 +02:00
Max Eisner
a56feff5d0
adapt to executable and subcmd being mandatory 2022-09-06 14:42:00 +02:00
Max Eisner
60db35096f
simplify and comment dangling comma handling 2022-09-06 14:42:00 +02:00
Max Eisner
ab09d15703
remove newlines left behind after correction 2022-09-06 14:42:00 +02:00
Max Eisner
de7ef64f61
use #inspect instead of wrapping symbols 2022-09-06 14:41:59 +02:00
Max Eisner
a002463362
#delete_suffix instead of #sub 2022-09-06 14:41:59 +02:00
Max Eisner
1b15d03634
remove always-true condition 2022-09-06 14:41:59 +02:00
Max Eisner
8398dfbae0
fix condition array substraction 2022-09-06 14:41:59 +02:00
Max Eisner
06518ec613
add RuboCop to combine multiple calls 2022-09-06 14:41:59 +02:00
Max Eisner
e4b67e84dd
fix shell parameter type 2022-09-06 14:41:59 +02:00
Max Eisner
d963a1ae2f
style 2022-09-06 14:41:59 +02:00
Max Eisner
2329844f50
refactor: naming 2022-09-06 14:41:58 +02:00
Max Eisner
50ae38a372
add :arg shell_parameter 2022-09-06 14:41:58 +02:00
Max Eisner
b901e5873d
do not use parantheses if no args given to method 2022-09-06 14:41:58 +02:00
Max Eisner
0509eebda4
fix: don't write binary param if base_name == binary/base_name 2022-09-06 14:41:58 +02:00
Max Eisner
fd98c3df58
add preliminary RuboCop for generate_completions DSL 2022-09-06 14:41:57 +02:00
Rylan Polster
af99dfba00
Refactor on_system rubocops for use in casks 2022-08-14 17:31:07 -04:00
Mike McQuaid
6b697470fd
brew style --fix
For https://github.com/Homebrew/brew/pull/13671
2022-08-10 14:19:33 +01:00
Rylan Polster
d5d6456b24
Add checks for on_system method 2022-07-24 23:01:56 +02:00
Rylan Polster
7b24ed3b4d
Update OnSystem cop to check other on_{system} methods 2022-07-24 23:01:56 +02:00
Mike McQuaid
2d5eab2e1c
brew style --fix 2022-06-30 08:56:21 +01:00