57 Commits

Author SHA1 Message Date
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
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
1c04ba7e4d
Merge pull request #8684 from reitermarkus/audit-annotations
Output annotations for `brew audit`.
2020-09-13 02:39:55 +02:00
Mike McQuaid
fb4d08a49a Fix brew style 2020-09-11 10:29:22 +01:00
Markus Reiter
23aced68d4 Output annotations for brew audit. 2020-09-10 22:23:03 +02:00
Markus Reiter
c942aafc4c
Merge pull request #8636 from reitermarkus/brew-style-casks
Support passing casks in `brew style`.
2020-09-10 02:10:51 +02:00
Markus Reiter
2a63ba4060 Support passing casks in brew style. 2020-09-09 22:15:10 +02:00
Markus Reiter
769fa066e2 Output annotations for brew cask audit. 2020-09-09 21:50:32 +02:00
Markus Reiter
ebd4ce467c Output GitHub Actions annotations for brew style. 2020-09-02 16:44:16 +02:00
Markus Reiter
9d57bfc9ba Adjust RuboCop formatter on CI. 2020-09-02 02:02:01 +02:00
Markus Reiter
776faf651d Always use default RuboCop formatter for nicer output. 2020-09-01 18:34:26 +02:00
Markus Reiter
b4d14c193f Use Homebrew::Style for brew cask style. 2020-09-01 18:34:26 +02:00
Markus Reiter
c0f64882f1 Split check_style_impl into run_rubocop and run_shellcheck. 2020-08-31 02:44:05 +02:00
Markus Reiter
6bd3dbe001 Document Style. 2020-08-26 03:13:59 +02:00
Markus Reiter
5db764f3cb Pass debug? and verbose? in brew style. 2020-08-06 16:12:52 +02:00
Markus Reiter
291eee74c4 Pass args in style instead of using global args. 2020-07-30 03:21:12 +02:00
Mike McQuaid
15a2abd9df
style: re-enable shellcheck.
Ensure that `shellcheck` is run by `brew style` again and fix the
various failures.
2020-07-07 11:53:55 +01:00
Mike McQuaid
bc27e38f18
Remove ARGV.debug?
Replace with `Homebrew.args.debug?`.

Part of #5730.
2020-05-23 14:38:58 +01:00
Mike McQuaid
5f721c6986
Cleanup ARGV.include? usage
Remove usage where `Homebrew.args` could be used instead or, due to the
`Homebrew.args` parsing, there was dead code that was never executed
(and no-one complained about not working).
2020-05-10 15:28:31 +01:00
Mike McQuaid
d52e870b07
rubocop: remove NewFormulaAudit.
This is no longer used anywhere.
2020-04-13 16:01:26 +01:00
Mike McQuaid
1e265247ca
rubocop: apply autofixes. 2020-03-13 21:16:18 +00:00
Gautham Goli
acde828a45 ARGV: Replace ARGV.verbose? with Homebrew.args.verbose? 2020-02-02 14:00:04 +01:00
Markus Reiter
e719744248 Refactor brew style. 2019-10-05 00:20:06 +02:00
Markus Reiter
a49282c318 Simplify return value logic. 2019-10-04 23:39:26 +02:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
892d0ac5fe
style: don’t run shellcheck on specified ruby file. 2019-04-18 21:42:42 +09:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
02a70496b6
style: better handle file arguments.
Fixes #5588.
2019-01-23 15:46:03 +00:00
Mike McQuaid
5c7fbaf259
Update RuboCop RSpec rules
Create a new, seperate RuboCop file that uses our RSpec rule
configuration if a specified tap has a `spec` directory.

Also, while we're here, fix up the various rules so that we don't have
any outdated TODOs, disable some rules for good and fix `brew style`
for Homebrew/bundle.
2019-01-21 13:39:11 +00:00
Mike McQuaid
efc3c0c4c0
Use bundle install in more places.
This provides a more consistent version for `rubocop` than relying on
`Homebrew.install_gem_setup_path!` (and we really want `brew style` to
provide consistent output).
2019-01-08 15:08:21 +00:00
Mike McQuaid
109e974c38
Cleanup rubocop-cask references. 2018-11-08 15:54:47 +00:00
Jan Viljanen
bca922fd5b rubocop: only use config if style is testing specified file(s) 2018-10-08 20:08:37 +02:00
Mike McQuaid
96504ec9dc
style: check Bash style with shellcheck 2018-10-07 22:08:43 +01:00
Jan Viljanen
25b9a7d35b rubocop: move requirement to configuration file
If you are using en external rubocop binary you will encounter the
following error.

.rubocop_todo.yml: RSpec/FilePath has the wrong namespace - should be Rails

By moving the option to the config file an external rubocop would be
treated equally to  brew style  without having to supply additional
command line options.
2018-09-27 04:33:11 +02:00
Mike McQuaid
da404fcb4e
Install and use RuboCop RSpec by default. 2018-09-20 13:36:41 +01:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00