language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/match_var.rb
@@ -1,19 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Emitter for in pattern nodes - class MatchVar < self - - handle :match_var - - children :name - - private - - def dispatch - write(name.to_s) - end - end # MatchVar - end # Emitter -end # Unpa...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/mlhs.rb
@@ -1,40 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Emitter for multiple assignment left hand side - class MLHS < self - handle :mlhs - - NO_COMMA = %i[arg splat mlhs restarg].freeze - - private_constant(*constants(false)) - - private - - def dispatch - ...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/module.rb
@@ -1,24 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Emitter for module nodes - class Module < self - include LocalVariableRoot - - handle :module - - children :name, :body - - private - - def dispatch - write('module ') - visit(name) - ...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/op_assign.rb
@@ -1,52 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - - # Base class for and and or op-assign - class BinaryAssign < self - children :target, :expression - - MAP = { - and_asgn: '&&=', - or_asgn: '||=' - }.freeze - - handle(*MAP.keys) - - def...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/pair.rb
@@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Emitter for key value pairs in hash literals or kwargs - class Pair < self - BAREWORD = /\A[A-Za-z_][A-Za-z_0-9]*[?!]?\z/.freeze - - private_constant(*constants(false)) - - handle :pair - - children :key, :...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/pin.rb
@@ -1,19 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Emitter for pin nodes - class Pin < self - handle :pin - - children :target - - private - - def dispatch - write('^') - visit(target) - end - end # Pin - end # Emitter -end # Unparser
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/primitive.rb
@@ -1,93 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Base class for primitive emitters - class Primitive < self - - children :value - - # Emitter for primitives based on Object#inspect - class Inspect < self - - handle :sym, :str - - private - - ...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/range.rb
@@ -1,35 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Range emitters - class Range < self - TOKENS = { - irange: '..', - erange: '...' - }.freeze - - SYMBOLS = { - erange: :tDOT3, - irange: :tDOT2 - }.freeze - - def symbol_name...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/regexp.rb
@@ -1,35 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Emitter for regexp literals - class Regexp < self - handle :regexp - - define_group(:body, 0..-2) - - private - - def dispatch - parentheses('/', '/') do - body.each(&method(:emit_body)) - ...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/repetition.rb
@@ -1,75 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - - # Emitter for postconditions - class Post < self - children :condition, :body - - MAP = { - while_post: 'while', - until_post: 'until' - }.freeze - - handle(*MAP.keys) - - private - - ...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/rescue.rb
@@ -1,16 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Emitter for rescue nodes - class Rescue < self - handle :rescue - - private - - def dispatch - emit_rescue_postcontrol(node) - end - end # Rescue - end # Emitter -end # Unparser
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/root.rb
@@ -1,27 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Root emitter a special case - class Root < self - include Concord::Public.new(:buffer, :node, :comments) - include LocalVariableRoot - - END_NL = %i[class sclass module begin].freeze - - private_constant(*c...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/send.rb
@@ -1,29 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Emitter for send - class Send < self - handle :csend, :send - - def emit_mlhs - writer.emit_mlhs - end - - def emit_heredoc_reminders - writer.emit_heredoc_reminders - end - - private ...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/simple.rb
@@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Emitter for simple nodes that generate a single token - class Simple < self - MAP = { - __ENCODING__: '__ENCODING__', - __FILE__: '__FILE__', - __LINE__: '__LINE__', - fa...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/splat.rb
@@ -1,43 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Emitter for splats - class KwSplat < self - handle :kwsplat - - children :subject - - private - - def dispatch - write('**') - visit(subject) - end - end - - # Emitter for splats - ...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/super.rb
@@ -1,22 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - - # Emitter for super nodes - class Super < self - handle :super - - private - - def dispatch - write('super') - parentheses do - delimited(children) - end - end - - end # Super...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/undef.rb
@@ -1,18 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Emitter for undef nodes - class Undef < self - handle :undef - - private - - def dispatch - write('undef ') - delimited(children) - end - - end # Undef - end # Emitter -end # Unparser
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/variable.rb
@@ -1,58 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - - # Emitter for various variable accesses - class Variable < self - handle :ivar, :lvar, :cvar, :gvar, :back_ref - - children :name - - private - - def dispatch - write(name.to_s) - end - - end #...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/xstr.rb
@@ -1,72 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - # Dynamic execute string literal emitter - class XStr < self - - handle :xstr - - private - - def dispatch - if heredoc? - emit_heredoc - else - emit_xstr - end - end - - ...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/yield.rb
@@ -1,24 +0,0 @@ -# frozen_string_literal: true - -module Unparser - class Emitter - - # Emitter for yield node - class Yield < self - handle :yield - - private - - def dispatch - write('yield') - return if children.empty? - - parentheses do - delimited(children) - ...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/equalizer.rb
@@ -1,98 +0,0 @@ -# frozen_string_literal: true - -module Unparser - # Define equality, equivalence and inspection methods - # - # Original code before vendoring and reduction from: https://github.com/dkubb/equalizer. - class Equalizer < Module - # Initialize an Equalizer with the given keys - # - # Will u...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/finalize.rb
@@ -1,3 +0,0 @@ -# frozen_string_literal: true - -Unparser::Emitter::REGISTRY.freeze
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/generation.rb
@@ -1,252 +0,0 @@ -# frozen_string_literal: true - -module Unparser - # rubocop:disable Metrics/ModuleLength - module Generation - EXTRA_NL = %i[kwbegin def defs module class sclass].freeze - - private_constant(*constants(false)) - - def emit_heredoc_reminders; end - - def symbol_name; end - - def writ...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/node_details.rb
@@ -1,21 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module NodeDetails - include Constants, NodeHelpers - - def self.included(descendant) - descendant.class_eval do - include Adamantium, Concord.new(:node) - - extend DSL - end - end - - private - - def children -...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/node_details/send.rb
@@ -1,62 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module NodeDetails - class Send - include NodeDetails - - ASSIGN_SUFFIX = '='.freeze - NON_ASSIGN_RANGE = (0..-2).freeze - - private_constant(*constants(false)) - - children :receiver, :selector - - public :receive...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/node_helpers.rb
@@ -1,77 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module NodeHelpers - - # Helper for building nodes - # - # @param [Symbol] type - # @param [Parser::AST::Node] children - # - # @return [Parser::AST::Node] - # - # @api private - def s(type, *children) - Parser::AST::N...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/validation.rb
@@ -1,172 +0,0 @@ -# frozen_string_literal: true - -module Unparser - # Validation of unparser results - class Validation - include Adamantium, Anima.new( - :generated_node, - :generated_source, - :identification, - :original_node, - :original_source - ) - - # Test if source could be...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/writer.rb
@@ -1,15 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module Writer - include Generation, NodeHelpers - - def self.included(descendant) - descendant.class_eval do - include Anima.new(:buffer, :comments, :node, :local_variable_scope) - - extend DSL - end - end - end # Wr...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/writer/binary.rb
@@ -1,99 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module Writer - class Binary - include Writer, Adamantium - - children :left, :right - - OPERATOR_TOKENS = - { - and: '&&', - or: '||' - }.freeze - - KEYWORD_TOKENS = - { - and: ...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/writer/dynamic_string.rb
@@ -1,223 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module Writer - class DynamicString - include Writer, Adamantium - - PATTERNS_2 = - [ - %i[str_empty begin].freeze, - %i[begin str_nl].freeze - ].freeze - - PATTERNS_3 = - [ - %i[begi...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/writer/resbody.rb
@@ -1,40 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module Writer - # Writer for rescue bodies - class Resbody - include Writer - - children :exception, :assignment, :body - - def emit_postcontrol - write(' rescue ') - visit(body) - end - - def emit_regular...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/writer/rescue.rb
@@ -1,43 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module Writer - class Rescue - include Writer, Adamantium - - children :body, :rescue_body - - define_group :rescue_bodies, 1..-2 - - def emit_regular - emit_optional_body(body) - - rescue_bodies.each(&method(:emi...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/writer/send.rb
@@ -1,115 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module Writer - # Writer for send - class Send - include Writer, Adamantium, Constants, Generation - - INDEX_ASSIGN = :'[]=' - INDEX_REFERENCE = :'[]' - - OPERATORS = { - csend: '&.', - send: '.' - }....
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/writer/send/attribute_assignment.rb
@@ -1,40 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module Writer - class Send - # Writer for send as attribute assignment - class AttributeAssignment < self - children :receiver, :selector, :first_argument - - def dispatch - emit_receiver - emit_attribute ...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/writer/send/binary.rb
@@ -1,27 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module Writer - class Send - # Writer for binary sends - class Binary < self - def dispatch - visit(receiver) - emit_operator - emit_right - end - - private - - def emit_operator - ...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/writer/send/conditional.rb
@@ -1,25 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module Writer - class Send - # Writer for "conditional" receiver&.selector(arguments...) case - class Conditional < self - - private - - def dispatch - emit_receiver - emit_selector - emit_arguments...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/writer/send/regular.rb
@@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module Writer - class Send - # Writer for "regular" receiver.selector(arguments...) case - class Regular < self - def dispatch - emit_receiver - emit_selector - emit_arguments - end - - def...
true
Other
Homebrew
brew
1537e2eccdede455de4c802da7510cc81d1bab52.json
Ignore new dependencies
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/writer/send/unary.rb
@@ -1,29 +0,0 @@ -# frozen_string_literal: true - -module Unparser - module Writer - class Send - # Writer for unary sends - class Unary < self - MAP = { - '-@': '-', - '+@': '+' - }.freeze - - private_constant(*constants(false)) - - def dispatch - na...
true
Other
Homebrew
brew
9dee4606fca4b6531695b2bf271cca12c58837f1.json
Update RBI files for tapioca.
Library/Homebrew/sorbet/rbi/gems/rbi@0.0.4.rbi
@@ -0,0 +1,1396 @@ +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbi` gem. +# Please instead update this file by running `bin/tapioca gem rbi`. + +# typed: true + +module RBI; end + +class RBI::ASTVisitor + abstract! + + def initialize(*args, &blk); end + + sig { abstract.para...
true
Other
Homebrew
brew
9dee4606fca4b6531695b2bf271cca12c58837f1.json
Update RBI files for tapioca.
Library/Homebrew/sorbet/rbi/gems/tapioca@0.5.2.rbi
@@ -1,23 +1,120 @@ # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `tapioca` gem. -# Please instead update this file by running `bin/tapioca sync`. +# Please instead update this file by running `bin/tapioca gem tapioca`. # typed: true -class String - include ::Comparable - in...
true
Other
Homebrew
brew
9dee4606fca4b6531695b2bf271cca12c58837f1.json
Update RBI files for tapioca.
Library/Homebrew/sorbet/rbi/gems/unparser@0.6.0.rbi
@@ -0,0 +1,1814 @@ +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `unparser` gem. +# Please instead update this file by running `bin/tapioca gem unparser`. + +# typed: true + +module Unparser + class << self + def buffer(source, identification = T.unsafe(nil)); end + def par...
true
Other
Homebrew
brew
9dee4606fca4b6531695b2bf271cca12c58837f1.json
Update RBI files for tapioca.
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -12,6 +12,12 @@ class AbstractDownloadStrategy extend ::T::Private::Methods::SingletonMethodHooks end +class ActiveRecordColumnTypeHelper + extend ::T::Sig + extend ::T::Private::Methods::MethodHooks + extend ::T::Private::Methods::SingletonMethodHooks +end + module ActiveSupport def parse_json_times();...
true
Other
Homebrew
brew
4b4f78b8cf57920820c4b2557781739fea8dacae.json
Update RBI files for bootsnap.
Library/Homebrew/sorbet/rbi/gems/bootsnap@1.9.0.rbi
@@ -17,14 +17,14 @@ module Bootsnap def log!; end def logger; end def logger=(logger); end - def setup(cache_dir:, development_mode: T.unsafe(nil), load_path_cache: T.unsafe(nil), autoload_paths_cache: T.unsafe(nil), disable_trace: T.unsafe(nil), compile_cache_iseq: T.unsafe(nil), compile_cache_yaml: ...
false
Other
Homebrew
brew
966189d07db604c953855e97c97377006e4ce8dd.json
style: add shfmt exit status to `brew style`
Library/Homebrew/style.rb
@@ -65,12 +65,16 @@ def check_style_impl(files, output_type, run_shellcheck(shell_files, output_type) end - run_shfmt(shell_files, fix: fix) if ruby_files.none? || shell_files.any? + shfmt_result = if ruby_files.any? && shell_files.none? + true + else + run_shfmt(shell_fil...
false
Other
Homebrew
brew
d559d3ff46f374c73d4fb20a8a31ed09477c0b12.json
utils/shfmt.sh: reuse similar code fragments
Library/Homebrew/utils/shfmt.sh
@@ -49,6 +49,7 @@ do SHFMT_ARGS+=("${arg}") shift done +unset arg FILES=() for file in "$@" @@ -66,6 +67,7 @@ do exit 1 fi done +unset file if [[ "${#FILES[@]}" == 0 ]] then @@ -76,32 +78,48 @@ fi ### Custom shell script styling ### -# Check pattern: -# '^\t+' -# -# Replace tabs with 2 space...
false
Other
Homebrew
brew
22db7aa516ef385949582cac1f12d8984e441f8b.json
superenv: set `M4` on Linux when `bison` is a dependency Bison no longer remembers the path to `m4` as of Homebrew/homebrew-core#84931. Since superenv does not put runtime dependencies of build dependences in `PATH`, we now need to help Bison find `m4` by setting `M4` in the environment. See also Homebrew/homebrew-co...
Library/Homebrew/extend/os/linux/extend/ENV/super.rb
@@ -24,6 +24,7 @@ def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_a self["HOMEBREW_OPTIMIZATION_LEVEL"] = "O2" self["HOMEBREW_DYNAMIC_LINKER"] = determine_dynamic_linker_path self["HOMEBREW_RPATH_PATHS"] = determine_rpath_paths(@formula) + self["M4"] = "#{HOMEBREW_PREFIX...
false
Other
Homebrew
brew
d5a15cf289862af8df1487543a2809dabdfa3b35.json
brew.sh: remove deprecated command Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
Library/Homebrew/brew.sh
@@ -647,7 +647,6 @@ case "${HOMEBREW_COMMAND}" in uninstal) HOMEBREW_COMMAND="uninstall" ;; rm) HOMEBREW_COMMAND="uninstall" ;; remove) HOMEBREW_COMMAND="uninstall" ;; - configure) HOMEBREW_COMMAND="diy" ;; abv) HOMEBREW_COMMAND="info" ;; dr) HOMEBREW_COMMAND="doctor" ;; --repo) HOMEBREW_COMMAND="--r...
false
Other
Homebrew
brew
2688e7e56bf2983670d6a1e187006fe3a8feba3b.json
style: apply suggestions from code review
Library/Homebrew/style.rb
@@ -65,7 +65,7 @@ def check_style_impl(files, output_type, run_shellcheck(shell_files, output_type) end - run_shfmt(shell_files, inplace: fix) if ruby_files.none? || shell_files.any? + run_shfmt(shell_files, fix: fix) if ruby_files.none? || shell_files.any? if output_type == :json ...
false
Other
Homebrew
brew
bd8db0737de7cf3ce7788c0377f08c6b41a1b6db.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/brew.sh
@@ -74,7 +74,8 @@ esac # These variables are set from the user environment. # shellcheck disable=SC2154 ohai() { - if [[ -n "${HOMEBREW_COLOR}" || (-t 1 && -z "${HOMEBREW_NO_COLOR}") ]] # check whether stdout is a tty. + # Check whether stdout is a tty. + if [[ -n "${HOMEBREW_COLOR}" || (-t 1 && -z "${HOMEBREW_NO...
true
Other
Homebrew
brew
bd8db0737de7cf3ce7788c0377f08c6b41a1b6db.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/cmd/shellenv.sh
@@ -10,8 +10,11 @@ # HOMEBREW_REPOSITORY is set by bin/brew # shellcheck disable=SC2154 homebrew-shellenv() { - [[ "${HOMEBREW_SHELLENV_PREFIX}" == "${HOMEBREW_PREFIX}" ]] && - [[ "$(PATH="${HOMEBREW_PATH}" command -v brew)" == "${HOMEBREW_PREFIX}/bin/brew" ]] && return + if [[ "${HOMEBREW_SHELLENV_PREFIX}" == "$...
true
Other
Homebrew
brew
bd8db0737de7cf3ce7788c0377f08c6b41a1b6db.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/cmd/update.sh
@@ -602,7 +602,7 @@ EOS else # Capture stderr to tmp_failure_file if ! git fetch --tags --force "${QUIET_ARGS[@]}" origin \ - "refs/heads/${UPSTREAM_BRANCH_DIR}:refs/remotes/origin/${UPSTREAM_BRANCH_DIR}" 2>>"${tmp_failure_file}" + "refs/heads/${UPSTREAM_BRANCH_DIR}:refs/remo...
true
Other
Homebrew
brew
bd8db0737de7cf3ce7788c0377f08c6b41a1b6db.json
style: fix inconsistent code style for shell scripts
bin/brew
@@ -2,13 +2,15 @@ set +o posix # Fail fast with concise message when cwd does not exist -if ! [[ -d "${PWD}" ]]; then +if ! [[ -d "${PWD}" ]] +then echo "Error: The current working directory doesn't exist, cannot proceed." >&2 exit 1 fi # Fail fast with concise message when not using bash -if [ -z "${BASH...
true
Other
Homebrew
brew
09a16bcea115b3fe3927df7a6e0cdb202db42624.json
utils/shfmt.sh: implement checkers for forbidden styles
Library/Homebrew/utils/shfmt.sh
@@ -83,71 +83,122 @@ fi # no_tabs() { local file="$1" + local tempfile="$2" + local line + local num=0 + local retcode=0 + local regex_pos='^[[:space:]]+' + local regex_neg='^ +' - # TODO: use bash built-in regex match syntax instead - if grep -qE '^\t+' "${file}" - then - # TODO: add line number - ...
false
Other
Homebrew
brew
03c7a142be52a909ceea0adac03071b059cf76a5.json
style: add keyward argument `inplace` to run_shfmt
Library/Homebrew/style.rb
@@ -65,7 +65,7 @@ def check_style_impl(files, output_type, run_shellcheck(shell_files, output_type) end - run_shfmt(shell_files) if ruby_files.none? || shell_files.any? + run_shfmt(shell_files, inplace: fix) if ruby_files.none? || shell_files.any? if output_type == :json Of...
false
Other
Homebrew
brew
1bb68bda3f3d009847ac21dbc474638056d0f00f.json
utils/shfmt.sh: add function wrap_then_do
Library/Homebrew/utils/shfmt.sh
@@ -55,9 +55,14 @@ for file in "$@" do if [[ -f "${file}" ]] then - FILES+=("${file}") + if [[ -w "${file}" ]] + then + FILES+=("${file}") + else + onoe "${0##*/}: File \"${file}\" is not writable." + fi else - echo "${0##*/}: File \"${file}\" does not exist." >&2 + onoe "${0##*...
false
Other
Homebrew
brew
a839d7e5ffd73097524e3d92202e4b33c37d9965.json
utils/shfmt.sh: add function prototypes
Library/Homebrew/utils/shfmt.sh
@@ -1,12 +1,19 @@ #!/bin/bash -# HOMEBREW_LIBRARY is set by bin/brew +onoe() { + echo "$*" >&2 +} + +odie() { + onoe "$@" + exit 1 +} + # HOMEBREW_PREFIX is set by extend/ENV/super.rb # shellcheck disable=SC2154 -if [[ -z "${HOMEBREW_LIBRARY}" || -z "${HOMEBREW_PREFIX}" ]] +if [[ -z "${HOMEBREW_PREFIX}" ]] the...
false
Other
Homebrew
brew
9efde249c139f46f3db2c265fba1b8f284b6641e.json
style: add shfmt implementation
Library/Homebrew/style.rb
@@ -65,6 +65,8 @@ def check_style_impl(files, output_type, run_shellcheck(shell_files, output_type) end + run_shfmt(shell_files) if ruby_files.none? || shell_files.any? + if output_type == :json Offenses.new(rubocop_result + shellcheck_result) else @@ -164,30 +166,7 @@ def ...
true
Other
Homebrew
brew
9efde249c139f46f3db2c265fba1b8f284b6641e.json
style: add shfmt implementation
Library/Homebrew/utils/shfmt.sh
@@ -0,0 +1,59 @@ +#!/bin/bash + +# HOMEBREW_LIBRARY is set by bin/brew +# HOMEBREW_PREFIX is set by extend/ENV/super.rb +# shellcheck disable=SC2154 +if [[ -z "${HOMEBREW_LIBRARY}" || -z "${HOMEBREW_PREFIX}" ]] +then + echo "${0##*/}: This program is internal and must be run via brew." >&2 + exit 1 +fi + +# HOMEBREW_...
true
Other
Homebrew
brew
f38a3239e656447c169df2f5f53d7a9fc97e801b.json
workflows: reduce GITHUB_TOKEN permissions
.github/workflows/docker.yml
@@ -9,6 +9,8 @@ on: release: types: - published +permissions: + contents: read jobs: ubuntu: if: startsWith(github.repository, 'Homebrew/')
true
Other
Homebrew
brew
f38a3239e656447c169df2f5f53d7a9fc97e801b.json
workflows: reduce GITHUB_TOKEN permissions
.github/workflows/doctor.yml
@@ -8,6 +8,8 @@ on: - Library/Homebrew/extend/os/diagnostic.rb - Library/Homebrew/extend/os/mac/diagnostic.rb - Library/Homebrew/os/mac/xcode.rb +permissions: + contents: read env: HOMEBREW_DEVELOPER: 1 HOMEBREW_NO_AUTO_UPDATE: 1
true
Other
Homebrew
brew
f38a3239e656447c169df2f5f53d7a9fc97e801b.json
workflows: reduce GITHUB_TOKEN permissions
.github/workflows/sorbet.yml
@@ -10,6 +10,9 @@ on: - cron: "0 0 * * *" workflow_dispatch: +permissions: + contents: read + jobs: tapioca: if: github.repository == 'Homebrew/brew'
true
Other
Homebrew
brew
f38a3239e656447c169df2f5f53d7a9fc97e801b.json
workflows: reduce GITHUB_TOKEN permissions
.github/workflows/spdx.yml
@@ -7,6 +7,8 @@ on: - master schedule: - cron: "0 0 * * *" +permissions: + contents: read jobs: spdx: if: github.repository == 'Homebrew/brew'
true
Other
Homebrew
brew
f38a3239e656447c169df2f5f53d7a9fc97e801b.json
workflows: reduce GITHUB_TOKEN permissions
.github/workflows/tests.yml
@@ -6,6 +6,9 @@ on: - master pull_request: +permissions: + contents: read + env: HOMEBREW_DEVELOPER: 1 HOMEBREW_NO_AUTO_UPDATE: 1
true
Other
Homebrew
brew
f38a3239e656447c169df2f5f53d7a9fc97e801b.json
workflows: reduce GITHUB_TOKEN permissions
.github/workflows/triage.yml
@@ -12,6 +12,8 @@ on: schedule: - cron: "0 */3 * * *" # every 3 hours +permissions: + concurrency: triage-${{ github.ref }} jobs:
true
Other
Homebrew
brew
f38a3239e656447c169df2f5f53d7a9fc97e801b.json
workflows: reduce GITHUB_TOKEN permissions
.github/workflows/update-man-completions.yml
@@ -18,6 +18,9 @@ on: - cron: "0 0 * * *" workflow_dispatch: +permissions: + contents: read + jobs: update-manpage: runs-on: ubuntu-latest
true
Other
Homebrew
brew
f38a3239e656447c169df2f5f53d7a9fc97e801b.json
workflows: reduce GITHUB_TOKEN permissions
.github/workflows/vendor-gems.yml
@@ -8,6 +8,10 @@ on: description: Pull request number required: true +permissions: + contents: read + pull-requests: read + jobs: vendor-gems: if: >
true
Other
Homebrew
brew
8a363b2fb5ea729727260ec4b4680389078375a8.json
style: trim trailing whitespaces
Library/Homebrew/cmd/outdated.rb
@@ -31,7 +31,7 @@ def outdated_args flag "--json", description: "Print output in JSON format. There are two versions: `v1` and `v2`. " \ "`v1` is deprecated and is currently the default if no version is specified. " \ - "`v2` prints outdated for...
true
Other
Homebrew
brew
8a363b2fb5ea729727260ec4b4680389078375a8.json
style: trim trailing whitespaces
completions/fish/brew.fish
@@ -1036,7 +1036,7 @@ __fish_brew_complete_arg 'outdated' -l greedy -d 'Print outdated casks with `aut __fish_brew_complete_arg 'outdated' -l greedy-auto-updates -d 'Print outdated casks including those with `auto_updates true`' __fish_brew_complete_arg 'outdated' -l greedy-latest -d 'Print outdated casks including t...
true
Other
Homebrew
brew
8a363b2fb5ea729727260ec4b4680389078375a8.json
style: trim trailing whitespaces
completions/zsh/_brew
@@ -1267,7 +1267,7 @@ _brew_outdated() { '--greedy-auto-updates[Print outdated casks including those with `auto_updates true`]' \ '--greedy-latest[Print outdated casks including those with `version :latest`]' \ '--help[Show this message]' \ - '(--quiet --verbose)--json[Print output in JSON format. The...
true
Other
Homebrew
brew
8a363b2fb5ea729727260ec4b4680389078375a8.json
style: trim trailing whitespaces
docs/Adding-Software-to-Homebrew.md
@@ -13,7 +13,7 @@ If everything checks out, you're ready to get started on a new formula! 1. If you're starting from scratch, the [`brew create` command](Manpage.md#create-options-url) can be used to produce a basic version of your formula. This command accepts a number of options and you may be able to save yoursel...
true
Other
Homebrew
brew
8a363b2fb5ea729727260ec4b4680389078375a8.json
style: trim trailing whitespaces
docs/Manpage.md
@@ -463,7 +463,7 @@ information is displayed in interactive shells, and suppressed otherwise. * `--cask`: List only outdated casks. * `--json`: - Print output in JSON format. There are two versions: `v1` and `v2`. `v1` is deprecated and is currently the default if no version is specified. `v2` prints outdated for...
true
Other
Homebrew
brew
8a363b2fb5ea729727260ec4b4680389078375a8.json
style: trim trailing whitespaces
docs/assets/img/docs/managing-pull-requests.drawio.svg
@@ -172,7 +172,7 @@ <div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; "> Does it <br/> - ...
true
Other
Homebrew
brew
570fac7f47ca37f065c3c43585d3c0b0cc91c847.json
.vscode: add extension shellcheck and shell-format
.vscode/extensions.json
@@ -3,6 +3,8 @@ "kaiwood.endwise", "misogi.ruby-rubocop", "rebornix.ruby", - "wingrunr21.vscode-ruby" + "wingrunr21.vscode-ruby", + "timonwong.shellcheck", + "foxundermoon.shell-format" ] }
true
Other
Homebrew
brew
570fac7f47ca37f065c3c43585d3c0b0cc91c847.json
.vscode: add extension shellcheck and shell-format
.vscode/settings.json
@@ -1,6 +1,17 @@ { - "ruby.rubocop.executePath": "Library/Homebrew/shims/gems/", - "files.trimTrailingWhitespace": true, - "editor.tabSize": 2, - "files.insertFinalNewline": true + "editor.insertSpaces": true, + "editor.tabSize": 2, + "files.encoding": "utf8", + "files.eol": "\n", + "files.trimTrailin...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
.github/workflows/docker.yml
@@ -34,31 +34,31 @@ jobs: - name: Deploy the tagged Docker image to GitHub Packages if: startsWith(github.ref, 'refs/tags/') run: | - brew_version=${GITHUB_REF:10} - echo "brew_version=$brew_version" >> ${GITHUB_ENV} + brew_version="${GITHUB_REF:10}" + echo "...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
.github/workflows/sorbet.yml
@@ -40,20 +40,23 @@ jobs: BRANCH="sorbet-files-update" echo "::set-output name=branch::${BRANCH}" - if git ls-remote --exit-code --heads origin "$BRANCH"; then - git checkout "$BRANCH" + if git ls-remote --exit-code --heads origin "${BRANCH}" + then + ...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
.github/workflows/spdx.yml
@@ -37,19 +37,22 @@ jobs: BRANCH="spdx-update" echo "::set-output name=branch::${BRANCH}" - if git ls-remote --exit-code --heads origin "$BRANCH"; then - git checkout "$BRANCH" + if git ls-remote --exit-code --heads origin "${BRANCH}" + then + git...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
.github/workflows/tests.yml
@@ -90,10 +90,10 @@ jobs: - name: Set up all Homebrew taps run: | HOMEBREW_REPOSITORY="$(brew --repo)" - HOMEBREW_CORE_REPOSITORY="$HOMEBREW_REPOSITORY/Library/Taps/homebrew/homebrew-core" - git -C "$HOMEBREW_CORE_REPOSITORY" remote add homebrew_core https://github.com/Homeb...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
.github/workflows/update-man-completions.yml
@@ -44,27 +44,31 @@ jobs: BRANCH=update-man-completions echo "::set-output name=branch::${BRANCH}" - if git ls-remote --exit-code --heads origin "$BRANCH"; then - git checkout "$BRANCH" + if git ls-remote --exit-code --heads origin "${BRANCH}" + then + ...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
.github/workflows/vendor-gems.yml
@@ -51,7 +51,8 @@ jobs: run: | set -u - if [[ "${GEM_NAME}" == 'sorbet' ]]; then + if [[ "${GEM_NAME}" == 'sorbet' ]] + then brew vendor-gems --update sorbet,sorbet-runtime else brew vendor-gems @@ -63,8 +64,10 @@ jobs: run: ...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
.vscode/settings.json
@@ -2,5 +2,5 @@ "ruby.rubocop.executePath": "Library/Homebrew/shims/gems/", "files.trimTrailingWhitespace": true, "editor.tabSize": 2, - "files.insertFinalNewline": true, + "files.insertFinalNewline": true }
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Dockerfile
@@ -34,7 +34,7 @@ RUN apt-get update \ USER linuxbrew COPY --chown=linuxbrew:linuxbrew . /home/linuxbrew/.linuxbrew/Homebrew -ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH +ENV PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}" WORKDIR /home/linuxbrew R...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/brew.sh
@@ -17,10 +17,11 @@ esac # same file under the native architecture # These variables are set from the user environment. # shellcheck disable=SC2154 -if [[ "${HOMEBREW_CHANGE_ARCH_TO_ARM}" = "1" ]] && \ - [[ "${HOMEBREW_MACOS}" = "1" ]] && \ - [[ "$(sysctl -n hw.optional.arm64 2>/dev/null)" = "1" ]] && \ - [[ "...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/cask/utils/rmdir.sh
@@ -4,34 +4,41 @@ set -euo pipefail # Try removing as many empty directories as possible with a single # `rmdir` call to avoid or at least speed up the loop below. -if /bin/rmdir -- "${@}" &>/dev/null; then +if /bin/rmdir -- "${@}" &>/dev/null +then exit fi -for path in "${@}"; do +for path in "${@}" +do s...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/cmd/--version.sh
@@ -6,28 +6,31 @@ # shellcheck disable=SC2154 version_string() { local repo="$1" - if ! [ -d "${repo}" ]; then + if ! [[ -d "${repo}" ]] + then echo "N/A" return fi local pretty_revision pretty_revision="$(git -C "${repo}" rev-parse --short --verify --quiet HEAD)" - if [ -z "${pretty_revis...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/cmd/shellenv.sh
@@ -4,14 +4,14 @@ #: #: The variables `HOMEBREW_PREFIX`, `HOMEBREW_CELLAR` and `HOMEBREW_REPOSITORY` are also exported to avoid querying them multiple times. #: The variable `HOMEBREW_SHELLENV_PREFIX` will be exported to avoid adding duplicate entries to the environment variables. -#: Consider adding evaluation o...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/cmd/update-reset.sh
@@ -11,10 +11,10 @@ homebrew-update-reset() { for option in "$@" do case "${option}" in - -\?|-h|--help|--usage) brew help update-reset; exit $? ;; - --debug) HOMEBREW_DEBUG=1 ;; + -\? | -h | --help | --usage) brew help update-reset; exit $? ;; + --debug) ...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/cmd/update.sh
@@ -77,7 +77,7 @@ repo_var() { local repo_var repo_var="$1" - if [[ "${repo_var}" = "${HOMEBREW_REPOSITORY}" ]] + if [[ "${repo_var}" == "${HOMEBREW_REPOSITORY}" ]] then repo_var="" else @@ -193,16 +193,18 @@ merge_or_rebase() { trap reset_on_interrupt SIGINT - if [[ "${DIR}" = "${HOMEBREW_...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/cmd/vendor-install.sh
@@ -14,7 +14,7 @@ VENDOR_DIR="${HOMEBREW_LIBRARY}/Homebrew/vendor" # Built from https://github.com/Homebrew/homebrew-portable-ruby. if [[ -n "${HOMEBREW_MACOS}" ]] then - if [[ "${HOMEBREW_PROCESSOR}" = "Intel" ]] + if [[ "${HOMEBREW_PROCESSOR}" == "Intel" ]] then ruby_FILENAME="portable-ruby-2.6.3_2.yosem...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/dev-cmd/rubocop.sh
@@ -14,7 +14,8 @@ homebrew-rubocop() { GEM_VERSION="$("${HOMEBREW_RUBY_PATH}" "${RUBY_DISABLE_OPTIONS}" -rrbconfig -e 'puts RbConfig::CONFIG["ruby_version"]')" GEM_HOME="${HOMEBREW_LIBRARY}/Homebrew/vendor/bundle/ruby/${GEM_VERSION}" - if ! [[ -f "${GEM_HOME}/bin/rubocop" ]]; then + if ! [[ -f "${GEM_HOME}/bi...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/items.sh
@@ -1,21 +1,22 @@ homebrew-items() { local items local sed_extended_regex_flag - local find_filter=$1 - local sed_filter=$2 - local grep_filter=$3 + local find_filter="$1" + local sed_filter="$2" + local grep_filter="$3" # HOMEBREW_MACOS is set by brew.sh # shellcheck disable=SC2154 - if [[ -n "${...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/prefix.sh
@@ -5,28 +5,35 @@ # HOMEBREW_PREFIX and HOMEBREW_REPOSITORY are set by brew.sh # shellcheck disable=SC2154 homebrew-prefix() { - while [[ "$#" -gt 0 ]]; do - case $1 in - # check we actually have --prefix and not e.g. --prefixsomething - --prefix) local prefix="1"; shift ;; - # rejec...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/shims/linux/super/make
@@ -4,13 +4,19 @@ # HOMEBREW_LIBRARY is set by bin/brew # shellcheck disable=SC2154,SC2250 pathremove() { - local IFS=':' NEWPATH="" DIR="" PATHVARIABLE=${2:-PATH} - for DIR in ${!PATHVARIABLE} ; do - if [ "${DIR}" != "$1" ] ; then - NEWPATH=${NEWPATH:+$NEWPATH:}${DIR} -...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/shims/mac/super/pkg-config
@@ -4,7 +4,8 @@ # shellcheck disable=SC2154 pkg_config="${HOMEBREW_OPT}/pkg-config/bin/pkg-config" -if [ -z "${HOMEBREW_SDKROOT}" ]; then +if [[ -z "${HOMEBREW_SDKROOT}" ]] +then exec "${pkg_config}" "$@" fi
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/shims/mac/super/ruby
@@ -9,8 +9,9 @@ source "${HOMEBREW_LIBRARY}/Homebrew/shims/utils.sh" try_exec_non_system "${SHIM_FILE}" "$@" -if [[ -z "${SDKROOT}" && -n "${HOMEBREW_SDKROOT}" ]]; then - export SDKROOT=${HOMEBREW_SDKROOT} +if [[ -z "${SDKROOT}" && -n "${HOMEBREW_SDKROOT}" ]] +then + export SDKROOT="${HOMEBREW_SDKROOT}" fi s...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/shims/mac/super/swift
@@ -7,8 +7,9 @@ # shellcheck disable=SC2154 source "${HOMEBREW_LIBRARY}/Homebrew/shims/utils.sh" -if [[ -z "${SDKROOT}" && -n "${HOMEBREW_SDKROOT}" ]]; then - export SDKROOT=${HOMEBREW_SDKROOT} +if [[ -z "${SDKROOT}" && -n "${HOMEBREW_SDKROOT}" ]] +then + export SDKROOT="${HOMEBREW_SDKROOT}" fi try_exec_non_s...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/shims/mac/super/xcrun
@@ -7,18 +7,21 @@ # These could be used in conjunction with `--sdk` which ignores SDKROOT. # HOMEBREW_DEVELOPER_DIR, HOMEBREW_SDKROOT and HOMEBREW_PREFER_CLT_PROXIES are set by extend/ENV/super.rb # shellcheck disable=SC2154 -if [[ "$*" =~ (^| )-?-show-sdk-(path|version|build) && -n "${HOMEBREW_DEVELOPER_DIR}" ]]; t...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/shims/scm/git
@@ -7,9 +7,9 @@ # SHIM_FILE is set by shims/utils.sh # HOMEBREW_GIT is set by brew.sh # HOMEBREW_SVN is from the user environment. -# HOMEBREW_PREFIX is set extend/ENV/super.rb +# HOMEBREW_PREFIX is set by extend/ENV/super.rb # shellcheck disable=SC2154 -if [ -z "${HOMEBREW_LIBRARY}" ] +if [[ -z "${HOMEBREW_LIBRARY...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/shims/super/cc
@@ -1,11 +1,11 @@ #!/bin/sh # Make sure this shim uses the same Ruby interpreter that is used by Homebrew. -if [ -z "$HOMEBREW_RUBY_PATH" ] +if [[ -z "${HOMEBREW_RUBY_PATH}" ]] then echo "${0##*/}: The build tool has reset ENV; --env=std required." >&2 exit 1 fi -exec "$HOMEBREW_RUBY_PATH" --enable-frozen-str...
true
Other
Homebrew
brew
3f96d963f7a2e5ff0f084bcb16e7f95e5aa72cfd.json
style: fix inconsistent code style for shell scripts
Library/Homebrew/shims/utils.sh
@@ -1,7 +1,10 @@ set +o posix quiet_safe_cd() { - cd "$1" &>/dev/null || { echo "Error: failed to cd to $1" >&2; exit 1; } + cd "$1" &>/dev/null || { + echo "Error: failed to cd to $1" >&2 + exit 1 + } } absdir() { @@ -25,7 +28,7 @@ realpath() { while [[ -L "${path}" ]] do dest="$(readlink "...
true