92 Commits

Author SHA1 Message Date
Issy Long
41466025cc
dev-cmd/style: Properly clean up the --display-cop-names option
- I remember making these changes as part of the RuboCop bump
  Dependabot PR (15136), but I must have not actually pushed them. Odd.
2023-04-11 00:19:09 +01:00
Douglas Eichelberger
b8aa619f2f brew style --fix 2023-03-15 18:21:41 -07:00
Douglas Eichelberger
827fc87cde Enable more typing 2023-03-15 14:29:15 -07:00
Douglas Eichelberger
ed8363fd72 Consolidate some rubocop configurations 2023-02-21 16:50:29 -08:00
Sean Molenaar
f30779c6bf
Update package/scripts/postinstall 2022-12-23 19:36:13 +01:00
Mike McQuaid
a92c9eed82
style: check more shell scripts.
We were missing a few here so add them. Also, fix the changes in
`on-create-command.sh` that this catches.
2022-11-09 17:29:38 +00:00
Bo Anderson
e03548fc7a
style: use HOMEBREW_RUBY_EXEC_ARGS 2022-11-05 04:18:10 +00:00
Bo Anderson
a776d5f02b
Workaround macOS system Ruby issue picking incorrect native gem archs 2022-10-14 01:30:38 +01:00
Mike McQuaid
6b697470fd
brew style --fix
For https://github.com/Homebrew/brew/pull/13671
2022-08-10 14:19:33 +01:00
Bo Anderson
f804a22dc0
style: use new autocorrect flag 2022-06-17 19:47:57 +01:00
Mike McQuaid
bf34f21065
style: use long shfmt arguments.
This allows removing documentation explaining them.
2022-05-16 17:19:16 -04:00
Bryce Glover
1763beb8f6
Revert "Enable .rubocop.yml in taps" 2022-03-28 20:11:04 -04:00
danielbayley
59885d7719 Enable .rubocop.yml in taps 2022-03-24 20:28:50 +00:00
Xuehai Pan
2466353415 style: use short flags for patch command for compatibility 2022-01-03 22:13:32 +08:00
Xuehai Pan
62a63063bb Apply suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Signed-off-by: XuehaiPan <XuehaiPan@pku.edu.cn>
2021-11-24 01:06:27 +08:00
XuehaiPan
9ef52080e3 utils: extract common word "for" in reason 2021-11-23 23:59:09 +08:00
XuehaiPan
d749173adc utils: mark reason as keyword argument in ensure_formula_installed! 2021-11-23 23:31:22 +08:00
XuehaiPan
3376479e95 utils: add method ensure_formula_installed! 2021-11-23 22:48:39 +08:00
Mike McQuaid
e38e25dfd1
Merge pull request #12397 from XuehaiPan/shellcheckrc
.shellcheckrc: disable unneeded check SC2310-SC2312 globally
2021-11-08 16:15:21 +00:00
XuehaiPan
d78c11361a .shellcheckrc: disable unneeded check SC2310-SC2312 globally 2021-11-08 23:50:54 +08:00
Xuehai Pan
c1d2f8a2c6
style: catch failures while applying patches
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-11-08 22:50:20 +08:00
XuehaiPan
b86fdfeb09 style: use long options for patch command 2021-11-08 22:34:49 +08:00
XuehaiPan
67c619d4f2 style: use popen_write to apply patches 2021-11-08 20:10:30 +08:00
Xuehai Pan
a56ab26e88
Merge branch 'master' into shellcheck-autofix 2021-11-08 12:02:54 +08:00
Bo Anderson
98c082ca94
style: ignore SC2310-2312 for now 2021-11-08 03:11:39 +00:00
XuehaiPan
fa85d00b95 style: implement shellcheck autofix in brew style --fix 2021-11-07 21:12:03 +08:00
Mike McQuaid
bc687314af
style: better handle HOMEBREW_REPOSITORY.
If you do `brew style --fix .` in `HOMEBREW_REPOSITORY` it behaves
very weirdly and uses the incorrect rules. If this is passed, assume
that people want the same behaviour as `brew style --fix`.

While we're here, do some argument naming and code cleanup.
2021-09-30 11:06:09 +01:00
XuehaiPan
966189d07d style: add shfmt exit status to brew style 2021-09-17 00:05:37 +08:00
XuehaiPan
03017a84b4 style: move inplace flag to the front of argument list 2021-09-16 21:20:56 +08:00
XuehaiPan
2688e7e56b style: apply suggestions from code review 2021-09-16 19:54:07 +08:00
XuehaiPan
03c7a142be style: add keyward argument inplace to run_shfmt 2021-09-16 00:08:29 +08:00
XuehaiPan
9efde249c1 style: add shfmt implementation 2021-09-15 22:12:01 +08:00
XuehaiPan
2855ae18df style: brew style always use latest brewed shellcheck 2021-09-15 15:00:23 +08:00
XuehaiPan
bc0663baba style: brew style check Dockerfile as shell script 2021-09-15 15:00:23 +08:00
hyuraku
fcdeaf7eca chnage condition for shellcheck 2021-09-07 20:47:48 +09:00
Bo Anderson
a06d136d2c
Move Sorbet gems into an optional group 2021-06-11 08:10:30 +01:00
Gautham Goli
cf733a3c4f Enable shellcheck warnings in brew style 2021-05-18 17:10:44 +05:30
Mike McQuaid
7af68d0f8e
Fix shellcheck failures
A new version of `shellcheck` (I think?) brought us so new warnings and
errors.

To fix:
- pass `--source-path` so we don't need to stop `shellcheck` trying to
  read sourced files every time
- disable some more warnings/errors we don't care about fixing
2021-04-22 13:18:44 +01:00
Gautham Goli
7abfb11a0b Use shellcheck on Bash completion file 2021-04-11 19:02:25 +05:30
Markus Reiter
c2c93d1cc9
Run shellcheck on cask utils and shim scripts. 2021-04-02 03:03:54 +02:00
Rylan Polster
79e93f54e2
Ignore more parser warnings 2021-02-14 11:58:05 -05:00
Rylan Polster
3595ac1f7f
style: call rubocop directly 2021-02-10 22:36:42 -05:00
Mike McQuaid
eea27d9a60
style: remove HOMEBREW_RUBY_WARNINGS
This is hiding legitimate errors which can cause CI failures.
2021-01-29 20:56:59 +00:00
Rylan Polster
bcac46bccb style: use Homebrew shellcheck if installed 2021-01-01 03:26:08 -05:00
Mike McQuaid
d4461a2728
style: fix autocorrect.
For some reason this doesn't seem to work without `-A`.
2020-12-31 13:30:24 +00:00
Mike McQuaid
b889a6bda1
style: output warnings on debug/verbose.
Otherwise this will hide actual errors.
2020-12-31 13:30:23 +00:00
Markus Reiter
bdfa7a757d Hide parser warning. 2020-12-18 19:37:29 +01:00
Rylan Polster
c181c9995e style: add --reset-cache option 2020-11-30 18:18:50 -05:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00