Douglas Eichelberger
9075cbae62
brew style --fix
2023-04-21 09:58:50 -07:00
Douglas Eichelberger
ac1e6ded9a
git grep -l '# typed: false' | xargs gsed -i 's|# typed: false||g'
2023-04-21 09:57:47 -07:00
Issy Long
3a83b5492c
rubocop: Clean up Style/BlockDelimiters
excludes and autofix offenses
...
- The defaults of using "do ... end" for multi-line blocks everywhere is
good, better than switching everything to braces everywhere.
2023-03-08 23:54:22 +00:00
EricFromCanada
dfc9906184
internal messaging fixes
2023-02-10 23:17:16 -05:00
apainintheneck
ad57705029
All --cask for linux dev cmds
...
This ability was removed around a month
ago but needs to be added back in.
Developers want to be able to use the
`bump` and `audit` commands when on Linux.
This is especially useful for CI.
2023-01-08 17:34:52 -08:00
apainintheneck
d8c2e311ab
Use odie instead of bare exception
...
The reason that odie works well here
is that it doesn't print a stacktrace
or get caught and print the help page.
2023-01-02 10:59:08 -08:00
apainintheneck
a8384c0ce7
cli/parser: Better error message for cask on linux
...
1. Validate options before constraint violations. This allows
us to error out when --cask is passed on Linux before getting
a constraint violation when --cask and --formula are set.
2. Skip printing the help page when --cask is passed on Linux.
2022-12-31 12:34:18 -08:00
apainintheneck
35500130c4
Update parser tests
...
- Remove named_args linux specs now that that
logic has been moved to the parser
2022-12-04 23:02:44 -08:00
apainintheneck
b7e28ef48f
Make :formula? the default on Linux
...
This makes :formula? the default whenever
defined throughout the codebase on Linux.
It also makes :cask? illegal for all Linux
users.
2022-12-04 19:43:12 -08:00
apainintheneck
a178fc6a88
Cleanup no cask on linux specs
2022-10-02 08:51:17 -07:00
apainintheneck
020c50e588
Warn linux users about using --cask
2022-10-01 16:11:39 -07:00
apainintheneck
1d5c668110
Remove unused parser option required_for
2022-06-08 15:23:58 -07:00
Issy Long
6b76fd012a
Fix (auto-correct) RuboCop RSpec/BeNil
offenses
2022-03-01 00:10:10 +00:00
FnControlOption
326321c1fd
cli/parser: allow commands that look like options
2021-08-25 14:34:57 -07:00
Rylan Polster
08b44afcdf
cli/parser: allow options to be hidden
2021-06-08 22:02:32 -04:00
John Bampton
1691e615fe
Fix spelling
2021-05-08 11:20:01 +10:00
Bo Anderson
8e98ce69f3
Stricter handling of CLI args
2021-03-18 16:41:57 +00:00
Mike McQuaid
d6957a3acb
Homebrew 3.0.0 deprecations/disables
2021-01-29 19:50:24 +00:00
Rylan Polster
01e894e9c6
parser: create NumberOfNamedArgumentsError
...
And commit `brew man` changes
2021-01-23 15:26:21 -05:00
Rylan Polster
b7b624c9bf
parser: clarify errors for invalid number of args
2021-01-23 15:06:44 -05:00
Rylan Polster
1e5a43d5f3
parser: fix tests
2021-01-18 21:20:11 -05:00
Rylan Polster
b7977244ea
parser: automatically generate usage banners
2021-01-18 21:16:24 -05:00
Rylan Polster
4710be2fb3
parser: add some more tests
2021-01-14 20:45:26 -05:00
Rylan Polster
74c1010256
parser: add tests for named methods
2021-01-14 15:14:10 -05:00
Rylan Polster
3a6f34d27b
cli/parser: add tests for inferring option names
2020-12-25 15:57:09 -05:00
Markus Reiter
3ee66d8c0d
Add type annotations related to upgrade.
2020-11-16 19:45:15 +01:00
Markus Reiter
5bc626bbe1
Completely deprecate Homebrew.args
.
2020-11-11 08:52:55 +01:00
Markus Reiter
24ae318a3d
Move type annotations into files.
2020-10-10 14:59:39 +02:00
William Ma
fa7bd3bff6
args: Migrate usage of args loading methods to args.named
2020-08-23 09:02:20 -04:00
Mike McQuaid
3a91c37e66
Fix RuboCop checks.
2020-08-19 17:12:32 +01:00
Markus Reiter
4c833b241d
Fix parsing of negative options.
2020-08-14 20:03:15 +02:00
Markus Reiter
b48bc316e0
Use CLI::Parser
for cask
commands.
2020-08-13 05:15:15 +02:00
Markus Reiter
4381c32524
Add test for parsing with ignore_invalid_options
.
2020-07-31 15:07:17 +02:00
Markus Reiter
d4c2ffd705
Refactor CLI::Parser
.
2020-07-31 15:07:17 +02:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig.
2020-04-07 09:58:26 +01:00
Gautham Goli
22e25dd593
argv: move formulae to cli/args
2019-12-11 16:36:23 +05:30
Zach Auten
fd429d0d75
Moved kegs from ARGV to args.rb
2019-11-09 11:56:47 -05:00
Gautham Goli
e88f6b9da9
args: Add passthrough method and tests
2019-09-26 10:33:40 +05:30
Gautham Goli
d18b122272
cli_args: Fix options_only and flags_only
2019-09-22 20:28:43 +05:30
Mike McQuaid
963cc556d4
Revert "argv: move options_only to cli/args"
2019-09-13 09:34:43 +01:00
Mike McQuaid
7df0292f9b
Revert "argv: move flags_only to cli/args"
2019-09-13 09:12:26 +01:00
Gautham Goli
c7681c4287
argv: move flags_only to cli/args
2019-09-09 14:51:36 +05:30
Gautham Goli
4586632855
argv: move options_only to cli/args
2019-09-07 21:32:50 +05:30
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files.
2019-04-20 13:27:36 +09:00
Mike McQuaid
ae63381bd9
cli/parser: use cli/args and tweak freeze behaviour.
2019-04-17 22:16:58 +09:00
Mike McQuaid
e40b171127
Rename cli_parser to cli/parser.
2019-04-17 22:16:50 +09:00