repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/bundle/commands/cleanup.rb
Library/Homebrew/bundle/commands/cleanup.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "utils/formatter" module Homebrew module Bundle module Commands # TODO: refactor into multiple modules module Cleanup def self.reset! require "bundle/cask_dumper" require "bundle/formula...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/bundle/commands/exec.rb
Library/Homebrew/bundle/commands/exec.rb
# typed: true # frozen_string_literal: true require "English" require "exceptions" require "extend/ENV" require "utils" require "PATH" require "utils/output" module Homebrew module Bundle module Commands module Exec extend Utils::Output::Mixin PATH_LIKE_ENV_REGEX = /.+#{File::PATH_SEPARAT...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/bundle/commands/list.rb
Library/Homebrew/bundle/commands/list.rb
# typed: strict # frozen_string_literal: true require "bundle/brewfile" require "bundle/lister" module Homebrew module Bundle module Commands module List sig { params(global: T::Boolean, file: T.nilable(String), formulae: T::Boolean, casks: T::Boolean, taps: T::Boolean, ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/bundle/commands/check.rb
Library/Homebrew/bundle/commands/check.rb
# typed: strict # frozen_string_literal: true require "bundle/checker" module Homebrew module Bundle module Commands module Check sig { params(global: T::Boolean, file: T.nilable(String), no_upgrade: T::Boolean, verbose: T::Boolean, quiet: T::Boolean).void } ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/bundle/commands/install.rb
Library/Homebrew/bundle/commands/install.rb
# typed: strict # frozen_string_literal: true require "bundle/brewfile" require "bundle/installer" module Homebrew module Bundle module Commands module Install sig { params( global: T::Boolean, file: T.nilable(String), no_lock: T::Boolean,...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/bundle/commands/remove.rb
Library/Homebrew/bundle/commands/remove.rb
# typed: strict # frozen_string_literal: true require "bundle/remover" module Homebrew module Bundle module Commands module Remove sig { params(args: String, type: Symbol, global: T::Boolean, file: T.nilable(String)).void } def self.run(*args, type:, global:, file:) Homebrew::Bun...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/disable_comment.rb
Library/Homebrew/rubocops/disable_comment.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop # Checks if rubocop disable comments have a clarifying comment preceding them. class DisableComment < Base MSG = "Add a clarifying comment to the RuboCop disable comment" sig { void } def on_new_investigation s...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/lines.rb
Library/Homebrew/rubocops/lines.rb
# typed: strict # frozen_string_literal: true require "macos_version" require "rubocops/extend/formula_cop" require "rubocops/shared/on_system_conditionals_helper" module RuboCop module Cop module FormulaAudit # This cop checks for various miscellaneous Homebrew coding styles. class Lines < FormulaC...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
true
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/negate_include.rb
Library/Homebrew/rubocops/negate_include.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Homebrew # Enforces the use of `collection.exclude?(obj)` # over `!collection.include?(obj)`. # # NOTE: This cop is unsafe because false positives will occur for # receiver objects that do not have ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/files.rb
Library/Homebrew/rubocops/files.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop makes sure that a formula's file permissions are correct. class Files < FormulaCop sig { override.params(formula_nodes: FormulaNodes).void } de...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/version.rb
Library/Homebrew/rubocops/version.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop makes sure that a `version` is in the correct format. class Version < FormulaCop sig { override.params(formula_nodes: FormulaNodes).void } def ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/desc.rb
Library/Homebrew/rubocops/desc.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" require "rubocops/shared/desc_helper" module RuboCop module Cop module FormulaAudit # This cop audits `desc` in formulae. # See the {DescHelper} module for details of the checks. class Desc < FormulaCop ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/deprecate_disable.rb
Library/Homebrew/rubocops/deprecate_disable.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop audits `deprecate!` and `disable!` dates. class DeprecateDisableDate < FormulaCop extend AutoCorrector sig { override.params(formula_nodes: Fo...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/io_read.rb
Library/Homebrew/rubocops/io_read.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Homebrew # This cop restricts usage of `IO.read` functions for security reasons. class IORead < Base MSG = "The use of `IO.%<method>s` is a security risk." RESTRICT_ON_SEND = [:read, :readlines].freeze ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/conflicts.rb
Library/Homebrew/rubocops/conflicts.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop audits versioned formulae for `conflicts_with`. class Conflicts < FormulaCop extend AutoCorrector MSG = "Versioned formulae should not use `co...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/checksum.rb
Library/Homebrew/rubocops/checksum.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop makes sure that deprecated checksums are not used. class Checksum < FormulaCop sig { override.params(formula_nodes: FormulaNodes).void } def au...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/install_bundler_gems.rb
Library/Homebrew/rubocops/install_bundler_gems.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Homebrew # Enforces the use of `Homebrew.install_bundler_gems!` in dev-cmd. class InstallBundlerGems < Base MSG = "Only use `Homebrew.install_bundler_gems!` in dev-cmd." RESTRICT_ON_SEND = [:install_bundler...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/text.rb
Library/Homebrew/rubocops/text.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop checks for various problems in a formula's source code. class Text < FormulaCop extend AutoCorrector sig { override.params(formula_nodes: Form...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/shell_commands.rb
Library/Homebrew/rubocops/shell_commands.rb
# typed: strict # frozen_string_literal: true require "extend/array" require "rubocops/shared/helper_functions" require "shellwords" module RuboCop module Cop module Homebrew # https://github.com/ruby/ruby/blob/v2_6_3/process.c#L2430-L2460 SHELL_BUILTINS = %w[ ! . : b...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/options.rb
Library/Homebrew/rubocops/options.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop audits `option`s in formulae. class Options < FormulaCop DEP_OPTION = "Formulae in homebrew/core should not use `deprecated_option`." OPTION = ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/caveats.rb
Library/Homebrew/rubocops/caveats.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop ensures that caveats don't have problematic text or logic. # # ### Example # # ```ruby # # bad # def caveats # if File.ex...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/presence.rb
Library/Homebrew/rubocops/presence.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true module RuboCop module Cop module Homebrew # Checks code that can be written more easily using # `Object#presence` defined by Active Support. # # ### Examples # # ```ruby # # bad # a.prese...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/blank.rb
Library/Homebrew/rubocops/blank.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Homebrew # Checks for code that can be simplified using `Object#blank?`. # # NOTE: Auto-correction for this cop is unsafe because `' '.empty?` returns `false`, # but `' '.blank?` returns `true`. Therefore...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/livecheck.rb
Library/Homebrew/rubocops/livecheck.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop ensures that no other livecheck information is provided for # skipped formulae. class LivecheckSkip < FormulaCop extend AutoCorrector si...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/safe_navigation_with_blank.rb
Library/Homebrew/rubocops/safe_navigation_with_blank.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Homebrew # Checks to make sure safe navigation isn't used with `blank?` in # a conditional. # # NOTE: While the safe navigation operator is generally a good idea, when # checking `foo&.blank?` in a ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/keg_only.rb
Library/Homebrew/rubocops/keg_only.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop makes sure that a `keg_only` reason has the correct format. class KegOnly < FormulaCop extend AutoCorrector sig { override.params(formula_node...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/move_to_extend_os.rb
Library/Homebrew/rubocops/move_to_extend_os.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Homebrew # This cop ensures that platform specific code ends up in `extend/os`. class MoveToExtendOS < Base MSG = "Move `OS.linux?` and `OS.mac?` calls to `extend/os`." def_node_matcher :os_check?, <<~PATT...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/components_redundancy.rb
Library/Homebrew/rubocops/components_redundancy.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop checks if redundant components are present and for other component errors. # # - `url|checksum|mirror|version` should be inside `stable` block # - ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/bottle.rb
Library/Homebrew/rubocops/bottle.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop audits the `bottle` block in formulae. class BottleFormat < FormulaCop extend AutoCorrector sig { override.params(formula_nodes: FormulaNodes)...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/class.rb
Library/Homebrew/rubocops/class.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop makes sure that {Formula} is used as superclass. class ClassName < FormulaCop extend AutoCorrector DEPRECATED_CLASSES = %w[ GithubGi...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/present.rb
Library/Homebrew/rubocops/present.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Homebrew # Checks for code that can be simplified using `Object#present?`. # # ### Example # # ```ruby # # bad # !foo.nil? && !foo.empty? # # # bad # foo != nil && !foo.empty...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/homepage.rb
Library/Homebrew/rubocops/homepage.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" require "rubocops/shared/homepage_helper" module RuboCop module Cop module FormulaAudit # This cop audits the `homepage` URL in formulae. class Homepage < FormulaCop include HomepageHelper extend Auto...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/no_fileutils_rmrf.rb
Library/Homebrew/rubocops/no_fileutils_rmrf.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Homebrew # This cop checks for the use of `FileUtils.rm_f`, `FileUtils.rm_rf`, or `{FileUtils,instance}.rmtree` # and recommends the safer versions. class NoFileutilsRmrf < Base extend AutoCorrector ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/no_autobump.rb
Library/Homebrew/rubocops/no_autobump.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" require "rubocops/shared/no_autobump_helper" module RuboCop module Cop module FormulaAudit # This cop audits `no_autobump!` reason. # See the {NoAutobumpHelper} module for details of the checks. class NoAutobum...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/service.rb
Library/Homebrew/rubocops/service.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop audits the service block. class Service < FormulaCop extend AutoCorrector CELLAR_PATH_AUDIT_CORRECTIONS = T.let( { bin: ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/uses_from_macos.rb
Library/Homebrew/rubocops/uses_from_macos.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop audits formulae that are keg-only because they are provided by macos. class ProvidedByMacos < FormulaCop PROVIDED_BY_MACOS_FORMULAE = %w[ apr...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/dependency_order.rb
Library/Homebrew/rubocops/dependency_order.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop checks for correct order of `depends_on` in formulae. # # precedence order: # build-time > test > normal > recommen...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/components_order.rb
Library/Homebrew/rubocops/components_order.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "ast_constants" require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop checks for correct order of components in formulae. # # - `component_precedence_list` has compone...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/shell_command_stub.rb
Library/Homebrew/rubocops/shell_command_stub.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Homebrew class ShellCommandStub < Base MSG = "Shell command stubs must have a `.sh` counterpart." RESTRICT_ON_SEND = [:include].freeze sig { params(node: AST::SendNode).void } def on_send(node) ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/patches.rb
Library/Homebrew/rubocops/patches.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop audits `patch`es in formulae. class Patches < FormulaCop extend AutoCorrector sig { override.params(formula_nodes: FormulaNodes).void } ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/resource_requires_dependencies.rb
Library/Homebrew/rubocops/resource_requires_dependencies.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop audits Python formulae that include certain resources # to ensure that they also have the correct `uses_from_macos` # dependencies. class ResourceR...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/urls.rb
Library/Homebrew/rubocops/urls.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" require "rubocops/shared/url_helper" module RuboCop module Cop module FormulaAudit # This cop audits `url`s and `mirror`s in formulae. class Urls < FormulaCop include UrlHelper sig { override.params(...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/compact_blank.rb
Library/Homebrew/rubocops/compact_blank.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Homebrew # Checks if collection can be blank-compacted with `compact_blank`. # # NOTE: It is unsafe by default because false positives may occur in the # blank check of block arguments to the receiver obj...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/rubocop-cask.rb
Library/Homebrew/rubocops/rubocop-cask.rb
# typed: strict # frozen_string_literal: true require "rubocop" require_relative "cask/constants/stanza" require_relative "cask/ast/stanza" require_relative "cask/ast/cask_header" require_relative "cask/ast/cask_block" require_relative "cask/extend/node" require_relative "cask/mixin/cask_help" require_relative "cask...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/zero_zero_zero_zero.rb
Library/Homebrew/rubocops/zero_zero_zero_zero.rb
# typed: strict # frozen_string_literal: true require "rubocops/extend/formula_cop" module RuboCop module Cop module FormulaAudit # This cop audits the use of 0.0.0.0 in formulae. # 0.0.0.0 should not be used outside of test do blocks as it can be a security risk. class ZeroZeroZeroZero < Form...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/all.rb
Library/Homebrew/rubocops/all.rb
# typed: strict # frozen_string_literal: true require_relative "../extend/array" require_relative "../extend/blank" require_relative "blank" require_relative "compact_blank" require_relative "disable_comment" require_relative "extend/mutable_constant_exclude_unfreezable" require_relative "io_read" require_relative "mo...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/deprecate_disable_unsigned_reason.rb
Library/Homebrew/rubocops/cask/deprecate_disable_unsigned_reason.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Cask # This cop checks for use of `because: :unsigned` in `deprecate!`/`disable!` # and replaces it with the preferred `:fails_gatekeeper_check` reason. # # Example # # bad # deprecate! date: "2...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/desc.rb
Library/Homebrew/rubocops/cask/desc.rb
# typed: strict # frozen_string_literal: true require "rubocops/cask/mixin/on_desc_stanza" require "rubocops/shared/desc_helper" module RuboCop module Cop module Cask # This cop audits `desc` in casks. # See the {DescHelper} module for details of the checks. class Desc < Base include O...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/uninstall_methods_order.rb
Library/Homebrew/rubocops/cask/uninstall_methods_order.rb
# typed: strict # frozen_string_literal: true require "rubocops/shared/helper_functions" module RuboCop module Cop module Cask # This cop checks for the correct order of methods within the # 'uninstall' and 'zap' stanzas and validates related metadata. class UninstallMethodsOrder < Base ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/shared_filelist_glob.rb
Library/Homebrew/rubocops/cask/shared_filelist_glob.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Cask class SharedFilelistGlob < Base extend AutoCorrector sig { params(node: RuboCop::AST::SendNode).void } def on_send(node) return if node.method_name != :zap node.each_descendant(...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/variables.rb
Library/Homebrew/rubocops/cask/variables.rb
# typed: strict # frozen_string_literal: true require "forwardable" module RuboCop module Cop module Cask # This cop audits variables in casks. # # ### Example # # ```ruby # # bad # cask do # arch = Hardware::CPU.intel? ? "darwin" : "darwin-arm64" # end ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/homepage_url_styling.rb
Library/Homebrew/rubocops/cask/homepage_url_styling.rb
# typed: strict # frozen_string_literal: true require "forwardable" require "uri" require "rubocops/shared/homepage_helper" module RuboCop module Cop module Cask # This cop audits the `homepage` URL in casks. class HomepageUrlStyling < Base include OnHomepageStanza include HelperFunc...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/url_legacy_comma_separators.rb
Library/Homebrew/rubocops/cask/url_legacy_comma_separators.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Cask # This cop checks for `version.before_comma` and `version.after_comma`. class UrlLegacyCommaSeparators < Url include OnUrlStanza extend AutoCorrector MSG_CSV = "Use `version.csv.first` instead...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/stanza_order.rb
Library/Homebrew/rubocops/cask/stanza_order.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "forwardable" module RuboCop module Cop module Cask # This cop checks that a cask's stanzas are ordered correctly, including nested within `on_*` blocks. # @see https://docs.brew.sh/Cask-Cookbook#stanza-order ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/url.rb
Library/Homebrew/rubocops/cask/url.rb
# typed: strict # frozen_string_literal: true require "rubocops/shared/url_helper" module RuboCop module Cop module Cask # This cop checks that a cask's `url` stanza is formatted correctly. # # ### Example # # ```ruby # # bad # url "https://example.com/download/foo.dmg"...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/array_alphabetization.rb
Library/Homebrew/rubocops/cask/array_alphabetization.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true module RuboCop module Cop module Cask class ArrayAlphabetization < Base extend AutoCorrector sig { params(node: RuboCop::AST::SendNode).void } def on_send(node) return unless [:conflicts_with, :...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/discontinued.rb
Library/Homebrew/rubocops/cask/discontinued.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Cask # This cop corrects `caveats { discontinued }` to `deprecate!`. class Discontinued < Base include CaskHelp extend AutoCorrector MESSAGE = "Use `deprecate!` instead of `caveats { discontinued }...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/on_system_conditionals.rb
Library/Homebrew/rubocops/cask/on_system_conditionals.rb
# typed: strict # frozen_string_literal: true require "forwardable" require "rubocops/shared/on_system_conditionals_helper" module RuboCop module Cop module Cask # This cop makes sure that OS conditionals are consistent. # # ### Example # # ```ruby # # bad # cask 'foo' ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/no_autobump.rb
Library/Homebrew/rubocops/cask/no_autobump.rb
# typed: strict # frozen_string_literal: true require "forwardable" require "rubocops/shared/no_autobump_helper" module RuboCop module Cop module Cask # This cop audits `no_autobump!` reason. # See the {NoAutobumpHelper} module for details of the checks. class NoAutobump < Base extend ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/stanza_grouping.rb
Library/Homebrew/rubocops/cask/stanza_grouping.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "forwardable" module RuboCop module Cop module Cask # This cop checks that a cask's stanzas are grouped correctly, including nested within `on_*` blocks. # @see https://docs.brew.sh/Cask-Cookbook#stanza-order ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/no_overrides.rb
Library/Homebrew/rubocops/cask/no_overrides.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Cask class NoOverrides < Base include CaskHelp # These stanzas can be overridden by `on_*` blocks, so take them into account. # TODO: Update this list if new stanzas are added to `Cask::DSL` that call `s...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/mixin/on_desc_stanza.rb
Library/Homebrew/rubocops/cask/mixin/on_desc_stanza.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Cask # Common functionality for checking desc stanzas. module OnDescStanza extend Forwardable include CaskHelp sig { override.params(cask_block: T.nilable(RuboCop::Cask::AST::CaskBlock)).void } ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/mixin/on_url_stanza.rb
Library/Homebrew/rubocops/cask/mixin/on_url_stanza.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Cask # Common functionality for checking url stanzas. module OnUrlStanza extend Forwardable include CaskHelp sig { override.params(cask_block: T.nilable(RuboCop::Cask::AST::CaskBlock)).void } ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/mixin/cask_help.rb
Library/Homebrew/rubocops/cask/mixin/cask_help.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Cask # Common functionality for cops checking casks. module CaskHelp prepend CommentsHelp # Update the rbi file if changing this: https://github.com/sorbet/sorbet/issues/259 sig { overridable.params(cask_b...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/mixin/on_homepage_stanza.rb
Library/Homebrew/rubocops/cask/mixin/on_homepage_stanza.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cop module Cask # Common functionality for checking homepage stanzas. module OnHomepageStanza extend Forwardable include CaskHelp sig { override.params(cask_block: T.nilable(RuboCop::Cask::AST::CaskBlock)).vo...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/extend/node.rb
Library/Homebrew/rubocops/cask/extend/node.rb
# typed: strict # frozen_string_literal: true module RuboCop module AST # Extensions for RuboCop's AST Node class. class Node include RuboCop::Cask::Constants def_node_matcher :method_node, "{$(send ...) (block $(send ...) ...)}" def_node_matcher :block_body, "(block _ _ $_)" def_no...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/ast/cask_block.rb
Library/Homebrew/rubocops/cask/ast/cask_block.rb
# typed: strict # frozen_string_literal: true require "forwardable" module RuboCop module Cask module AST class StanzaBlock extend T::Helpers sig { returns(RuboCop::AST::BlockNode) } attr_reader :block_node sig { returns(T::Array[Parser::Source::Comment]) } attr_r...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/ast/cask_header.rb
Library/Homebrew/rubocops/cask/ast/cask_header.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true module RuboCop module Cask module AST # This class wraps the AST method node that represents the cask header. It # includes various helper methods to aid cops in their analysis. class CaskHeader def initialize...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/ast/stanza.rb
Library/Homebrew/rubocops/cask/ast/stanza.rb
# typed: strict # frozen_string_literal: true require "forwardable" module RuboCop module Cask module AST # This class wraps the AST send/block node that encapsulates the method # call that comprises the stanza. It includes various helper methods to # aid cops in their analysis. class St...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/cask/constants/stanza.rb
Library/Homebrew/rubocops/cask/constants/stanza.rb
# typed: strict # frozen_string_literal: true module RuboCop module Cask # Constants available globally for use in all cask cops. module Constants ON_SYSTEM_METHODS = T.let( [:arm, :intel, *MacOSVersion::SYMBOLS.keys].map { |option| :"on_#{option}" }.freeze, T::Array[Symbol], ) ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/extend/mutable_constant_exclude_unfreezable.rb
Library/Homebrew/rubocops/extend/mutable_constant_exclude_unfreezable.rb
# typed: strict # frozen_string_literal: true require "rubocop/cop/style/mutable_constant" module RuboCop module Cop module Sorbet # TODO: delete this file when https://github.com/Shopify/rubocop-sorbet/pull/256 is available module MutableConstantExcludeUnfreezable class << self si...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/extend/formula_cop.rb
Library/Homebrew/rubocops/extend/formula_cop.rb
# typed: strict # frozen_string_literal: true require "rubocops/shared/helper_functions" module RuboCop module Cop # Abstract base class for all formula cops. class FormulaCop < Base extend T::Helpers include RangeHelp include HelperFunctions abstract! exclude_from_registry ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/shared/no_autobump_helper.rb
Library/Homebrew/rubocops/shared/no_autobump_helper.rb
# typed: strict # frozen_string_literal: true require "rubocops/shared/helper_functions" module RuboCop module Cop # This cop audits `no_autobump!` reason. module NoAutobumpHelper include HelperFunctions PUNCTUATION_MARKS = %w[. ! ?].freeze DISALLOWED_NO_AUTOBUMP_REASONS = %w[extract_plis...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/shared/desc_helper.rb
Library/Homebrew/rubocops/shared/desc_helper.rb
# typed: strict # frozen_string_literal: true require "rubocops/shared/helper_functions" module RuboCop module Cop # This module performs common checks the `desc` field in both formulae and casks. module DescHelper include HelperFunctions MAX_DESC_LENGTH = 80 VALID_LOWERCASE_WORDS = %w[ ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/shared/url_helper.rb
Library/Homebrew/rubocops/shared/url_helper.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "rubocops/shared/helper_functions" module RuboCop module Cop # This module performs common checks the `homepage` field in both formulae and casks. module UrlHelper include HelperFunctions # Yields to block whe...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/shared/homepage_helper.rb
Library/Homebrew/rubocops/shared/homepage_helper.rb
# typed: strict # frozen_string_literal: true require "rubocops/shared/helper_functions" module RuboCop module Cop # This module performs common checks the `homepage` field in both formulae and casks. module HomepageHelper include HelperFunctions sig { params( type: Symbol, co...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/shared/helper_functions.rb
Library/Homebrew/rubocops/shared/helper_functions.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "rubocop" require_relative "../../warnings" Warnings.ignore :parser_syntax do require "parser/current" end module RuboCop module Cop # Helper functions for cops. module HelperFunctions include RangeHelp # C...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/rubocops/shared/on_system_conditionals_helper.rb
Library/Homebrew/rubocops/shared/on_system_conditionals_helper.rb
# typed: strict # frozen_string_literal: true require "macos_version" require "rubocops/shared/helper_functions" module RuboCop module Cop # This module performs common checks on `on_{system}` blocks in both formulae and casks. module OnSystemConditionalsHelper extend NodePattern::Macros include...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/manpages/converter/roff.rb
Library/Homebrew/manpages/converter/roff.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "kramdown/converter/man" module Homebrew module Manpages module Converter # Converts our Kramdown-like input to roff. class Roff < ::Kramdown::Converter::Man # Override that adds Homebrew metadata for the t...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/manpages/converter/kramdown.rb
Library/Homebrew/manpages/converter/kramdown.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "kramdown/converter/kramdown" module Homebrew module Manpages module Converter # Converts our Kramdown-like input to pure Kramdown. class Kramdown < ::Kramdown::Converter::Kramdown def initialize(root, opti...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/manpages/parser/ronn.rb
Library/Homebrew/manpages/parser/ronn.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "kramdown/parser/kramdown" module Homebrew module Manpages module Parser # Kramdown parser with compatiblity for ronn variable syntax. class Ronn < ::Kramdown::Parser::Kramdown def initialize(*) s...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/os/linux.rb
Library/Homebrew/os/linux.rb
# typed: strict # frozen_string_literal: true require "utils" module OS # Helper module for querying system information on Linux. module Linux raise "Loaded OS::Linux on generic OS!" if ENV["HOMEBREW_TEST_GENERIC_OS"] # This check is the only acceptable or necessary one in this file. # rubocop:disabl...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/os/mac.rb
Library/Homebrew/os/mac.rb
# typed: strict # frozen_string_literal: true require "macos_version" require "os/mac/xcode" require "os/mac/sdk" module OS # Helper module for querying system information on macOS. module Mac extend Utils::Output::Mixin raise "Loaded OS::Mac on generic OS!" if ENV["HOMEBREW_TEST_GENERIC_OS"] # Thi...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/os/mac/sdk.rb
Library/Homebrew/os/mac/sdk.rb
# typed: strict # frozen_string_literal: true require "system_command" module OS module Mac # Class representing a macOS SDK. class SDK # 11.x SDKs are explicitly excluded - we want the MacOSX11.sdk symlink instead. VERSIONED_SDK_REGEX = /MacOSX(10\.\d+|\d+)\.sdk$/ sig { returns(MacOSVers...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/os/mac/xcode.rb
Library/Homebrew/os/mac/xcode.rb
# typed: strict # frozen_string_literal: true module OS module Mac # Helper module for querying Xcode information. module Xcode DEFAULT_BUNDLE_PATH = T.let(Pathname("/Applications/Xcode.app").freeze, ::Pathname) BUNDLE_ID = "com.apple.dt.Xcode" OLD_BUNDLE_ID = "com.apple.Xcode" APPLE_...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/os/mac/mach.rb
Library/Homebrew/os/mac/mach.rb
# typed: strict # frozen_string_literal: true require "macho" # {Pathname} extension for dealing with Mach-O files. module MachOShim extend Forwardable extend T::Helpers requires_ancestor { Pathname } delegate [:dylib_id] => :macho sig { params(args: T.untyped).void } def initialize(*args) @macho =...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/os/linux/ld.rb
Library/Homebrew/os/linux/ld.rb
# typed: strict # frozen_string_literal: true module OS module Linux # Helper functions for querying `ld` information. module Ld # This is a list of known paths to the host dynamic linker on Linux if # the host glibc is new enough. Brew will fail to create a symlink for # ld.so if the host ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/os/linux/libstdcxx.rb
Library/Homebrew/os/linux/libstdcxx.rb
# typed: strict # frozen_string_literal: true require "os/linux/ld" module OS module Linux # Helper functions for querying `libstdc++` information. module Libstdcxx SOVERSION = 6 SONAME = T.let("libstdc++.so.#{SOVERSION}".freeze, String) sig { returns(T::Boolean) } def self.below_ci...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/os/linux/glibc.rb
Library/Homebrew/os/linux/glibc.rb
# typed: strict # frozen_string_literal: true module OS module Linux # Helper functions for querying `glibc` information. module Glibc module_function sig { returns(Version) } def system_version @system_version ||= T.let(nil, T.nilable(Version)) @system_version ||= begin ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/os/linux/kernel.rb
Library/Homebrew/os/linux/kernel.rb
# typed: strict # frozen_string_literal: true module OS module Linux # Helper functions for querying Linux kernel information. module Kernel module_function sig { returns(Version) } def minimum_version Version.new "3.2" end sig { returns(T::Boolean) } def below_m...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/os/linux/elf.rb
Library/Homebrew/os/linux/elf.rb
# typed: strict # frozen_string_literal: true require "os/linux/ld" # {Pathname} extension for dealing with ELF files. # @see https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header module ELFShim extend T::Helpers MAGIC_NUMBER_OFFSET = 0 private_constant :MAGIC_NUMBER_OFFSET MAGIC_NUMBER_AS...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/formula-analytics/pycall-setup.rb
Library/Homebrew/formula-analytics/pycall-setup.rb
# typed: strict # frozen_string_literal: true require "pycall/import" # This was a rewrite from `include(Module.new(...))`, # to appease Sorbet, so let's keep the existing behaviour # and silence RuboCop. # rubocop:disable Style/MixinUsage include PyCall::Import # rubocop:enable Style/MixinUsage pyfrom "influxdb_clie...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/optparse.rb
Library/Homebrew/extend/optparse.rb
# typed: strict # frozen_string_literal: true require "optparse" OptionParser.accept Pathname do |path| Pathname(path).expand_path if path end
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/blank.rb
Library/Homebrew/extend/blank.rb
# typed: strict # frozen_string_literal: true class Object # An object is blank if it's false, empty, or a whitespace string. # # For example, `nil`, `''`, `' '`, `[]`, `{}` and `false` are all blank. # # ### Example # # ```ruby # !address || address.empty? # ``` # # can be simplified to # ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/array.rb
Library/Homebrew/extend/array.rb
# typed: strict # frozen_string_literal: true class Array # Equal to `self[1]`. # # ### Example # # ```ruby # %w( a b c d e ).second # => "b" # ``` def second = self[1] # Equal to `self[2]`. # # ### Example # # ```ruby # %w( a b c d e ).third # => "c" # ``` def third = self[2] # Equ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/kernel.rb
Library/Homebrew/extend/kernel.rb
# typed: strict # frozen_string_literal: true require "utils/output" module Kernel sig { params(env: T.nilable(String)).returns(T::Boolean) } def superenv?(env) return false if env == "std" !Superenv.bin.nil? end private :superenv? sig { params(formula: T.nilable(Formula)).void } def interactive...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/string.rb
Library/Homebrew/extend/string.rb
# typed: strict # frozen_string_literal: true class String # The inverse of <tt>String#include?</tt>. Returns true if the string # does not include the other string. # # "hello".exclude? "lo" # => false # "hello".exclude? "ol" # => true # "hello".exclude? ?h # => false sig { params(string: String...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/ENV.rb
Library/Homebrew/extend/ENV.rb
# typed: strict # frozen_string_literal: true require "hardware" require "diagnostic" require "extend/ENV/shared" require "extend/ENV/std" require "extend/ENV/super" # <!-- vale off --> # @!parse # # `ENV` is not actually a class, but this makes YARD happy # # @see https://rubydoc.info/stdlib/core/ENV # # <co...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/enumerable.rb
Library/Homebrew/extend/enumerable.rb
# typed: strict # frozen_string_literal: true module Enumerable # The negative of the {Enumerable#include?}. Returns `true` if the # collection does not include the object. sig { params(object: T.untyped).returns(T::Boolean) } def exclude?(object) = !include?(object) # Returns a new +Array+ without the blan...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/pathname.rb
Library/Homebrew/extend/pathname.rb
# typed: strict # frozen_string_literal: true require "system_command" require "extend/pathname/disk_usage_extension" require "extend/pathname/observer_pathname_extension" require "extend/pathname/write_mkpath_extension" require "utils/output" # Stubs needed to keep Sorbet happy. module MachOShim; end module ELFShim;...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false