dev-cmd/typecheck: add --all switch
This commit is contained in:
		
							parent
							
								
									48bf0cc7ad
								
							
						
					
					
						commit
						2ca517c79a
					
				@ -20,6 +20,9 @@ module Homebrew
 | 
			
		||||
             description: "Silence all non-critical errors."
 | 
			
		||||
      switch "--update",
 | 
			
		||||
             description: "Update RBI files."
 | 
			
		||||
      switch "--all",
 | 
			
		||||
             depends_on:  "--update",
 | 
			
		||||
             description: "Regenerate all RBI files rather than just updated gems."
 | 
			
		||||
      switch "--suggest-typed",
 | 
			
		||||
             depends_on:  "--update",
 | 
			
		||||
             description: "Try upgrading `typed` sigils."
 | 
			
		||||
@ -52,9 +55,11 @@ module Homebrew
 | 
			
		||||
          "did_you_mean", # RBI file is already provided by Sorbet
 | 
			
		||||
          "webrobots", # RBI file is bugged
 | 
			
		||||
        ]
 | 
			
		||||
        tapioca_args = ["--exclude", *excluded_gems]
 | 
			
		||||
        tapioca_args << "--all" if args.all?
 | 
			
		||||
 | 
			
		||||
        ohai "Updating Tapioca RBI files..."
 | 
			
		||||
        system "bundle", "exec", "tapioca", "gem", "--exclude", *excluded_gems
 | 
			
		||||
        system "bundle", "exec", "tapioca", "gem", *tapioca_args
 | 
			
		||||
        system "bundle", "exec", "parlour"
 | 
			
		||||
        system "bundle", "exec", "srb", "rbi", "hidden-definitions"
 | 
			
		||||
        system "bundle", "exec", "srb", "rbi", "todo"
 | 
			
		||||
 | 
			
		||||
@ -1965,6 +1965,7 @@ _brew_tc() {
 | 
			
		||||
  case "${cur}" in
 | 
			
		||||
    -*)
 | 
			
		||||
      __brewcomp "
 | 
			
		||||
      --all
 | 
			
		||||
      --debug
 | 
			
		||||
      --dir
 | 
			
		||||
      --fail-if-not-changed
 | 
			
		||||
@ -2033,6 +2034,7 @@ _brew_typecheck() {
 | 
			
		||||
  case "${cur}" in
 | 
			
		||||
    -*)
 | 
			
		||||
      __brewcomp "
 | 
			
		||||
      --all
 | 
			
		||||
      --debug
 | 
			
		||||
      --dir
 | 
			
		||||
      --fail-if-not-changed
 | 
			
		||||
 | 
			
		||||
@ -1333,6 +1333,7 @@ __fish_brew_complete_arg 'tap-new' -a '(__fish_brew_suggest_taps_installed)'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
__fish_brew_complete_cmd 'tc' 'Check for typechecking errors using Sorbet'
 | 
			
		||||
__fish_brew_complete_arg 'tc' -l all -d 'Regenerate all RBI files rather than just updated gems'
 | 
			
		||||
__fish_brew_complete_arg 'tc' -l debug -d 'Display any debugging information'
 | 
			
		||||
__fish_brew_complete_arg 'tc' -l dir -d 'Typecheck all files in a specific directory'
 | 
			
		||||
__fish_brew_complete_arg 'tc' -l fail-if-not-changed -d 'Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update'
 | 
			
		||||
@ -1374,6 +1375,7 @@ __fish_brew_complete_arg 'tests' -l verbose -d 'Make some output more verbose'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
__fish_brew_complete_cmd 'typecheck' 'Check for typechecking errors using Sorbet'
 | 
			
		||||
__fish_brew_complete_arg 'typecheck' -l all -d 'Regenerate all RBI files rather than just updated gems'
 | 
			
		||||
__fish_brew_complete_arg 'typecheck' -l debug -d 'Display any debugging information'
 | 
			
		||||
__fish_brew_complete_arg 'typecheck' -l dir -d 'Typecheck all files in a specific directory'
 | 
			
		||||
__fish_brew_complete_arg 'typecheck' -l fail-if-not-changed -d 'Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update'
 | 
			
		||||
 | 
			
		||||
@ -1631,6 +1631,7 @@ _brew_tap_new() {
 | 
			
		||||
# brew tc
 | 
			
		||||
_brew_tc() {
 | 
			
		||||
  _arguments \
 | 
			
		||||
    '--all[Regenerate all RBI files rather than just updated gems]' \
 | 
			
		||||
    '--debug[Display any debugging information]' \
 | 
			
		||||
    '(--file)--dir[Typecheck all files in a specific directory]' \
 | 
			
		||||
    '--fail-if-not-changed[Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update]' \
 | 
			
		||||
@ -1679,6 +1680,7 @@ _brew_tests() {
 | 
			
		||||
# brew typecheck
 | 
			
		||||
_brew_typecheck() {
 | 
			
		||||
  _arguments \
 | 
			
		||||
    '--all[Regenerate all RBI files rather than just updated gems]' \
 | 
			
		||||
    '--debug[Display any debugging information]' \
 | 
			
		||||
    '(--file)--dir[Typecheck all files in a specific directory]' \
 | 
			
		||||
    '--fail-if-not-changed[Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update]' \
 | 
			
		||||
 | 
			
		||||
@ -1478,6 +1478,8 @@ Check for typechecking errors using Sorbet.
 | 
			
		||||
  Silence all non-critical errors.
 | 
			
		||||
* `--update`:
 | 
			
		||||
  Update RBI files.
 | 
			
		||||
* `--all`:
 | 
			
		||||
  Regenerate all RBI files rather than just updated gems.
 | 
			
		||||
* `--suggest-typed`:
 | 
			
		||||
  Try upgrading `typed` sigils.
 | 
			
		||||
* `--fail-if-not-changed`:
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
.\" generated with Ronn/v0.7.3
 | 
			
		||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
 | 
			
		||||
.
 | 
			
		||||
.TH "BREW" "1" "March 2022" "Homebrew" "brew"
 | 
			
		||||
.TH "BREW" "1" "May 2022" "Homebrew" "brew"
 | 
			
		||||
.
 | 
			
		||||
.SH "NAME"
 | 
			
		||||
\fBbrew\fR \- The Missing Package Manager for macOS (or Linux)
 | 
			
		||||
@ -2106,6 +2106,10 @@ Silence all non\-critical errors\.
 | 
			
		||||
Update RBI files\.
 | 
			
		||||
.
 | 
			
		||||
.TP
 | 
			
		||||
\fB\-\-all\fR
 | 
			
		||||
Regenerate all RBI files rather than just updated gems\.
 | 
			
		||||
.
 | 
			
		||||
.TP
 | 
			
		||||
\fB\-\-suggest\-typed\fR
 | 
			
		||||
Try upgrading \fBtyped\fR sigils\.
 | 
			
		||||
.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user