Skip to content

Commit

Permalink
Cleanup various TODOs
Browse files Browse the repository at this point in the history
These were also easily fixed, already fixed or incorrect and
non-controversial.

Co-authored-by: Issy Long <issyl0@github.com>
  • Loading branch information
MikeMcQuaid and issyl0 committed Sep 3, 2023
1 parent e7d0625 commit c740e89
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
7 changes: 3 additions & 4 deletions Library/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ Naming/HeredocDelimiterNaming:
Naming/InclusiveLanguage:
CheckStrings: true
FlaggedTerms:
# TODO: If possible, make this stricter.
slave:
AllowedRegex:
- "gitslave" # Used in formula `gitslave`
Expand Down Expand Up @@ -392,12 +391,12 @@ Style/NumericLiterals:
Exclude:
- "**/Brewfile"

# TODO: These are pre-existing violations and should be corrected
# to define methods so that call sites can be type-checked.
Style/OpenStructUse:
Exclude:
- "Homebrew/cli/args.rb"
- "Taps/**/*.rb"
# TODO: This is a pre-existing violation and should be corrected
# to define methods so that call sites can be type-checked.
- "Homebrew/cli/args.rb"

# Rescuing `StandardError` is an understood default.
Style/RescueStandardError:
Expand Down
1 change: 0 additions & 1 deletion Library/Homebrew/cmd/fetch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ def self.fetch
begin
formula.clear_cache if args.force?

# TODO: Deprecate `--bottle-tag`.
bottle_tag = if (bottle_tag = args.bottle_tag&.to_sym)
Utils::Bottles::Tag.from_symbol(bottle_tag)
else
Expand Down
14 changes: 11 additions & 3 deletions Library/Homebrew/download_strategy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,22 @@ def fetch(timeout: nil); end

# Disable any output during downloading.
#
# TODO: Deprecate once we have an explicitly documented alternative.
#
# @api public
sig { void }
def shutup!
def quiet!
@quiet = true
end

# Disable any output during downloading.
#
# @deprecated
# @api private
sig { void }
def shutup!
# odeprecated "AbstractDownloadStrategy#shutup!", "AbstractDownloadStrategy#quiet!"
quiet!
end

def quiet?
Context.current.quiet? || @quiet
end
Expand Down
3 changes: 0 additions & 3 deletions Library/Homebrew/readall.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ def valid_tap?(tap, aliases: false, no_simulate: false, os_arch_combinations: ni
success = false unless valid_formulae?(tap.formula_files)
success = false unless valid_casks?(tap.cask_files)
else
# TODO: Remove this default case once `--os` and `--arch` are passed explicitly to `brew readall` in CI.
os_arch_combinations ||= [*MacOSVersion::SYMBOLS.keys, :linux].product(OnSystem::ARCH_OPTIONS)

os_arch_combinations.each do |os, arch|
bottle_tag = Utils::Bottles::Tag.new(system: os, arch: arch)
next unless bottle_tag.valid_combination?
Expand Down

0 comments on commit c740e89

Please sign in to comment.