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
Mike McQuaid
03f7b254e9
rubocops: fix OnOs
block checks.
...
This wasn't correctly flagging the use of `on_os` in `test do` as
invalid.
2022-03-29 19:15:03 +01:00
Carlo Cabrera
0f26522fad
rubocops/lines: disallow pyoxidizer
as a build/runtime dependency
...
PyOxidizer downloads pre-built versions of Rust and Python, and embeds
this Python into the binaries it produces.
This goes against a number of our packaging policies, so let's make sure
formulae in Homebrew/core don't do this.
See Homebrew/homebrew-core#90025 .
2021-11-30 17:36:26 +08:00
Carlo Cabrera
1ffbcc04d4
rubocops/lines: allow OS.foo?
in service
blocks
...
These seem more natural, and I don't think we need to be able to mock
service blocks on other OSs.
See Homebrew/homebrew-core#90091 .
2021-11-28 21:47:21 +08:00
Bo Anderson
4836ea0ba2
Remove XQuartz handling
2021-11-05 12:40:22 +00:00
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
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
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
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
Nanda H Krishna
5ccfbcd1d2
Autocorrect style issues with brew style --fix
2021-07-08 12:36:39 +05:30
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
Bo Anderson
9063945b3e
Promote shell commands audit to global cop
2021-03-17 20:45:41 +00: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
Mike McQuaid
d6957a3acb
Homebrew 3.0.0 deprecations/disables
2021-01-29 19:50:24 +00:00
Jonathan Chang
b8fb568021
rubocops/lines: use rubocop v1 API
2021-01-12 19:11:42 +11:00