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 | 6efcde2eefea57692e6bde37ffd99c90151db536.json | shared_audts: add freetube to GITHUB_PRERELEASE_ALLOWLIST | Library/Homebrew/utils/shared_audits.rb | @@ -30,6 +30,7 @@ def github_release_data(user, repo, tag)
GITHUB_PRERELEASE_ALLOWLIST = {
"amd-power-gadget" => :all,
"elm-format" => "0.8.3",
+ "freetube" => :all,
"gitless" => "0.8.8",
"infrakit" => "0.5",
"pock" => :all, | false |
Other | Homebrew | brew | dba1cfbec999a21181b2b83fbd21956a66a108d8.json | options: handle `nil` array.
Fixes #8835 | Library/Homebrew/options.rb | @@ -68,7 +68,7 @@ class Options
include Enumerable
def self.create(array)
- new array.map { |e| Option.new(e[/^--([^=]+=?)(.+)?$/, 1] || e) }
+ new Array(array).map { |e| Option.new(e[/^--([^=]+=?)(.+)?$/, 1] || e) }
end
def initialize(*args) | false |
Other | Homebrew | brew | 6735debcd43dea6248c1e95c0842cc8252a5ac58.json | livecheck/pypi: allow post in pypi version | Library/Homebrew/livecheck/strategy/pypi.rb | @@ -49,7 +49,8 @@ def self.find_versions(url, regex = nil)
# Example regex: `%r{href=.*?/packages.*?/example[._-]v?(\d+(?:\.\d+)*).t}i`.
regex ||=
- %r{href=.*?/packages.*?/#{Regexp.escape(package_name)}[._-]v?(\d+(?:\.\d+)*)#{Regexp.escape(suffix)}}i
+ %r{href=.*?/packages.*?/#{Regexp.escape(package_name)}[._-]
+ v?(\d+(?:\.\d+)*(.post\d)?)#{Regexp.escape(suffix)}}ix
Homebrew::Livecheck::Strategy::PageMatch.find_versions(page_url, regex)
end | false |
Other | Homebrew | brew | f01f3a9f5677e896b6b7a921ba491323efe5a23b.json | pr-pull: fix signoff for linuxbrew-core | Library/Homebrew/dev-cmd/pr-pull.rb | @@ -104,7 +104,7 @@ def signoff!(path, pr: nil, dry_run: false)
if pr
# This is a tap pull request and approving reviewers should also sign-off.
tap = Tap.from_path(path)
- trailers += GitHub.approved_reviews(tap.user, "homebrew-#{tap.repo}", pr).map do |r|
+ trailers += GitHub.approved_reviews(tap.user, tap.full_name.split("/").last, pr).map do |r|
"Signed-off-by: #{r["name"]} <#{r["email"]}>"
end.join("\n")
| false |
Other | Homebrew | brew | f5ffd712668156aaf5ca0cf468d9d238d9f7ecf7.json | tap: remove redundant exception.
Don't raise an exception only to catch it. | Library/Homebrew/tap.rb | @@ -38,12 +38,9 @@ def self.fetch(*args)
def self.from_path(path)
match = File.expand_path(path).match(HOMEBREW_TAP_PATH_REGEX)
- raise "Invalid tap path '#{path}'" unless match
+ return if match.blank? || match[:user].blank? || match[:repo].blank?
fetch(match[:user], match[:repo])
- rescue
- # No need to error as a nil tap is sufficient to show failure.
- nil
end
def self.default_cask_tap | false |
Other | Homebrew | brew | b3d12361acb9d41fbe5ca772a01af941a9be9bf1.json | sorbet: Update RBI files and prune files.yaml.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml). | Library/Homebrew/sorbet/rbi/gems/parser@2.7.1.5.rbi | @@ -1,10 +1,16 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `parser` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
+# Please instead update this file by running `tapioca sync`.
# typed: true
module Parser
+ class << self
+
+ private
+
+ def warn_syntax_deviation(feature, version); end
+ end
end
module Parser::AST
@@ -44,10 +50,8 @@ class Parser::AST::Processor < ::AST::Processor
def on_cvar(node); end
def on_cvasgn(node); end
def on_def(node); end
- def on_def_e(node); end
def on_defined?(node); end
def on_defs(node); end
- def on_defs_e(node); end
def on_dstr(node); end
def on_dsym(node); end
def on_eflipflop(node); end
@@ -88,7 +92,6 @@ class Parser::AST::Processor < ::AST::Processor
def on_match_with_lvasgn(node); end
def on_mlhs(node); end
def on_module(node); end
- def on_mrasgn(node); end
def on_next(node); end
def on_not(node); end
def on_nth_ref(node); end
@@ -102,7 +105,6 @@ class Parser::AST::Processor < ::AST::Processor
def on_postexe(node); end
def on_preexe(node); end
def on_procarg0(node); end
- def on_rasgn(node); end
def on_redo(node); end
def on_regexp(node); end
def on_resbody(node); end
@@ -320,13 +322,14 @@ class Parser::Builders::Default
def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end
def binary_op_map(left_e, op_t, right_e); end
def block_map(receiver_l, begin_t, end_t); end
- def check_assignment_to_numparam(node); end
+ def check_assignment_to_numparam(name, loc); end
def check_condition(cond); end
def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end
def check_duplicate_args(args, map = T.unsafe(nil)); end
def check_duplicate_pattern_key(name, loc); end
def check_duplicate_pattern_variable(name, loc); end
def check_lvar_name(name, loc); end
+ def check_reserved_for_numparam(name, loc); end
def collapse_string_parts?(parts); end
def collection_map(begin_t, parts, end_t); end
def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end
@@ -421,6 +424,8 @@ class Parser::CurrentArgStack
def top; end
end
+Parser::CurrentRuby = Parser::Ruby26
+
module Parser::Deprecation
def warn_of_deprecation; end
def warned_of_deprecation=(_); end
@@ -717,6 +722,449 @@ end
Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String)
+class Parser::Ruby26 < ::Parser::Base
+ def _reduce_10(val, _values, result); end
+ def _reduce_100(val, _values, result); end
+ def _reduce_101(val, _values, result); end
+ def _reduce_102(val, _values, result); end
+ def _reduce_103(val, _values, result); end
+ def _reduce_104(val, _values, result); end
+ def _reduce_105(val, _values, result); end
+ def _reduce_106(val, _values, result); end
+ def _reduce_107(val, _values, result); end
+ def _reduce_108(val, _values, result); end
+ def _reduce_109(val, _values, result); end
+ def _reduce_11(val, _values, result); end
+ def _reduce_110(val, _values, result); end
+ def _reduce_111(val, _values, result); end
+ def _reduce_113(val, _values, result); end
+ def _reduce_114(val, _values, result); end
+ def _reduce_115(val, _values, result); end
+ def _reduce_12(val, _values, result); end
+ def _reduce_121(val, _values, result); end
+ def _reduce_125(val, _values, result); end
+ def _reduce_126(val, _values, result); end
+ def _reduce_127(val, _values, result); end
+ def _reduce_13(val, _values, result); end
+ def _reduce_14(val, _values, result); end
+ def _reduce_15(val, _values, result); end
+ def _reduce_17(val, _values, result); end
+ def _reduce_18(val, _values, result); end
+ def _reduce_19(val, _values, result); end
+ def _reduce_199(val, _values, result); end
+ def _reduce_2(val, _values, result); end
+ def _reduce_20(val, _values, result); end
+ def _reduce_200(val, _values, result); end
+ def _reduce_201(val, _values, result); end
+ def _reduce_202(val, _values, result); end
+ def _reduce_203(val, _values, result); end
+ def _reduce_204(val, _values, result); end
+ def _reduce_205(val, _values, result); end
+ def _reduce_206(val, _values, result); end
+ def _reduce_207(val, _values, result); end
+ def _reduce_208(val, _values, result); end
+ def _reduce_209(val, _values, result); end
+ def _reduce_21(val, _values, result); end
+ def _reduce_210(val, _values, result); end
+ def _reduce_211(val, _values, result); end
+ def _reduce_212(val, _values, result); end
+ def _reduce_213(val, _values, result); end
+ def _reduce_214(val, _values, result); end
+ def _reduce_215(val, _values, result); end
+ def _reduce_216(val, _values, result); end
+ def _reduce_217(val, _values, result); end
+ def _reduce_218(val, _values, result); end
+ def _reduce_219(val, _values, result); end
+ def _reduce_22(val, _values, result); end
+ def _reduce_220(val, _values, result); end
+ def _reduce_221(val, _values, result); end
+ def _reduce_222(val, _values, result); end
+ def _reduce_223(val, _values, result); end
+ def _reduce_224(val, _values, result); end
+ def _reduce_226(val, _values, result); end
+ def _reduce_227(val, _values, result); end
+ def _reduce_228(val, _values, result); end
+ def _reduce_229(val, _values, result); end
+ def _reduce_23(val, _values, result); end
+ def _reduce_230(val, _values, result); end
+ def _reduce_231(val, _values, result); end
+ def _reduce_232(val, _values, result); end
+ def _reduce_233(val, _values, result); end
+ def _reduce_234(val, _values, result); end
+ def _reduce_235(val, _values, result); end
+ def _reduce_236(val, _values, result); end
+ def _reduce_237(val, _values, result); end
+ def _reduce_238(val, _values, result); end
+ def _reduce_24(val, _values, result); end
+ def _reduce_244(val, _values, result); end
+ def _reduce_245(val, _values, result); end
+ def _reduce_249(val, _values, result); end
+ def _reduce_25(val, _values, result); end
+ def _reduce_250(val, _values, result); end
+ def _reduce_252(val, _values, result); end
+ def _reduce_253(val, _values, result); end
+ def _reduce_254(val, _values, result); end
+ def _reduce_256(val, _values, result); end
+ def _reduce_259(val, _values, result); end
+ def _reduce_26(val, _values, result); end
+ def _reduce_260(val, _values, result); end
+ def _reduce_261(val, _values, result); end
+ def _reduce_262(val, _values, result); end
+ def _reduce_263(val, _values, result); end
+ def _reduce_264(val, _values, result); end
+ def _reduce_265(val, _values, result); end
+ def _reduce_266(val, _values, result); end
+ def _reduce_267(val, _values, result); end
+ def _reduce_268(val, _values, result); end
+ def _reduce_269(val, _values, result); end
+ def _reduce_27(val, _values, result); end
+ def _reduce_270(val, _values, result); end
+ def _reduce_271(val, _values, result); end
+ def _reduce_272(val, _values, result); end
+ def _reduce_273(val, _values, result); end
+ def _reduce_274(val, _values, result); end
+ def _reduce_275(val, _values, result); end
+ def _reduce_277(val, _values, result); end
+ def _reduce_278(val, _values, result); end
+ def _reduce_279(val, _values, result); end
+ def _reduce_28(val, _values, result); end
+ def _reduce_29(val, _values, result); end
+ def _reduce_290(val, _values, result); end
+ def _reduce_291(val, _values, result); end
+ def _reduce_292(val, _values, result); end
+ def _reduce_293(val, _values, result); end
+ def _reduce_294(val, _values, result); end
+ def _reduce_295(val, _values, result); end
+ def _reduce_296(val, _values, result); end
+ def _reduce_297(val, _values, result); end
+ def _reduce_298(val, _values, result); end
+ def _reduce_299(val, _values, result); end
+ def _reduce_3(val, _values, result); end
+ def _reduce_300(val, _values, result); end
+ def _reduce_301(val, _values, result); end
+ def _reduce_302(val, _values, result); end
+ def _reduce_303(val, _values, result); end
+ def _reduce_304(val, _values, result); end
+ def _reduce_305(val, _values, result); end
+ def _reduce_306(val, _values, result); end
+ def _reduce_307(val, _values, result); end
+ def _reduce_308(val, _values, result); end
+ def _reduce_309(val, _values, result); end
+ def _reduce_31(val, _values, result); end
+ def _reduce_311(val, _values, result); end
+ def _reduce_312(val, _values, result); end
+ def _reduce_313(val, _values, result); end
+ def _reduce_314(val, _values, result); end
+ def _reduce_315(val, _values, result); end
+ def _reduce_316(val, _values, result); end
+ def _reduce_317(val, _values, result); end
+ def _reduce_318(val, _values, result); end
+ def _reduce_319(val, _values, result); end
+ def _reduce_32(val, _values, result); end
+ def _reduce_320(val, _values, result); end
+ def _reduce_321(val, _values, result); end
+ def _reduce_322(val, _values, result); end
+ def _reduce_323(val, _values, result); end
+ def _reduce_324(val, _values, result); end
+ def _reduce_325(val, _values, result); end
+ def _reduce_326(val, _values, result); end
+ def _reduce_327(val, _values, result); end
+ def _reduce_328(val, _values, result); end
+ def _reduce_329(val, _values, result); end
+ def _reduce_33(val, _values, result); end
+ def _reduce_330(val, _values, result); end
+ def _reduce_331(val, _values, result); end
+ def _reduce_332(val, _values, result); end
+ def _reduce_333(val, _values, result); end
+ def _reduce_334(val, _values, result); end
+ def _reduce_335(val, _values, result); end
+ def _reduce_337(val, _values, result); end
+ def _reduce_340(val, _values, result); end
+ def _reduce_344(val, _values, result); end
+ def _reduce_346(val, _values, result); end
+ def _reduce_349(val, _values, result); end
+ def _reduce_35(val, _values, result); end
+ def _reduce_350(val, _values, result); end
+ def _reduce_351(val, _values, result); end
+ def _reduce_352(val, _values, result); end
+ def _reduce_354(val, _values, result); end
+ def _reduce_355(val, _values, result); end
+ def _reduce_356(val, _values, result); end
+ def _reduce_357(val, _values, result); end
+ def _reduce_358(val, _values, result); end
+ def _reduce_359(val, _values, result); end
+ def _reduce_36(val, _values, result); end
+ def _reduce_360(val, _values, result); end
+ def _reduce_361(val, _values, result); end
+ def _reduce_362(val, _values, result); end
+ def _reduce_363(val, _values, result); end
+ def _reduce_364(val, _values, result); end
+ def _reduce_365(val, _values, result); end
+ def _reduce_366(val, _values, result); end
+ def _reduce_367(val, _values, result); end
+ def _reduce_368(val, _values, result); end
+ def _reduce_369(val, _values, result); end
+ def _reduce_37(val, _values, result); end
+ def _reduce_370(val, _values, result); end
+ def _reduce_371(val, _values, result); end
+ def _reduce_372(val, _values, result); end
+ def _reduce_374(val, _values, result); end
+ def _reduce_375(val, _values, result); end
+ def _reduce_376(val, _values, result); end
+ def _reduce_377(val, _values, result); end
+ def _reduce_378(val, _values, result); end
+ def _reduce_379(val, _values, result); end
+ def _reduce_38(val, _values, result); end
+ def _reduce_380(val, _values, result); end
+ def _reduce_381(val, _values, result); end
+ def _reduce_383(val, _values, result); end
+ def _reduce_384(val, _values, result); end
+ def _reduce_385(val, _values, result); end
+ def _reduce_386(val, _values, result); end
+ def _reduce_387(val, _values, result); end
+ def _reduce_388(val, _values, result); end
+ def _reduce_389(val, _values, result); end
+ def _reduce_39(val, _values, result); end
+ def _reduce_390(val, _values, result); end
+ def _reduce_391(val, _values, result); end
+ def _reduce_392(val, _values, result); end
+ def _reduce_394(val, _values, result); end
+ def _reduce_395(val, _values, result); end
+ def _reduce_396(val, _values, result); end
+ def _reduce_397(val, _values, result); end
+ def _reduce_398(val, _values, result); end
+ def _reduce_399(val, _values, result); end
+ def _reduce_4(val, _values, result); end
+ def _reduce_40(val, _values, result); end
+ def _reduce_400(val, _values, result); end
+ def _reduce_401(val, _values, result); end
+ def _reduce_402(val, _values, result); end
+ def _reduce_403(val, _values, result); end
+ def _reduce_404(val, _values, result); end
+ def _reduce_405(val, _values, result); end
+ def _reduce_406(val, _values, result); end
+ def _reduce_407(val, _values, result); end
+ def _reduce_408(val, _values, result); end
+ def _reduce_409(val, _values, result); end
+ def _reduce_41(val, _values, result); end
+ def _reduce_410(val, _values, result); end
+ def _reduce_411(val, _values, result); end
+ def _reduce_412(val, _values, result); end
+ def _reduce_413(val, _values, result); end
+ def _reduce_414(val, _values, result); end
+ def _reduce_415(val, _values, result); end
+ def _reduce_416(val, _values, result); end
+ def _reduce_417(val, _values, result); end
+ def _reduce_418(val, _values, result); end
+ def _reduce_419(val, _values, result); end
+ def _reduce_42(val, _values, result); end
+ def _reduce_420(val, _values, result); end
+ def _reduce_421(val, _values, result); end
+ def _reduce_422(val, _values, result); end
+ def _reduce_423(val, _values, result); end
+ def _reduce_424(val, _values, result); end
+ def _reduce_425(val, _values, result); end
+ def _reduce_426(val, _values, result); end
+ def _reduce_427(val, _values, result); end
+ def _reduce_428(val, _values, result); end
+ def _reduce_430(val, _values, result); end
+ def _reduce_431(val, _values, result); end
+ def _reduce_432(val, _values, result); end
+ def _reduce_435(val, _values, result); end
+ def _reduce_437(val, _values, result); end
+ def _reduce_44(val, _values, result); end
+ def _reduce_442(val, _values, result); end
+ def _reduce_443(val, _values, result); end
+ def _reduce_444(val, _values, result); end
+ def _reduce_445(val, _values, result); end
+ def _reduce_446(val, _values, result); end
+ def _reduce_447(val, _values, result); end
+ def _reduce_448(val, _values, result); end
+ def _reduce_449(val, _values, result); end
+ def _reduce_450(val, _values, result); end
+ def _reduce_451(val, _values, result); end
+ def _reduce_452(val, _values, result); end
+ def _reduce_453(val, _values, result); end
+ def _reduce_454(val, _values, result); end
+ def _reduce_455(val, _values, result); end
+ def _reduce_456(val, _values, result); end
+ def _reduce_457(val, _values, result); end
+ def _reduce_458(val, _values, result); end
+ def _reduce_459(val, _values, result); end
+ def _reduce_460(val, _values, result); end
+ def _reduce_461(val, _values, result); end
+ def _reduce_462(val, _values, result); end
+ def _reduce_463(val, _values, result); end
+ def _reduce_464(val, _values, result); end
+ def _reduce_465(val, _values, result); end
+ def _reduce_466(val, _values, result); end
+ def _reduce_467(val, _values, result); end
+ def _reduce_468(val, _values, result); end
+ def _reduce_469(val, _values, result); end
+ def _reduce_47(val, _values, result); end
+ def _reduce_470(val, _values, result); end
+ def _reduce_471(val, _values, result); end
+ def _reduce_472(val, _values, result); end
+ def _reduce_473(val, _values, result); end
+ def _reduce_474(val, _values, result); end
+ def _reduce_475(val, _values, result); end
+ def _reduce_476(val, _values, result); end
+ def _reduce_478(val, _values, result); end
+ def _reduce_479(val, _values, result); end
+ def _reduce_48(val, _values, result); end
+ def _reduce_480(val, _values, result); end
+ def _reduce_481(val, _values, result); end
+ def _reduce_482(val, _values, result); end
+ def _reduce_483(val, _values, result); end
+ def _reduce_484(val, _values, result); end
+ def _reduce_485(val, _values, result); end
+ def _reduce_486(val, _values, result); end
+ def _reduce_487(val, _values, result); end
+ def _reduce_488(val, _values, result); end
+ def _reduce_489(val, _values, result); end
+ def _reduce_49(val, _values, result); end
+ def _reduce_490(val, _values, result); end
+ def _reduce_491(val, _values, result); end
+ def _reduce_492(val, _values, result); end
+ def _reduce_493(val, _values, result); end
+ def _reduce_494(val, _values, result); end
+ def _reduce_495(val, _values, result); end
+ def _reduce_496(val, _values, result); end
+ def _reduce_497(val, _values, result); end
+ def _reduce_498(val, _values, result); end
+ def _reduce_499(val, _values, result); end
+ def _reduce_5(val, _values, result); end
+ def _reduce_50(val, _values, result); end
+ def _reduce_500(val, _values, result); end
+ def _reduce_501(val, _values, result); end
+ def _reduce_502(val, _values, result); end
+ def _reduce_503(val, _values, result); end
+ def _reduce_504(val, _values, result); end
+ def _reduce_505(val, _values, result); end
+ def _reduce_506(val, _values, result); end
+ def _reduce_507(val, _values, result); end
+ def _reduce_508(val, _values, result); end
+ def _reduce_509(val, _values, result); end
+ def _reduce_510(val, _values, result); end
+ def _reduce_511(val, _values, result); end
+ def _reduce_512(val, _values, result); end
+ def _reduce_513(val, _values, result); end
+ def _reduce_514(val, _values, result); end
+ def _reduce_515(val, _values, result); end
+ def _reduce_516(val, _values, result); end
+ def _reduce_517(val, _values, result); end
+ def _reduce_518(val, _values, result); end
+ def _reduce_519(val, _values, result); end
+ def _reduce_520(val, _values, result); end
+ def _reduce_521(val, _values, result); end
+ def _reduce_522(val, _values, result); end
+ def _reduce_523(val, _values, result); end
+ def _reduce_524(val, _values, result); end
+ def _reduce_525(val, _values, result); end
+ def _reduce_526(val, _values, result); end
+ def _reduce_527(val, _values, result); end
+ def _reduce_528(val, _values, result); end
+ def _reduce_529(val, _values, result); end
+ def _reduce_53(val, _values, result); end
+ def _reduce_530(val, _values, result); end
+ def _reduce_531(val, _values, result); end
+ def _reduce_532(val, _values, result); end
+ def _reduce_533(val, _values, result); end
+ def _reduce_534(val, _values, result); end
+ def _reduce_536(val, _values, result); end
+ def _reduce_537(val, _values, result); end
+ def _reduce_538(val, _values, result); end
+ def _reduce_539(val, _values, result); end
+ def _reduce_54(val, _values, result); end
+ def _reduce_540(val, _values, result); end
+ def _reduce_541(val, _values, result); end
+ def _reduce_542(val, _values, result); end
+ def _reduce_543(val, _values, result); end
+ def _reduce_544(val, _values, result); end
+ def _reduce_545(val, _values, result); end
+ def _reduce_546(val, _values, result); end
+ def _reduce_547(val, _values, result); end
+ def _reduce_548(val, _values, result); end
+ def _reduce_549(val, _values, result); end
+ def _reduce_550(val, _values, result); end
+ def _reduce_553(val, _values, result); end
+ def _reduce_554(val, _values, result); end
+ def _reduce_555(val, _values, result); end
+ def _reduce_556(val, _values, result); end
+ def _reduce_557(val, _values, result); end
+ def _reduce_558(val, _values, result); end
+ def _reduce_559(val, _values, result); end
+ def _reduce_560(val, _values, result); end
+ def _reduce_563(val, _values, result); end
+ def _reduce_564(val, _values, result); end
+ def _reduce_567(val, _values, result); end
+ def _reduce_568(val, _values, result); end
+ def _reduce_569(val, _values, result); end
+ def _reduce_571(val, _values, result); end
+ def _reduce_572(val, _values, result); end
+ def _reduce_574(val, _values, result); end
+ def _reduce_575(val, _values, result); end
+ def _reduce_576(val, _values, result); end
+ def _reduce_577(val, _values, result); end
+ def _reduce_578(val, _values, result); end
+ def _reduce_579(val, _values, result); end
+ def _reduce_58(val, _values, result); end
+ def _reduce_59(val, _values, result); end
+ def _reduce_592(val, _values, result); end
+ def _reduce_593(val, _values, result); end
+ def _reduce_598(val, _values, result); end
+ def _reduce_599(val, _values, result); end
+ def _reduce_6(val, _values, result); end
+ def _reduce_60(val, _values, result); end
+ def _reduce_603(val, _values, result); end
+ def _reduce_607(val, _values, result); end
+ def _reduce_62(val, _values, result); end
+ def _reduce_63(val, _values, result); end
+ def _reduce_64(val, _values, result); end
+ def _reduce_65(val, _values, result); end
+ def _reduce_66(val, _values, result); end
+ def _reduce_67(val, _values, result); end
+ def _reduce_68(val, _values, result); end
+ def _reduce_69(val, _values, result); end
+ def _reduce_70(val, _values, result); end
+ def _reduce_71(val, _values, result); end
+ def _reduce_72(val, _values, result); end
+ def _reduce_73(val, _values, result); end
+ def _reduce_74(val, _values, result); end
+ def _reduce_75(val, _values, result); end
+ def _reduce_76(val, _values, result); end
+ def _reduce_78(val, _values, result); end
+ def _reduce_79(val, _values, result); end
+ def _reduce_8(val, _values, result); end
+ def _reduce_80(val, _values, result); end
+ def _reduce_81(val, _values, result); end
+ def _reduce_82(val, _values, result); end
+ def _reduce_83(val, _values, result); end
+ def _reduce_84(val, _values, result); end
+ def _reduce_85(val, _values, result); end
+ def _reduce_86(val, _values, result); end
+ def _reduce_88(val, _values, result); end
+ def _reduce_89(val, _values, result); end
+ def _reduce_9(val, _values, result); end
+ def _reduce_90(val, _values, result); end
+ def _reduce_91(val, _values, result); end
+ def _reduce_92(val, _values, result); end
+ def _reduce_93(val, _values, result); end
+ def _reduce_94(val, _values, result); end
+ def _reduce_95(val, _values, result); end
+ def _reduce_96(val, _values, result); end
+ def _reduce_97(val, _values, result); end
+ def _reduce_98(val, _values, result); end
+ def _reduce_99(val, _values, result); end
+ def _reduce_none(val, _values, result); end
+ def default_encoding; end
+ def version; end
+end
+
+Parser::Ruby26::Racc_arg = T.let(T.unsafe(nil), Array)
+
+Parser::Ruby26::Racc_token_to_s_table = T.let(T.unsafe(nil), Array)
+
module Parser::Source
end
@@ -860,15 +1308,6 @@ class Parser::Source::Map::Definition < ::Parser::Source::Map
def operator; end
end
-class Parser::Source::Map::EndlessDefinition < ::Parser::Source::Map
- def initialize(keyword_l, operator_l, name_l, assignment_l, body_l); end
-
- def assignment; end
- def keyword; end
- def name; end
- def operator; end
-end
-
class Parser::Source::Map::For < ::Parser::Source::Map
def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end
@@ -906,6 +1345,16 @@ class Parser::Source::Map::Keyword < ::Parser::Source::Map
def keyword; end
end
+class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map
+ def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end
+
+ def assignment; end
+ def end; end
+ def keyword; end
+ def name; end
+ def operator; end
+end
+
class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map
def initialize(keyword_l, operator_l, argument_l, expression_l); end
| true |
Other | Homebrew | brew | b3d12361acb9d41fbe5ca772a01af941a9be9bf1.json | sorbet: Update RBI files and prune files.yaml.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml). | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@0.7.0.rbi | @@ -8,6 +8,7 @@ module RuboCop
end
module RuboCop::AST
+ extend(::RuboCop::AST::RuboCopCompatibility)
end
class RuboCop::AST::AliasNode < ::RuboCop::AST::Node
@@ -37,8 +38,6 @@ class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node
def values; end
end
-RuboCop::AST::ArrayNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash)
-
module RuboCop::AST::BasicLiteralNode
def value; end
end
@@ -68,8 +67,6 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node
def void_context?; end
end
-RuboCop::AST::BlockNode::VOID_CONTEXT_METHODS = T.let(T.unsafe(nil), Array)
-
class RuboCop::AST::BreakNode < ::RuboCop::AST::Node
include(::RuboCop::AST::ParameterizedNode)
include(::RuboCop::AST::ParameterizedNode::WrappedArguments)
@@ -249,8 +246,6 @@ module RuboCop::AST::CollectionNode
def |(*args, &block); end
end
-RuboCop::AST::CollectionNode::ARRAY_METHODS = T.let(T.unsafe(nil), Array)
-
module RuboCop::AST::ConditionalNode
def body; end
def condition; end
@@ -289,6 +284,18 @@ class RuboCop::AST::DefinedNode < ::RuboCop::AST::Node
def node_parts; end
end
+module RuboCop::AST::Descendence
+ def child_nodes; end
+ def descendants; end
+ def each_child_node(*types); end
+ def each_descendant(*types, &block); end
+ def each_node(*types, &block); end
+
+ protected
+
+ def visit_descendants(types, &block); end
+end
+
class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node
def body; end
end
@@ -407,8 +414,6 @@ class RuboCop::AST::KeywordSplatNode < ::RuboCop::AST::Node
def operator; end
end
-RuboCop::AST::KeywordSplatNode::DOUBLE_SPLAT = T.let(T.unsafe(nil), String)
-
class RuboCop::AST::LambdaNode < ::RuboCop::AST::Node
include(::RuboCop::AST::ParameterizedNode)
include(::RuboCop::AST::ParameterizedNode::RestArguments)
@@ -432,11 +437,11 @@ module RuboCop::AST::MethodDispatchNode
extend(::RuboCop::AST::NodePattern::Macros)
def access_modifier?; end
- def adjacent_def_modifier?(node = T.unsafe(nil)); end
+ def adjacent_def_modifier?(param0 = T.unsafe(nil)); end
def arithmetic_operation?; end
def assignment?; end
def bare_access_modifier?; end
- def bare_access_modifier_declaration?(node = T.unsafe(nil)); end
+ def bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end
def binary_operation?; end
def block_literal?; end
def block_node; end
@@ -446,30 +451,21 @@ module RuboCop::AST::MethodDispatchNode
def dot?; end
def double_colon?; end
def implicit_call?; end
+ def in_macro_scope?(param0 = T.unsafe(nil)); end
def lambda?; end
def lambda_literal?; end
def macro?; end
- def macro_scope?(node = T.unsafe(nil)); end
def method_name; end
def non_bare_access_modifier?; end
- def non_bare_access_modifier_declaration?(node = T.unsafe(nil)); end
+ def non_bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end
def receiver; end
def safe_navigation?; end
def self_receiver?; end
def setter_method?; end
def special_modifier?; end
def unary_operation?; end
-
- private
-
- def macro_kwbegin_wrapper?(parent); end
- def root_node?(node); end
end
-RuboCop::AST::MethodDispatchNode::ARITHMETIC_OPERATORS = T.let(T.unsafe(nil), Array)
-
-RuboCop::AST::MethodDispatchNode::SPECIAL_MODIFIERS = T.let(T.unsafe(nil), Array)
-
module RuboCop::AST::MethodIdentifierPredicates
def assignment_method?; end
def bang_method?; end
@@ -493,24 +489,6 @@ module RuboCop::AST::MethodIdentifierPredicates
def self_receiver?; end
end
-RuboCop::AST::MethodIdentifierPredicates::ENUMERABLE_METHODS = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::MethodIdentifierPredicates::ENUMERATOR_METHODS = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_BINARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_OPERATOR_METHODS = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_STRING_METHODS = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_UNARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::MethodIdentifierPredicates::OPERATOR_METHODS = T.let(T.unsafe(nil), Set)
-
module RuboCop::AST::ModifierNode
def modifier_form?; end
end
@@ -527,6 +505,7 @@ end
class RuboCop::AST::Node < ::Parser::AST::Node
include(::RuboCop::AST::Sexp)
+ include(::RuboCop::AST::Descendence)
include(::RuboCop::RSpec::Node)
extend(::RuboCop::AST::NodePattern::Macros)
@@ -548,7 +527,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node
def array_pattern_with_tail_type?; end
def array_type?; end
def assignment?; end
- def assignment_or_similar?(node = T.unsafe(nil)); end
+ def assignment_or_similar?(param0 = T.unsafe(nil)); end
def back_ref_type?; end
def basic_conditional?; end
def basic_literal?; end
@@ -565,9 +544,8 @@ class RuboCop::AST::Node < ::Parser::AST::Node
def casgn_type?; end
def cbase_type?; end
def chained?; end
- def child_nodes; end
- def class_constructor?(node = T.unsafe(nil)); end
- def class_definition?(node = T.unsafe(nil)); end
+ def class_constructor?(param0 = T.unsafe(nil)); end
+ def class_definition?(param0 = T.unsafe(nil)); end
def class_type?; end
def complete!; end
def complete?; end
@@ -579,20 +557,14 @@ class RuboCop::AST::Node < ::Parser::AST::Node
def csend_type?; end
def cvar_type?; end
def cvasgn_type?; end
- def def_e_type?; end
def def_type?; end
def defined_module; end
def defined_module_name; end
def defined_type?; end
- def defs_e_type?; end
def defs_type?; end
- def descendants; end
def dstr_type?; end
def dsym_type?; end
def each_ancestor(*types, &block); end
- def each_child_node(*types); end
- def each_descendant(*types, &block); end
- def each_node(*types, &block); end
def eflipflop_type?; end
def empty_else_type?; end
def empty_source?; end
@@ -608,7 +580,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node
def forward_arg_type?; end
def forward_args_type?; end
def forwarded_args_type?; end
- def global_const?(node = T.unsafe(nil), param1); end
+ def global_const?(param0 = T.unsafe(nil), param1); end
def guard_clause?; end
def gvar_type?; end
def gvasgn_type?; end
@@ -634,8 +606,8 @@ class RuboCop::AST::Node < ::Parser::AST::Node
def kwoptarg_type?; end
def kwrestarg_type?; end
def kwsplat_type?; end
- def lambda?(node = T.unsafe(nil)); end
- def lambda_or_proc?(node = T.unsafe(nil)); end
+ def lambda?(param0 = T.unsafe(nil)); end
+ def lambda_or_proc?(param0 = T.unsafe(nil)); end
def lambda_type?; end
def last_line; end
def left_sibling; end
@@ -649,19 +621,18 @@ class RuboCop::AST::Node < ::Parser::AST::Node
def match_alt_type?; end
def match_as_type?; end
def match_current_line_type?; end
- def match_guard_clause?(node = T.unsafe(nil)); end
+ def match_guard_clause?(param0 = T.unsafe(nil)); end
def match_nil_pattern_type?; end
def match_rest_type?; end
def match_var_type?; end
def match_with_lvasgn_type?; end
def match_with_trailing_comma_type?; end
def mlhs_type?; end
- def module_definition?(node = T.unsafe(nil)); end
+ def module_definition?(param0 = T.unsafe(nil)); end
def module_type?; end
- def mrasgn_type?; end
def multiline?; end
def mutable_literal?; end
- def new_class_or_module_block?(node = T.unsafe(nil)); end
+ def new_class_or_module_block?(param0 = T.unsafe(nil)); end
def next_type?; end
def nil_type?; end
def node_parts; end
@@ -681,19 +652,19 @@ class RuboCop::AST::Node < ::Parser::AST::Node
def or_type?; end
def pair_type?; end
def parent; end
+ def parent?; end
def parent_module_name; end
def parenthesized_call?; end
def pin_type?; end
def post_condition_loop?; end
def postexe_type?; end
def preexe_type?; end
- def proc?(node = T.unsafe(nil)); end
+ def proc?(param0 = T.unsafe(nil)); end
def procarg0_type?; end
def pure?; end
def range_type?; end
- def rasgn_type?; end
def rational_type?; end
- def receiver(node = T.unsafe(nil)); end
+ def receiver(param0 = T.unsafe(nil)); end
def recursive_basic_literal?; end
def recursive_literal?; end
def redo_type?; end
@@ -708,7 +679,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node
def return_type?; end
def right_sibling; end
def right_siblings; end
- def root_type?; end
+ def root?; end
def sclass_type?; end
def self_type?; end
def send_type?; end
@@ -721,9 +692,9 @@ class RuboCop::AST::Node < ::Parser::AST::Node
def source_range; end
def special_keyword?; end
def splat_type?; end
- def str_content(node = T.unsafe(nil)); end
+ def str_content(param0 = T.unsafe(nil)); end
def str_type?; end
- def struct_constructor?(node = T.unsafe(nil)); end
+ def struct_constructor?(param0 = T.unsafe(nil)); end
def super_type?; end
def sym_type?; end
def true_type?; end
@@ -745,13 +716,12 @@ class RuboCop::AST::Node < ::Parser::AST::Node
protected
def parent=(node); end
- def visit_descendants(types, &block); end
private
def begin_value_used?; end
def case_if_value_used?; end
- def defined_module0(node = T.unsafe(nil)); end
+ def defined_module0(param0 = T.unsafe(nil)); end
def for_value_used?; end
def parent_module_name_for_block(ancestor); end
def parent_module_name_for_sclass(sclass_node); end
@@ -760,84 +730,875 @@ class RuboCop::AST::Node < ::Parser::AST::Node
def while_until_value_used?; end
end
-RuboCop::AST::Node::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::ARGUMENT_TYPES = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::ASSIGNMENTS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::ASSIGNMENTS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::BASIC_CONDITIONALS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::BASIC_CONDITIONALS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::BASIC_LITERALS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::BASIC_LITERALS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::COMPOSITE_LITERALS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::COMPOSITE_LITERALS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::CONDITIONALS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::CONDITIONALS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::EQUALS_ASSIGNMENTS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::EQUALS_ASSIGNMENTS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::IMMUTABLE_LITERALS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::IMMUTABLE_LITERALS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::KEYWORDS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::KEYWORDS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::LITERALS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::LITERALS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::LOOP_TYPES = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::LOOP_TYPES = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::MUTABLE_LITERALS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::MUTABLE_LITERALS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::OPERATOR_KEYWORDS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::OPERATOR_KEYWORDS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::REFERENCES = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::REFERENCES = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::SHORTHAND_ASSIGNMENTS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::SHORTHAND_ASSIGNMENTS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::SPECIAL_KEYWORDS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::SPECIAL_KEYWORDS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::TRUTHY_LITERALS = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::TRUTHY_LITERALS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set)
class RuboCop::AST::NodePattern
- def initialize(str); end
+ include(::RuboCop::AST::NodePattern::MethodDefiner)
+ extend(::Forwardable)
+
+ def initialize(str, compiler: T.unsafe(nil)); end
def ==(other); end
+ def as_json(_options = T.unsafe(nil)); end
+ def ast; end
+ def captures(*args, &block); end
+ def encode_with(coder); end
def eql?(other); end
+ def freeze; end
+ def init_with(coder); end
def marshal_dump; end
def marshal_load(pattern); end
- def match(*args, **rest); end
+ def match(*args, **rest, &block); end
+ def match_code; end
+ def named_parameters(*args, &block); end
def pattern; end
+ def positional_parameters(*args, &block); end
def to_s; end
class << self
def descend(element, &block); end
end
end
+class RuboCop::AST::NodePattern::Builder
+ def emit_atom(type, value); end
+ def emit_call(type, selector, args = T.unsafe(nil)); end
+ def emit_capture(capture_token, node); end
+ def emit_list(type, _begin, children, _end); end
+ def emit_subsequence(node_list); end
+ def emit_unary_op(type, _operator = T.unsafe(nil), *children); end
+ def emit_union(begin_t, pattern_lists, end_t); end
+
+ private
+
+ def n(type, *args); end
+ def optimizable_as_set?(children); end
+ def union_children(pattern_lists); end
+end
+
+class RuboCop::AST::NodePattern::Comment
+ def initialize(range); end
+
+ def ==(other); end
+ def inspect; end
+ def loc; end
+ def location; end
+ def text; end
+end
+
+class RuboCop::AST::NodePattern::Compiler
+ extend(::Forwardable)
+
+ def initialize; end
+
+ def bind(*args, &block); end
+ def binding; end
+ def captures; end
+ def compile_as_atom(node); end
+ def compile_as_node_pattern(node, **options); end
+ def compile_sequence(sequence, var:); end
+ def each_union(enum, &block); end
+ def freeze; end
+ def named_parameter(name); end
+ def named_parameters; end
+ def next_capture; end
+ def parser; end
+ def positional_parameter(number); end
+ def positional_parameters; end
+ def with_temp_variables(*names, &block); end
+
+ private
+
+ def enforce_same_captures(enum); end
+ def new_capture; end
+end
+
+class RuboCop::AST::NodePattern::Compiler::AtomSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler
+
+ private
+
+ def visit_const; end
+ def visit_named_parameter; end
+ def visit_number; end
+ def visit_other_type; end
+ def visit_positional_parameter; end
+ def visit_regexp; end
+ def visit_set; end
+ def visit_string; end
+ def visit_symbol; end
+ def visit_unify; end
+end
+
+class RuboCop::AST::NodePattern::Compiler::Binding
+ def initialize; end
+
+ def bind(name); end
+ def union_bind(enum); end
+
+ private
+
+ def forbid(names); end
+end
+
+class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern::Compiler
+ def initialize; end
+
+ def comments(*args, &block); end
+ def named_parameters; end
+ def node_ids; end
+ def parser; end
+ def tokens(*args, &block); end
+end
+
+class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer
+ def initialize(pattern, compiler: T.unsafe(nil)); end
+
+ def compiler; end
+ def node_pattern; end
+ def pattern; end
+ def test(ruby, trace: T.unsafe(nil)); end
+
+ private
+
+ def ruby_ast(ruby); end
+ def ruby_parser; end
+end
+
+RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::COLOR_SCHEME = T.let(T.unsafe(nil), Hash)
+
+RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Compiler = RuboCop::AST::NodePattern::Compiler::Debug
+
+class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Result < ::Struct
+ def color_map(color_scheme = T.unsafe(nil)); end
+ def colorize(color_scheme = T.unsafe(nil)); end
+ def colorizer; end
+ def colorizer=(_); end
+ def match_map; end
+ def matched?(node); end
+ def returned; end
+ def returned=(_); end
+ def ruby_ast; end
+ def ruby_ast=(_); end
+ def trace; end
+ def trace=(_); end
+
+ private
+
+ def ast; end
+ def color_map_for(node, color); end
+
+ class << self
+ def [](*_); end
+ def inspect; end
+ def members; end
+ def new(*_); end
+ end
+end
+
+module RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler
+ def do_compile; end
+
+ private
+
+ def node_id; end
+ def tracer(kind); end
+end
+
+class RuboCop::AST::NodePattern::Compiler::Debug::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler
+ include(::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler)
+end
+
+class RuboCop::AST::NodePattern::Compiler::Debug::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler
+ include(::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler)
+end
+
+class RuboCop::AST::NodePattern::Compiler::Debug::Trace
+ def initialize; end
+
+ def enter(node_id); end
+ def matched?(node_id); end
+ def success(node_id); end
+end
+
+class RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler
+ def initialize(compiler, var: T.unsafe(nil), access: T.unsafe(nil), seq_head: T.unsafe(nil)); end
+
+ def access; end
+ def seq_head; end
+
+ private
+
+ def access_element; end
+ def access_node; end
+ def compile_args(arg_list, first: T.unsafe(nil)); end
+ def compile_guard_clause; end
+ def compile_value_match(value); end
+ def multiple_access(kind); end
+ def visit_ascend; end
+ def visit_capture; end
+ def visit_descend; end
+ def visit_function_call; end
+ def visit_intersection; end
+ def visit_negation; end
+ def visit_node_type; end
+ def visit_other_type; end
+ def visit_predicate; end
+ def visit_sequence; end
+ def visit_unify; end
+ def visit_union; end
+ def visit_wildcard; end
+end
+
+class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler
+ def initialize(compiler, sequence:, var:); end
+
+ def compile_sequence; end
+ def in_sync; end
+
+ protected
+
+ def compile_terms(children = T.unsafe(nil), last_arity = T.unsafe(nil)); end
+ def cur_index; end
+ def sync; end
+
+ private
+
+ def compile_and_advance(term); end
+ def compile_any_order_branches(matched_var); end
+ def compile_any_order_else; end
+ def compile_captured_repetition(child_code, child_captures); end
+ def compile_case(when_branches, else_code); end
+ def compile_child_nb_guard(arity_range); end
+ def compile_cur_index; end
+ def compile_index(cur = T.unsafe(nil)); end
+ def compile_loop(term); end
+ def compile_loop_advance(to = T.unsafe(nil)); end
+ def compile_matched(kind); end
+ def compile_max_matched; end
+ def compile_min_check; end
+ def compile_remaining; end
+ def compile_union_forks; end
+ def empty_loop; end
+ def handle_prev; end
+ def merge_forks!(forks); end
+ def preserve_union_start(forks); end
+ def remaining_arities(children, last_arity); end
+ def use_index_from_end; end
+ def visit_any_order; end
+ def visit_capture; end
+ def visit_other_type; end
+ def visit_repetition; end
+ def visit_rest; end
+ def visit_union; end
+ def within_loop; end
+end
+
+RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::DELTA = T.let(T.unsafe(nil), Integer)
+
+class RuboCop::AST::NodePattern::Compiler::Subcompiler
+ def initialize(compiler); end
+
+ def compile(node); end
+ def compiler; end
+
+ private
+
+ def do_compile; end
+ def node; end
+
+ class << self
+ def inherited(base); end
+ def method_added(method); end
+ def registry; end
+ end
+end
+
class RuboCop::AST::NodePattern::Invalid < ::StandardError
end
+class RuboCop::AST::NodePattern::Lexer < ::RuboCop::AST::NodePattern::LexerRex
+ def initialize(source); end
+
+ def comments; end
+ def source_buffer; end
+ def tokens; end
+
+ private
+
+ def do_parse; end
+ def emit(type); end
+ def emit_comment; end
+ def emit_regexp; end
+ def token(type, value); end
+end
+
+RuboCop::AST::NodePattern::Lexer::Error = RuboCop::AST::NodePattern::LexerRex::ScanError
+
+class RuboCop::AST::NodePattern::LexerRex
+ def action; end
+ def filename; end
+ def filename=(_); end
+ def location; end
+ def match; end
+ def matches; end
+ def next_token; end
+ def parse(str); end
+ def parse_file(path); end
+ def scanner_class; end
+ def ss; end
+ def ss=(_); end
+ def state; end
+ def state=(_); end
+end
+
+RuboCop::AST::NodePattern::LexerRex::IDENTIFIER = T.let(T.unsafe(nil), Regexp)
+
+class RuboCop::AST::NodePattern::LexerRex::LexerError < ::StandardError
+end
+
+RuboCop::AST::NodePattern::LexerRex::REGEXP = T.let(T.unsafe(nil), Regexp)
+
+RuboCop::AST::NodePattern::LexerRex::REGEXP_BODY = T.let(T.unsafe(nil), Regexp)
+
+RuboCop::AST::NodePattern::LexerRex::SYMBOL_NAME = T.let(T.unsafe(nil), Regexp)
+
+class RuboCop::AST::NodePattern::LexerRex::ScanError < ::RuboCop::AST::NodePattern::LexerRex::LexerError
+end
+
module RuboCop::AST::NodePattern::Macros
def def_node_matcher(method_name, pattern_str, **keyword_defaults); end
def def_node_search(method_name, pattern_str, **keyword_defaults); end
end
-class RuboCop::AST::NodePattern::Matcher
- def initialize(&block); end
+module RuboCop::AST::NodePattern::MethodDefiner
+ def as_lambda; end
+ def compile_as_lambda; end
+ def def_node_matcher(base, method_name, **defaults); end
+ def def_node_search(base, method_name, **defaults); end
+
+ private
+
+ def compile_init; end
+ def def_helper(base, method_name, **defaults); end
+ def emit_keyword_list(forwarding: T.unsafe(nil)); end
+ def emit_lambda_code; end
+ def emit_method_code; end
+ def emit_node_search(method_name); end
+ def emit_node_search_body(method_name, prelude:, on_match:); end
+ def emit_param_list; end
+ def emit_params(*first, forwarding: T.unsafe(nil)); end
+ def emit_retval; end
+ def emit_yield_capture(when_no_capture = T.unsafe(nil), yield_with: T.unsafe(nil)); end
+ def wrapping_block(method_name, **defaults); end
+end
+
+class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node
+ include(::RuboCop::AST::Descendence)
+ extend(::Forwardable)
+
+ def arity; end
+ def arity_range; end
+ def capture?; end
+ def child; end
+ def children_nodes; end
+ def in_sequence_head; end
+ def matches_within_set?; end
+ def nb_captures; end
+ def rest?; end
+ def variadic?; end
+ def with(type: T.unsafe(nil), children: T.unsafe(nil), location: T.unsafe(nil)); end
+end
+
+class RuboCop::AST::NodePattern::Node::AnyOrder < ::RuboCop::AST::NodePattern::Node
+ include(::RuboCop::AST::NodePattern::Node::ForbidInSeqHead)
+
+ def arity; end
+ def ends_with_rest?; end
+ def rest_node; end
+ def term_nodes; end
+end
+
+class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node
+ def arity(*args, &block); end
+ def capture?; end
+ def in_sequence_head; end
+ def nb_captures; end
+ def rest?(*args, &block); end
+end
+
+module RuboCop::AST::NodePattern::Node::ForbidInSeqHead
+ def in_sequence_head; end
+end
+
+RuboCop::AST::NodePattern::Node::FunctionCall = RuboCop::AST::NodePattern::Node::Predicate
+
+RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash)
+
+module RuboCop::AST::NodePattern::Node::MapMinMax
+ def map_min_max(enum); end
+end
+
+class RuboCop::AST::NodePattern::Node::Predicate < ::RuboCop::AST::NodePattern::Node
+ def arg_list; end
+ def method_name; end
+end
+
+class RuboCop::AST::NodePattern::Node::Repetition < ::RuboCop::AST::NodePattern::Node
+ include(::RuboCop::AST::NodePattern::Node::ForbidInSeqHead)
+
+ def arity; end
+ def operator; end
+end
+
+RuboCop::AST::NodePattern::Node::Repetition::ARITIES = T.let(T.unsafe(nil), Hash)
+
+class RuboCop::AST::NodePattern::Node::Rest < ::RuboCop::AST::NodePattern::Node
+ def arity; end
+ def in_sequence_head; end
+ def rest?; end
+end
+
+class RuboCop::AST::NodePattern::Node::Sequence < ::RuboCop::AST::NodePattern::Node
+ include(::RuboCop::AST::NodePattern::Node::ForbidInSeqHead)
+
+ def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end
+end
+
+class RuboCop::AST::NodePattern::Node::Subsequence < ::RuboCop::AST::NodePattern::Node
+ include(::RuboCop::AST::NodePattern::Node::ForbidInSeqHead)
+ include(::RuboCop::AST::NodePattern::Node::MapMinMax)
+
+ def arity; end
+ def in_sequence_head; end
+end
+
+class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node
+ include(::RuboCop::AST::NodePattern::Node::MapMinMax)
+
+ def arity; end
+ def in_sequence_head; end
+end
+
+class RuboCop::AST::NodePattern::Parser < ::Racc::Parser
+ extend(::Forwardable)
+
+ def initialize(builder = T.unsafe(nil)); end
+
+ def _reduce_10(val, _values); end
+ def _reduce_11(val, _values); end
+ def _reduce_13(val, _values); end
+ def _reduce_14(val, _values); end
+ def _reduce_15(val, _values); end
+ def _reduce_16(val, _values); end
+ def _reduce_17(val, _values); end
+ def _reduce_18(val, _values); end
+ def _reduce_19(val, _values); end
+ def _reduce_2(val, _values); end
+ def _reduce_20(val, _values); end
+ def _reduce_21(val, _values); end
+ def _reduce_22(val, _values); end
+ def _reduce_25(val, _values); end
+ def _reduce_26(val, _values); end
+ def _reduce_3(val, _values); end
+ def _reduce_33(val, _values); end
+ def _reduce_37(val, _values); end
+ def _reduce_38(val, _values); end
+ def _reduce_39(val, _values); end
+ def _reduce_4(val, _values); end
+ def _reduce_40(val, _values); end
+ def _reduce_41(val, _values); end
+ def _reduce_42(val, _values); end
+ def _reduce_43(val, _values); end
+ def _reduce_44(val, _values); end
+ def _reduce_45(val, _values); end
+ def _reduce_46(val, _values); end
+ def _reduce_5(val, _values); end
+ def _reduce_6(val, _values); end
+ def _reduce_7(val, _values); end
+ def _reduce_8(val, _values); end
+ def _reduce_9(val, _values); end
+ def _reduce_none(val, _values); end
+ def emit_atom(*args, &block); end
+ def emit_call(*args, &block); end
+ def emit_capture(*args, &block); end
+ def emit_list(*args, &block); end
+ def emit_unary_op(*args, &block); end
+ def emit_union(*args, &block); end
+ def inspect; end
+ def next_token(*args, &block); end
+ def parse(source); end
+
+ private
+
+ def enforce_unary(node); end
+ def on_error(token, val, _vstack); end
+end
+
+RuboCop::AST::NodePattern::Parser::Builder = RuboCop::AST::NodePattern::Builder
+
+RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer
+
+RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array)
+
+RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array)
+
+class RuboCop::AST::NodePattern::Parser::WithMeta < ::RuboCop::AST::NodePattern::Parser
+ def comments; end
+ def do_parse; end
+ def tokens; end
+end
+
+class RuboCop::AST::NodePattern::Parser::WithMeta::Builder < ::RuboCop::AST::NodePattern::Builder
+ def emit_atom(type, token); end
+ def emit_call(type, selector_t, args = T.unsafe(nil)); end
+ def emit_list(type, begin_t, children, end_t); end
+ def emit_unary_op(type, operator_t = T.unsafe(nil), *children); end
+
+ private
+
+ def join_exprs(left_expr, right_expr); end
+ def loc(token_or_range); end
+ def n(type, children, source_map); end
+ def source_map(token_or_range, begin_t: T.unsafe(nil), end_t: T.unsafe(nil), operator_t: T.unsafe(nil), selector_t: T.unsafe(nil)); end
+end
+
+class RuboCop::AST::NodePattern::Parser::WithMeta::Lexer < ::RuboCop::AST::NodePattern::Lexer
+ def initialize(str_or_buffer); end
- def ===(compare); end
+ def emit_comment; end
+ def pos; end
+ def source_buffer; end
+ def token(type, value); end
end
+module RuboCop::AST::NodePattern::Sets
+ class << self
+ def [](set); end
+ def name(set); end
+ def uniq(name); end
+ end
+end
+
+RuboCop::AST::NodePattern::Sets::MAX = T.let(T.unsafe(nil), Integer)
+
+RuboCop::AST::NodePattern::Sets::REGISTRY = T.let(T.unsafe(nil), Hash)
+
+RuboCop::AST::NodePattern::Sets::SET_0_1 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_0_1_2 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_10_10 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_1_1 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_1_2 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_ALL_CONTEXT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_ANY_INSTANCE_ALLOW_ANY_INSTANCE_OF_EXPECT_ANY_INSTANCE_OF = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_BACKGROUND_SCENARIO_XSCENARIO_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_BEFORE_AFTER = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_BE_EQ_EQL_EQUAL = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_BE_TRUTHY_BE_FALSEY_BE_FALSY_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_CALLER_CALLER_LOCATIONS = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_CALL_RUN = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_CAPTURE2_CAPTURE2E_CAPTURE3_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_CHANNEL_CONTROLLER_HELPER_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_CIPHER_DIGEST = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_INSTANCE_EVAL = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE_STRUCT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_COLLECT_COMPACT_FLATTEN_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_CONTEXT_SHARED_CONTEXT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_COUNT_LENGTH_SIZE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_DEBUGGER_BYEBUG_REMOTE_BYEBUG = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC_2 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC_3 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC_4 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC_5 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC_6 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_FEATURE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_DOUBLE_SPY = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_DOWNCASE_UPCASE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_EACH_EXAMPLE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_ENUMERATOR_RATIONAL_COMPLEX_THREAD = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_ESCAPE_ENCODE_UNESCAPE_DECODE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_EXACTLY_AT_LEAST_AT_MOST = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_EXPECT_ALLOW = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_EXPECT_IS_EXPECTED_EXPECT_ANY_INSTANCE_OF = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_FACTORYGIRL_FACTORYBOT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_FDESCRIBE_FCONTEXT_FFEATURE_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST_POP_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST__ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_FIXNUM_BIGNUM = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_FLATTEN_FLATTEN = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_FORMAT_SPRINTF_PRINTF = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_GEMCUTTER_RUBYGEMS_RUBYFORGE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB_SUB_SUB = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_INCLUDE_MEMBER = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EXEC_CLASS_EXEC_MODULE_EXEC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_IO_FILE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_IS_EXPECTED_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_IT_BEHAVES_LIKE_IT_SHOULD_BEHAVE_LIKE_INCLUDE_EXAMPLES = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_IT_BEHAVES_LIKE_IT_SHOULD_BEHAVE_LIKE_INCLUDE_EXAMPLES_INCLUDE_CONTEXT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_IT_SPECIFY_EXAMPLE_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_IT_SPECIFY_EXAMPLE_ETC_2 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_IT_SPECIFY_EXAMPLE_ETC_3 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_LAST_FIRST = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_LENGTH_SIZE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_LET_LET = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_LET_LET_SUBJECT_SUBJECT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_MATCH_MATCH = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_MATCH__MATCH = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_NEW_COMPILE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_NEW_OPEN = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_PENDING_XIT_XSPECIFY_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_PREPEND_BEFORE_BEFORE_APPEND_BEFORE_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_PREPEND_BEFORE_BEFORE_APPEND_BEFORE_ETC_2 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_PRY_REMOTE_PRY_PRY_REMOTE_CONSOLE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_PUBLIC_CONSTANT_PRIVATE_CONSTANT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_PUBLIC_PROTECTED_PRIVATE_MODULE_FUNCTION = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_RAISE_ERROR_RAISE_EXCEPTION = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL_THROW_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_RECEIVE_HAVE_RECEIVED = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_RECEIVE_MESSAGE_CHAIN_STUB_CHAIN = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_RECEIVE_RECEIVE_MESSAGES_RECEIVE_MESSAGE_CHAIN_HAVE_RECEIVED = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SAVE_AND_OPEN_PAGE_SAVE_AND_OPEN_SCREENSHOT_SAVE_SCREENSHOT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL_REJECT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SHARED_CONTEXT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SHARED_EXAMPLES_SHARED_EXAMPLES_FOR = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SHARED_EXAMPLES_SHARED_EXAMPLES_FOR_SHARED_CONTEXT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SHARED_EXAMPLES_SHARED_EXAMPLES_FOR_SHARED_CONTEXT_ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SKIP_PENDING = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SORT_BY_SORT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SORT_MIN_MAX = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SPAWN_SYSTEM = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SPRINTF_FORMAT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_START_WITH_END_WITH = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_START_WITH_STARTS_WITH_END_WITH_ENDS_WITH = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SUBJECT_SUBJECT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_TEMPFILE_STRINGIO = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_TIME_DATETIME = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_TO_TO_NOT_NOT_TO = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET_ZERO_POSITIVE_NEGATIVE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET__ = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET__AT_SLICE = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET__EQL_ = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET__GLOB = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET___ = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET___2 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET___3 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET___4 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET___5 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET___6 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET___7 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET____ = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET____ETC = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET____ETC_2 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET____ETC_3 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET____ETC_4 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::Sets::SET____ETC_5 = T.let(T.unsafe(nil), Set)
+
+RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String)
+
module RuboCop::AST::NumericNode
def sign?; end
end
-RuboCop::AST::NumericNode::SIGN_REGEX = T.let(T.unsafe(nil), Regexp)
-
class RuboCop::AST::OrNode < ::RuboCop::AST::Node
include(::RuboCop::AST::BinaryOperatorNode)
include(::RuboCop::AST::PredicateOperatorNode)
@@ -856,14 +1617,6 @@ class RuboCop::AST::PairNode < ::RuboCop::AST::Node
def value_on_new_line?; end
end
-RuboCop::AST::PairNode::COLON = T.let(T.unsafe(nil), String)
-
-RuboCop::AST::PairNode::HASH_ROCKET = T.let(T.unsafe(nil), String)
-
-RuboCop::AST::PairNode::SPACED_COLON = T.let(T.unsafe(nil), String)
-
-RuboCop::AST::PairNode::SPACED_HASH_ROCKET = T.let(T.unsafe(nil), String)
-
module RuboCop::AST::ParameterizedNode
def arguments?; end
def block_argument?; end
@@ -895,14 +1648,6 @@ module RuboCop::AST::PredicateOperatorNode
def semantic_operator?; end
end
-RuboCop::AST::PredicateOperatorNode::LOGICAL_AND = T.let(T.unsafe(nil), String)
-
-RuboCop::AST::PredicateOperatorNode::LOGICAL_OR = T.let(T.unsafe(nil), String)
-
-RuboCop::AST::PredicateOperatorNode::SEMANTIC_AND = T.let(T.unsafe(nil), String)
-
-RuboCop::AST::PredicateOperatorNode::SEMANTIC_OR = T.let(T.unsafe(nil), String)
-
class RuboCop::AST::ProcessedSource
include(::RuboCop::Ext::ProcessedSource)
@@ -978,6 +1723,7 @@ class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node
def interpolation?; end
def multiline_mode?; end
def no_encoding?; end
+ def options; end
def percent_r_literal?; end
def regopt; end
def single_interpolation?; end
@@ -989,8 +1735,6 @@ class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node
def regopt_include?(option); end
end
-RuboCop::AST::RegexpNode::OPTIONS = T.let(T.unsafe(nil), Hash)
-
class RuboCop::AST::ResbodyNode < ::RuboCop::AST::Node
def body; end
def branch_index; end
@@ -1011,6 +1755,12 @@ class RuboCop::AST::ReturnNode < ::RuboCop::AST::Node
include(::RuboCop::AST::ParameterizedNode::WrappedArguments)
end
+module RuboCop::AST::RuboCopCompatibility
+ def rubocop_loaded; end
+end
+
+RuboCop::AST::RuboCopCompatibility::INCOMPATIBLE_COPS = T.let(T.unsafe(nil), Hash)
+
class RuboCop::AST::SelfClassNode < ::RuboCop::AST::Node
def body; end
def identifier; end
@@ -1022,7 +1772,7 @@ class RuboCop::AST::SendNode < ::RuboCop::AST::Node
include(::RuboCop::AST::MethodIdentifierPredicates)
include(::RuboCop::AST::MethodDispatchNode)
- def attribute_accessor?(node = T.unsafe(nil)); end
+ def attribute_accessor?(param0 = T.unsafe(nil)); end
private
@@ -1211,14 +1961,6 @@ module RuboCop::AST::Traversal
def walk(node); end
end
-RuboCop::AST::Traversal::MANY_CHILD_NODES = T.let(T.unsafe(nil), Array)
-
-RuboCop::AST::Traversal::NO_CHILD_NODES = T.let(T.unsafe(nil), Array)
-
-RuboCop::AST::Traversal::ONE_CHILD_NODE = T.let(T.unsafe(nil), Array)
-
-RuboCop::AST::Traversal::SECOND_CHILD_ONLY = T.let(T.unsafe(nil), Array)
-
class RuboCop::AST::UntilNode < ::RuboCop::AST::Node
include(::RuboCop::AST::ConditionalNode)
include(::RuboCop::AST::ModifierNode)
@@ -1264,69 +2006,3 @@ RuboCop::NodePattern = RuboCop::AST::NodePattern
RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource
RuboCop::Token = RuboCop::AST::Token
-
-RuboCop::AST::NodePattern::Compiler::ANY_ORDER_TEMPLATE = T.let(T.unsafe(nil), ERB)
-
-RuboCop::AST::NodePattern::Compiler::CAPTURED_REST = T.let(T.unsafe(nil), String)
-
-RuboCop::AST::NodePattern::Compiler::CLOSING = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::COMMENT = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::CONST = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::CUR_ELEMENT = T.let(T.unsafe(nil), String)
-
-RuboCop::AST::NodePattern::Compiler::CUR_NODE = T.let(T.unsafe(nil), String)
-
-RuboCop::AST::NodePattern::Compiler::CUR_PLACEHOLDER = T.let(T.unsafe(nil), String)
-
-RuboCop::AST::NodePattern::Compiler::FUNCALL = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::IDENTIFIER = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::KEYWORD = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::KEYWORD_NAME = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::LITERAL = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::META = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::METHOD_NAME = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::MULTIPLE_CUR_PLACEHOLDER = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::NODE = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::NUMBER = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::ONLY_SEPARATOR = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::PARAM = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::PARAM_CONST = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::PARAM_NUMBER = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::PREDICATE = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::REPEATED_TEMPLATE = T.let(T.unsafe(nil), ERB)
-
-RuboCop::AST::NodePattern::Compiler::REST = T.let(T.unsafe(nil), String)
-
-RuboCop::AST::NodePattern::Compiler::SEPARATORS = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::SEQ_HEAD_GUARD = T.let(T.unsafe(nil), String)
-
-RuboCop::AST::NodePattern::Compiler::SEQ_HEAD_INDEX = T.let(T.unsafe(nil), Integer)
-
-RuboCop::AST::NodePattern::Compiler::STRING = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::SYMBOL = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::TOKEN = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::TOKENS = T.let(T.unsafe(nil), Regexp)
-
-RuboCop::AST::NodePattern::Compiler::WILDCARD = T.let(T.unsafe(nil), Regexp) | true |
Other | Homebrew | brew | b3d12361acb9d41fbe5ca772a01af941a9be9bf1.json | sorbet: Update RBI files and prune files.yaml.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml). | Library/Homebrew/sorbet/rbi/gems/rubocop@0.92.0.rbi | @@ -175,7 +175,7 @@ class RuboCop::CommentConfig
def each_directive; end
def each_mentioned_cop; end
def enable_all?(comment); end
- def extra_enabled_comments_with_names(extras, names); end
+ def extra_enabled_comments_with_names(extras:, names:); end
def handle_enable_all(names, extras, comment); end
def handle_switch(cop_names, names, disabled, extras, comment); end
def non_comment_token_line_numbers; end
@@ -393,6 +393,21 @@ RuboCop::ConfigObsoletion::RENAMED_COPS = T.let(T.unsafe(nil), Array)
RuboCop::ConfigObsoletion::SPLIT_COPS = T.let(T.unsafe(nil), Array)
+class RuboCop::ConfigRegeneration
+ def options; end
+
+ private
+
+ def generation_command; end
+ def todo_exists?; end
+end
+
+RuboCop::ConfigRegeneration::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String)
+
+RuboCop::ConfigRegeneration::COMMAND_REGEX = T.let(T.unsafe(nil), Regexp)
+
+RuboCop::ConfigRegeneration::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
+
class RuboCop::ConfigStore
def initialize; end
@@ -564,7 +579,6 @@ RuboCop::Cop::Badge::InvalidBadge::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Base
include(::RuboCop::AST::Sexp)
include(::RuboCop::PathUtil)
- include(::RuboCop::TokensUtil)
include(::RuboCop::Cop::Util)
include(::RuboCop::Cop::IgnoredNode)
include(::RuboCop::Cop::AutocorrectLogic)
@@ -663,7 +677,7 @@ end
class RuboCop::Cop::Bundler::DuplicatedGem < ::RuboCop::Cop::Cop
include(::RuboCop::Cop::RangeHelp)
- def gem_declarations(node0); end
+ def gem_declarations(param0); end
def investigate(processed_source); end
private
@@ -678,7 +692,7 @@ RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Bundler::GemComment < ::RuboCop::Cop::Cop
include(::RuboCop::Cop::DefNode)
- def gem_declaration?(node = T.unsafe(nil)); end
+ def gem_declaration?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -707,7 +721,7 @@ class RuboCop::Cop::Bundler::InsecureProtocolSource < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::Cop::AutoCorrector)
- def insecure_protocol_source?(node = T.unsafe(nil)); end
+ def insecure_protocol_source?(param0 = T.unsafe(nil)); end
def on_send(node); end
end
@@ -720,7 +734,7 @@ class RuboCop::Cop::Bundler::OrderedGems < ::RuboCop::Cop::Cop
include(::RuboCop::Cop::OrderedGemNode)
def autocorrect(node); end
- def gem_declarations(node0); end
+ def gem_declarations(param0); end
def investigate(processed_source); end
private
@@ -883,7 +897,6 @@ class RuboCop::Cop::Commissioner
def on_match_with_trailing_comma(node); end
def on_mlhs(node); end
def on_module(node); end
- def on_mrasgn(node); end
def on_next(node); end
def on_nil(node); end
def on_not(node); end
@@ -898,7 +911,6 @@ class RuboCop::Cop::Commissioner
def on_postexe(node); end
def on_preexe(node); end
def on_procarg0(node); end
- def on_rasgn(node); end
def on_rational(node); end
def on_redo(node); end
def on_regexp(node); end
@@ -1089,7 +1101,7 @@ end
module RuboCop::Cop::DefNode
extend(::RuboCop::AST::NodePattern::Macros)
- def non_public_modifier?(node = T.unsafe(nil)); end
+ def non_public_modifier?(param0 = T.unsafe(nil)); end
private
@@ -1169,7 +1181,7 @@ end
module RuboCop::Cop::EmptyParameter
extend(::RuboCop::AST::NodePattern::Macros)
- def empty_arguments?(node = T.unsafe(nil)); end
+ def empty_arguments?(param0 = T.unsafe(nil)); end
private
@@ -1281,8 +1293,8 @@ end
class RuboCop::Cop::Gemspec::DuplicatedAssignment < ::RuboCop::Cop::Cop
include(::RuboCop::Cop::RangeHelp)
- def assignment_method_declarations(node0); end
- def gem_specification(node0); end
+ def assignment_method_declarations(param0); end
+ def gem_specification(param0); end
def investigate(processed_source); end
private
@@ -1300,7 +1312,7 @@ class RuboCop::Cop::Gemspec::OrderedDependencies < ::RuboCop::Cop::Cop
include(::RuboCop::Cop::OrderedGemNode)
def autocorrect(node); end
- def dependency_declarations(node0); end
+ def dependency_declarations(param0); end
def investigate(processed_source); end
private
@@ -1315,8 +1327,8 @@ class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Cop
include(::RuboCop::Cop::RangeHelp)
def investigate(processed_source); end
- def required_ruby_version(node0); end
- def string_version?(node = T.unsafe(nil)); end
+ def required_ruby_version(param0); end
+ def string_version?(param0 = T.unsafe(nil)); end
private
@@ -1329,9 +1341,9 @@ RuboCop::Cop::Gemspec::RequiredRubyVersion::MISSING_MSG = T.let(T.unsafe(nil), S
RuboCop::Cop::Gemspec::RequiredRubyVersion::NOT_EQUAL_MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage < ::RuboCop::Cop::Cop
- def gem_specification?(node0); end
+ def gem_specification?(param0); end
def on_const(node); end
- def ruby_version?(node = T.unsafe(nil)); end
+ def ruby_version?(param0 = T.unsafe(nil)); end
private
@@ -1464,7 +1476,7 @@ end
module RuboCop::Cop::HashTransformMethod
extend(::RuboCop::AST::NodePattern::Macros)
- def array_receiver?(node = T.unsafe(nil)); end
+ def array_receiver?(param0 = T.unsafe(nil)); end
def on_block(node); end
def on_csend(node); end
def on_send(node); end
@@ -1708,7 +1720,7 @@ class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::Cop::AutoCorrector)
- def block_end_align_target?(node = T.unsafe(nil), param1); end
+ def block_end_align_target?(param0 = T.unsafe(nil), param1); end
def on_block(node); end
def style_parameter_name; end
@@ -1760,7 +1772,6 @@ class RuboCop::Cop::Layout::CaseIndentation < ::RuboCop::Cop::Base
def base_column(case_node, base); end
def check_when(when_node); end
def detect_incorrect_style(when_node); end
- def find_message(*_); end
def incorrect_style(when_node); end
def indent_one_step?; end
def indentation_width; end
@@ -2012,7 +2023,6 @@ RuboCop::Cop::Layout::EmptyLineAfterMagicComment::MSG = T.let(T.unsafe(nil), Str
class RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
- include(::RuboCop::Cop::RescueNode)
extend(::RuboCop::Cop::AutoCorrector)
def on_case(node); end
@@ -2030,7 +2040,6 @@ class RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition < ::RuboCop::Cop::B
def multiline_rescue_exceptions?(exception_nodes); end
def multiline_when_condition?(when_node); end
def next_line_empty?(line); end
- def right_sibling(node); end
end
RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil), String)
@@ -2109,6 +2118,7 @@ class RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier < ::RuboCop::Cop::Bas
def next_line_empty?(last_send_line); end
def previous_line_empty?(send_line); end
def previous_line_ignoring_comments(processed_source, send_line); end
+ def register_offense?(node); end
end
RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER = T.let(T.unsafe(nil), String)
@@ -2188,8 +2198,8 @@ module RuboCop::Cop::Layout::EmptyLinesAroundBody
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::AST::NodePattern::Macros)
- def constant_definition?(node = T.unsafe(nil)); end
- def empty_line_required?(node = T.unsafe(nil)); end
+ def constant_definition?(param0 = T.unsafe(nil)); end
+ def empty_line_required?(param0 = T.unsafe(nil)); end
private
@@ -2359,7 +2369,7 @@ class RuboCop::Cop::Layout::FirstArgumentIndentation < ::RuboCop::Cop::Cop
include(::RuboCop::Cop::RangeHelp)
def autocorrect(node); end
- def eligible_method_call?(node = T.unsafe(nil)); end
+ def eligible_method_call?(param0 = T.unsafe(nil)); end
def on_csend(node); end
def on_send(node); end
@@ -2636,7 +2646,7 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Cop
include(::RuboCop::Cop::CheckAssignment)
include(::RuboCop::Cop::IgnoredPattern)
- def access_modifier?(node = T.unsafe(nil)); end
+ def access_modifier?(param0 = T.unsafe(nil)); end
def autocorrect(node); end
def on_block(node); end
def on_case(case_node); end
@@ -3435,7 +3445,6 @@ class RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces < ::RuboCop::Cop::Base
def autocorrect(corrector, range); end
def check(token1, token2); end
def expect_space?(token1, token2); end
- def hash_literal_with_braces(node); end
def incorrect_style_detected(token1, token2, expect_space, is_empty_braces); end
def message(brace, is_empty_braces, expect_space); end
def offense?(token1, expect_space); end
@@ -3598,7 +3607,6 @@ class RuboCop::Cop::LineBreakCorrector
extend(::RuboCop::Cop::Alignment)
extend(::RuboCop::Cop::TrailingBody)
extend(::RuboCop::PathUtil)
- extend(::RuboCop::TokensUtil)
extend(::RuboCop::Cop::Util)
class << self
@@ -3703,7 +3711,7 @@ RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITH_SAFE_ASSIGNMENT_ALLOWED = T.
class RuboCop::Cop::Lint::BigDecimalNew < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def big_decimal_new(node = T.unsafe(nil)); end
+ def big_decimal_new(param0 = T.unsafe(nil)); end
def on_send(node); end
end
@@ -3724,7 +3732,7 @@ RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(ni
class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def boolean_symbol?(node = T.unsafe(nil)); end
+ def boolean_symbol?(param0 = T.unsafe(nil)); end
def on_sym(node); end
private
@@ -3746,8 +3754,8 @@ end
RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::ConstantDefinitionInBlock < ::RuboCop::Cop::Base
- def constant_assigned_in_block?(node = T.unsafe(nil)); end
- def module_defined_in_block?(node = T.unsafe(nil)); end
+ def constant_assigned_in_block?(param0 = T.unsafe(nil)); end
+ def module_defined_in_block?(param0 = T.unsafe(nil)); end
def on_casgn(node); end
def on_class(node); end
def on_module(node); end
@@ -3757,7 +3765,7 @@ RuboCop::Cop::Lint::ConstantDefinitionInBlock::MSG = T.let(T.unsafe(nil), String
class RuboCop::Cop::Lint::ConstantResolution < ::RuboCop::Cop::Base
def on_const(node); end
- def unqualified_const?(node = T.unsafe(nil)); end
+ def unqualified_const?(param0 = T.unsafe(nil)); end
private
@@ -3769,9 +3777,9 @@ end
RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base
- def binding_irb_call?(node = T.unsafe(nil)); end
- def debugger_call?(node = T.unsafe(nil)); end
- def kernel?(node = T.unsafe(nil)); end
+ def binding_irb_call?(param0 = T.unsafe(nil)); end
+ def debugger_call?(param0 = T.unsafe(nil)); end
+ def kernel?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -3818,7 +3826,7 @@ class RuboCop::Cop::Lint::DeprecatedOpenSSLConstant < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::Cop::AutoCorrector)
- def algorithm_const(node = T.unsafe(nil)); end
+ def algorithm_const(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -3877,13 +3885,13 @@ RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base
def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end
- def alias_method?(node = T.unsafe(nil)); end
- def method_alias?(node = T.unsafe(nil)); end
+ def alias_method?(param0 = T.unsafe(nil)); end
+ def method_alias?(param0 = T.unsafe(nil)); end
def on_alias(node); end
def on_def(node); end
def on_defs(node); end
def on_send(node); end
- def sym_name(node = T.unsafe(nil)); end
+ def sym_name(param0 = T.unsafe(nil)); end
private
@@ -3907,7 +3915,7 @@ RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar
class RuboCop::Cop::Lint::DuplicateRequire < ::RuboCop::Cop::Base
def on_new_investigation; end
def on_send(node); end
- def require_call?(node = T.unsafe(nil)); end
+ def require_call?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Lint::DuplicateRequire::MSG = T.let(T.unsafe(nil), String)
@@ -3925,7 +3933,7 @@ end
RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base
- def each_with_object?(node = T.unsafe(nil)); end
+ def each_with_object?(param0 = T.unsafe(nil)); end
def on_csend(node); end
def on_send(node); end
end
@@ -4012,7 +4020,7 @@ class RuboCop::Cop::Lint::ErbNewArguments < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::TargetRubyVersion)
extend(::RuboCop::Cop::AutoCorrector)
- def erb_new_with_non_keyword_arguments(node = T.unsafe(nil)); end
+ def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -4062,7 +4070,7 @@ end
RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base
- def called_on_string?(node = T.unsafe(nil)); end
+ def called_on_string?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -4163,7 +4171,7 @@ RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), Stri
class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base
def on_class(node); end
def on_module(node); end
- def private_class_methods(node0); end
+ def private_class_methods(param0); end
private
@@ -4185,7 +4193,7 @@ class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
extend(::RuboCop::Cop::AutoCorrector)
- def class_new_call?(node = T.unsafe(nil)); end
+ def class_new_call?(param0 = T.unsafe(nil)); end
def on_class(node); end
def on_send(node); end
@@ -4331,7 +4339,7 @@ RuboCop::Cop::Lint::MixedRegexpCaptureTypes::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::MultipleComparison < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def multiple_compare?(node = T.unsafe(nil)); end
+ def multiple_compare?(param0 = T.unsafe(nil)); end
def on_send(node); end
end
@@ -4342,9 +4350,9 @@ RuboCop::Cop::Lint::MultipleComparison::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Lint::MultipleComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base
- def class_or_module_or_struct_new_call?(node = T.unsafe(nil)); end
- def eval_call?(node = T.unsafe(nil)); end
- def exec_call?(node = T.unsafe(nil)); end
+ def class_or_module_or_struct_new_call?(param0 = T.unsafe(nil)); end
+ def eval_call?(param0 = T.unsafe(nil)); end
+ def exec_call?(param0 = T.unsafe(nil)); end
def on_def(node); end
def on_defs(node); end
@@ -4375,7 +4383,7 @@ RuboCop::Cop::Lint::NestedPercentLiteral::REGEXES = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base
def on_block(node); end
- def on_body_of_reduce(node = T.unsafe(nil)); end
+ def on_body_of_reduce(param0 = T.unsafe(nil)); end
private
@@ -4387,15 +4395,15 @@ RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def loop_variable(node = T.unsafe(nil)); end
- def method_require?(node = T.unsafe(nil)); end
+ def loop_variable(param0 = T.unsafe(nil)); end
+ def method_require?(param0 = T.unsafe(nil)); end
def on_block(node); end
def on_block_pass(node); end
- def unsorted_dir_block?(node = T.unsafe(nil)); end
- def unsorted_dir_each?(node = T.unsafe(nil)); end
- def unsorted_dir_each_pass?(node = T.unsafe(nil)); end
- def unsorted_dir_glob_pass?(node = T.unsafe(nil)); end
- def var_is_required?(node0, param1); end
+ def unsorted_dir_block?(param0 = T.unsafe(nil)); end
+ def unsorted_dir_each?(param0 = T.unsafe(nil)); end
+ def unsorted_dir_each_pass?(param0 = T.unsafe(nil)); end
+ def unsorted_dir_glob_pass?(param0 = T.unsafe(nil)); end
+ def var_is_required?(param0, param1); end
private
@@ -4409,8 +4417,8 @@ end
RuboCop::Cop::Lint::NonDeterministicRequireOrder::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::NonLocalExitFromIterator < ::RuboCop::Cop::Base
- def chained_send?(node = T.unsafe(nil)); end
- def define_method?(node = T.unsafe(nil)); end
+ def chained_send?(param0 = T.unsafe(nil)); end
+ def define_method?(param0 = T.unsafe(nil)); end
def on_return(return_node); end
private
@@ -4424,9 +4432,9 @@ RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def datetime?(node = T.unsafe(nil)); end
+ def datetime?(param0 = T.unsafe(nil)); end
def on_send(node); end
- def to_method(node = T.unsafe(nil)); end
+ def to_method(param0 = T.unsafe(nil)); end
private
@@ -4537,8 +4545,8 @@ RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::RaiseException < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def exception?(node = T.unsafe(nil)); end
- def exception_new_with_message?(node = T.unsafe(nil)); end
+ def exception?(param0 = T.unsafe(nil)); end
+ def exception_new_with_message?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -4554,7 +4562,7 @@ RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra
class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base
def on_send(node); end
- def rand_one?(node = T.unsafe(nil)); end
+ def rand_one?(param0 = T.unsafe(nil)); end
private
@@ -4594,6 +4602,7 @@ class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base
def find_redundant(comment, offenses, cop, line_range, next_line_range); end
def ignore_offense?(disabled_ranges, line_range); end
def matching_range(haystack, needle); end
+ def previous_line_blank?(range); end
def trailing_range?(ranges, range); end
end
@@ -4614,6 +4623,7 @@ class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base
def range_of_offense(comment, name); end
def range_to_remove(begin_pos, end_pos, comma_pos, comment); end
def range_with_comma(comment, name); end
+ def register_offense(comment, cop_names); end
end
RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String)
@@ -4623,7 +4633,7 @@ class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_send(node); end
- def unnecessary_require_statement?(node = T.unsafe(nil)); end
+ def unnecessary_require_statement?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String)
@@ -4633,8 +4643,8 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe
class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def array_new?(node = T.unsafe(nil)); end
- def literal_expansion(node = T.unsafe(nil)); end
+ def array_new?(param0 = T.unsafe(nil)); end
+ def literal_expansion(param0 = T.unsafe(nil)); end
def on_splat(node); end
private
@@ -4669,7 +4679,7 @@ class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_interpolation(begin_node); end
- def to_s_without_args?(node = T.unsafe(nil)); end
+ def to_s_without_args?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String)
@@ -4681,7 +4691,7 @@ class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_block(node); end
- def redundant_with_index?(node = T.unsafe(nil)); end
+ def redundant_with_index?(param0 = T.unsafe(nil)); end
private
@@ -4698,7 +4708,7 @@ class RuboCop::Cop::Lint::RedundantWithObject < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_block(node); end
- def redundant_with_object?(node = T.unsafe(nil)); end
+ def redundant_with_object?(param0 = T.unsafe(nil)); end
private
@@ -4740,7 +4750,6 @@ end
RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RescueNode)
extend(::RuboCop::Cop::AutoCorrector)
def autocorrect(corrector, node); end
@@ -4774,7 +4783,7 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base
include(::RuboCop::Cop::AllowedMethods)
include(::RuboCop::Cop::NilMethods)
- def bad_method?(node = T.unsafe(nil)); end
+ def bad_method?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -4806,7 +4815,7 @@ class RuboCop::Cop::Lint::SafeNavigationWithEmpty < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_if(node); end
- def safe_navigation_empty_in_conditional?(node = T.unsafe(nil)); end
+ def safe_navigation_empty_in_conditional?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Lint::SafeNavigationWithEmpty::MSG = T.let(T.unsafe(nil), String)
@@ -4852,7 +4861,7 @@ class RuboCop::Cop::Lint::SendWithMixinArgument < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_send(node); end
- def send_with_mixin_argument?(node = T.unsafe(nil)); end
+ def send_with_mixin_argument?(param0 = T.unsafe(nil)); end
private
@@ -4871,7 +4880,7 @@ RuboCop::Cop::Lint::SendWithMixinArgument::SEND_METHODS = T.let(T.unsafe(nil), A
class RuboCop::Cop::Lint::ShadowedArgument < ::RuboCop::Cop::Base
def after_leaving_scope(scope, _variable_table); end
- def uses_var?(node0, param1); end
+ def uses_var?(param0, param1); end
private
@@ -4900,7 +4909,7 @@ class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base
def compare_exceptions(exception, other_exception); end
def contains_multiple_levels_of_exceptions?(group); end
- def evaluate_exceptions(rescue_group); end
+ def evaluate_exceptions(group); end
def find_shadowing_rescue(rescues); end
def offense_range(rescues); end
def rescued_exceptions(rescue_group); end
@@ -4924,7 +4933,7 @@ RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), Stri
class RuboCop::Cop::Lint::StructNewOverride < ::RuboCop::Cop::Base
def on_send(node); end
- def struct_new(node = T.unsafe(nil)); end
+ def struct_new(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Lint::StructNewOverride::MSG = T.let(T.unsafe(nil), String)
@@ -5004,14 +5013,14 @@ RuboCop::Cop::Lint::UnderscorePrefixedVariableName::MSG = T.let(T.unsafe(nil), S
class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def fixnum_or_bignum_const(node = T.unsafe(nil)); end
+ def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end
def on_const(node); end
end
RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base
- def flow_command?(node = T.unsafe(nil)); end
+ def flow_command?(param0 = T.unsafe(nil)); end
def on_begin(node); end
def on_kwbegin(node); end
@@ -5025,7 +5034,7 @@ end
RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base
- def break_command?(node = T.unsafe(nil)); end
+ def break_command?(param0 = T.unsafe(nil)); end
def on_block(node); end
def on_for(node); end
def on_until(node); end
@@ -5039,7 +5048,6 @@ class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base
def check(node); end
def check_case(node); end
def check_if(node); end
- def left_siblings_of(node); end
def loop_method?(node); end
def preceded_by_continue_statement?(break_statement); end
def statements(node); end
@@ -5088,7 +5096,7 @@ class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base
include(::RuboCop::Cop::Lint::UnusedArgument)
extend(::RuboCop::Cop::AutoCorrector)
- def not_implemented?(node = T.unsafe(nil)); end
+ def not_implemented?(param0 = T.unsafe(nil)); end
private
@@ -5104,7 +5112,7 @@ end
class RuboCop::Cop::Lint::UriEscapeUnescape < ::RuboCop::Cop::Base
def on_send(node); end
- def uri_escape_unescape?(node = T.unsafe(nil)); end
+ def uri_escape_unescape?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_ESCAPE = T.let(T.unsafe(nil), Array)
@@ -5133,14 +5141,14 @@ class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::Cop::AutoCorrector)
- def class_or_instance_eval?(node = T.unsafe(nil)); end
- def class_or_module_or_struct_new_call?(node = T.unsafe(nil)); end
- def dynamic_method_definition?(node = T.unsafe(nil)); end
+ def class_or_instance_eval?(param0 = T.unsafe(nil)); end
+ def class_or_module_or_struct_new_call?(param0 = T.unsafe(nil)); end
+ def dynamic_method_definition?(param0 = T.unsafe(nil)); end
def on_block(node); end
def on_class(node); end
def on_module(node); end
def on_sclass(node); end
- def static_method_definition?(node = T.unsafe(nil)); end
+ def static_method_definition?(param0 = T.unsafe(nil)); end
private
@@ -5202,7 +5210,7 @@ RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base
def on_def(node); end
def on_defs(node); end
- def setter_call_to_local_variable?(node = T.unsafe(nil)); end
+ def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end
private
@@ -5230,16 +5238,17 @@ class RuboCop::Cop::Lint::UselessTimes < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::Cop::AutoCorrector)
- def block_arg(node = T.unsafe(nil)); end
- def block_reassigns_arg?(node0, param1); end
+ def block_arg(param0 = T.unsafe(nil)); end
+ def block_reassigns_arg?(param0, param1); end
def on_send(node); end
- def times_call?(node = T.unsafe(nil)); end
+ def times_call?(param0 = T.unsafe(nil)); end
private
def autocorrect_block(corrector, node); end
def autocorrect_block_pass(corrector, node, proc_name); end
def fix_indentation(source, range); end
+ def never_process?(count, node); end
def own_line?(node); end
def remove_node(corrector, node); end
end
@@ -5330,7 +5339,7 @@ module RuboCop::Cop::MethodComplexity
include(::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount)
extend(::RuboCop::AST::NodePattern::Macros)
- def define_method?(node = T.unsafe(nil)); end
+ def define_method?(param0 = T.unsafe(nil)); end
def on_block(node); end
def on_def(node); end
def on_defs(node); end
@@ -5401,7 +5410,7 @@ class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableMax)
include(::RuboCop::Cop::CodeLength)
- def class_definition?(node = T.unsafe(nil)); end
+ def class_definition?(param0 = T.unsafe(nil)); end
def on_casgn(node); end
def on_class(node); end
@@ -5448,7 +5457,7 @@ class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableMax)
include(::RuboCop::Cop::CodeLength)
- def module_definition?(node = T.unsafe(nil)); end
+ def module_definition?(param0 = T.unsafe(nil)); end
def on_casgn(node); end
def on_module(node); end
@@ -5460,7 +5469,7 @@ end
class RuboCop::Cop::Metrics::ParameterLists < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableMax)
- def argument_to_lambda_or_proc?(node = T.unsafe(nil)); end
+ def argument_to_lambda_or_proc?(param0 = T.unsafe(nil)); end
def on_args(node); end
private
@@ -5501,9 +5510,9 @@ class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator
def argument?(node); end
def assignment?(node); end
- def assignment_doubled_in_ast?(node); end
def branch?(node); end
def capturing_variable?(name); end
+ def compound_assignment(node); end
def condition?(node); end
def simple_assignment?(node); end
@@ -5514,7 +5523,6 @@ end
class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator
include(::RuboCop::PathUtil)
- include(::RuboCop::TokensUtil)
include(::RuboCop::Cop::Util)
extend(::RuboCop::AST::NodePattern::Macros)
@@ -5732,7 +5740,7 @@ RuboCop::Cop::Naming::AsciiIdentifiers::IDENTIFIER_MSG = T.let(T.unsafe(nil), St
class RuboCop::Cop::Naming::BinaryOperatorParameterName < ::RuboCop::Cop::Base
def on_def(node); end
- def op_method_candidate?(node = T.unsafe(nil)); end
+ def op_method_candidate?(param0 = T.unsafe(nil)); end
private
@@ -5759,8 +5767,8 @@ end
RuboCop::Cop::Naming::ClassAndModuleCamelCase::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base
- def class_or_struct_return_method?(node = T.unsafe(nil)); end
- def literal_receiver?(node = T.unsafe(nil)); end
+ def class_or_struct_return_method?(param0 = T.unsafe(nil)); end
+ def literal_receiver?(param0 = T.unsafe(nil)); end
def on_casgn(node); end
private
@@ -5843,7 +5851,7 @@ RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- def memoized?(node = T.unsafe(nil)); end
+ def memoized?(param0 = T.unsafe(nil)); end
def on_def(node); end
def on_defs(node); end
@@ -5877,8 +5885,8 @@ class RuboCop::Cop::Naming::MethodName < ::RuboCop::Cop::Base
def on_def(node); end
def on_defs(node); end
def on_send(node); end
- def str_name(node = T.unsafe(nil)); end
- def sym_name(node = T.unsafe(nil)); end
+ def str_name(param0 = T.unsafe(nil)); end
+ def sym_name(param0 = T.unsafe(nil)); end
private
@@ -5899,7 +5907,7 @@ end
class RuboCop::Cop::Naming::PredicateName < ::RuboCop::Cop::Base
include(::RuboCop::Cop::AllowedMethods)
- def dynamic_method_define(node = T.unsafe(nil)); end
+ def dynamic_method_define(param0 = T.unsafe(nil)); end
def on_def(node); end
def on_defs(node); end
def on_send(node); end
@@ -5973,8 +5981,8 @@ RuboCop::Cop::Naming::VariableNumber::MSG = T.let(T.unsafe(nil), String)
module RuboCop::Cop::NegativeConditional
extend(::RuboCop::AST::NodePattern::Macros)
- def empty_condition?(node = T.unsafe(nil)); end
- def single_negative?(node = T.unsafe(nil)); end
+ def empty_condition?(param0 = T.unsafe(nil)); end
+ def single_negative?(param0 = T.unsafe(nil)); end
private
@@ -6107,7 +6115,6 @@ end
class RuboCop::Cop::PercentLiteralCorrector
include(::RuboCop::PathUtil)
- include(::RuboCop::TokensUtil)
include(::RuboCop::Cop::Util)
def initialize(config, preferred_delimiters); end
@@ -6206,7 +6213,7 @@ RuboCop::Cop::RangeHelp::BYTE_ORDER_MARK = T.let(T.unsafe(nil), Integer)
module RuboCop::Cop::RationalLiteral
extend(::RuboCop::AST::NodePattern::Macros)
- def rational_literal?(node = T.unsafe(nil)); end
+ def rational_literal?(param0 = T.unsafe(nil)); end
end
module RuboCop::Cop::RegexpLiteralHelp
@@ -6277,9 +6284,9 @@ end
module RuboCop::Cop::SafeAssignment
extend(::RuboCop::AST::NodePattern::Macros)
- def empty_condition?(node = T.unsafe(nil)); end
- def safe_assignment?(node = T.unsafe(nil)); end
- def setter_method?(node = T.unsafe(nil)); end
+ def empty_condition?(param0 = T.unsafe(nil)); end
+ def safe_assignment?(param0 = T.unsafe(nil)); end
+ def setter_method?(param0 = T.unsafe(nil)); end
private
@@ -6290,7 +6297,7 @@ module RuboCop::Cop::Security
end
class RuboCop::Cop::Security::Eval < ::RuboCop::Cop::Base
- def eval?(node = T.unsafe(nil)); end
+ def eval?(param0 = T.unsafe(nil)); end
def on_send(node); end
end
@@ -6301,7 +6308,7 @@ RuboCop::Cop::Security::Eval::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Security::JSONLoad < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def json_load(node = T.unsafe(nil)); end
+ def json_load(param0 = T.unsafe(nil)); end
def on_send(node); end
end
@@ -6310,7 +6317,7 @@ RuboCop::Cop::Security::JSONLoad::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Security::JSONLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Security::MarshalLoad < ::RuboCop::Cop::Base
- def marshal_load(node = T.unsafe(nil)); end
+ def marshal_load(param0 = T.unsafe(nil)); end
def on_send(node); end
end
@@ -6320,7 +6327,7 @@ RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr
class RuboCop::Cop::Security::Open < ::RuboCop::Cop::Base
def on_send(node); end
- def open?(node = T.unsafe(nil)); end
+ def open?(param0 = T.unsafe(nil)); end
private
@@ -6340,7 +6347,7 @@ class RuboCop::Cop::Security::YAMLLoad < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_send(node); end
- def yaml_load(node = T.unsafe(nil)); end
+ def yaml_load(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Security::YAMLLoad::MSG = T.let(T.unsafe(nil), String)
@@ -6417,6 +6424,7 @@ module RuboCop::Cop::StatementModifier
private
+ def comment_disables_cop?(comment); end
def first_line_comment(node); end
def length_in_modifier_form(node); end
def max_line_length; end
@@ -6440,7 +6448,6 @@ end
class RuboCop::Cop::StringLiteralCorrector
extend(::RuboCop::PathUtil)
- extend(::RuboCop::TokensUtil)
extend(::RuboCop::Cop::Util)
class << self
@@ -6463,7 +6470,7 @@ end
class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- def access_modifier_with_symbol?(node = T.unsafe(nil)); end
+ def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -6518,7 +6525,7 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
extend(::RuboCop::Cop::AutoCorrector)
- def identifier(node = T.unsafe(nil)); end
+ def identifier(param0 = T.unsafe(nil)); end
def on_alias(node); end
def on_send(node); end
@@ -6586,10 +6593,10 @@ end
class RuboCop::Cop::Style::ArrayCoercion < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def array_splat?(node = T.unsafe(nil)); end
+ def array_splat?(param0 = T.unsafe(nil)); end
def on_array(node); end
def on_if(node); end
- def unless_array?(node = T.unsafe(nil)); end
+ def unless_array?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Style::ArrayCoercion::CHECK_MSG = T.let(T.unsafe(nil), String)
@@ -6599,7 +6606,7 @@ RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::ArrayJoin < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def join_candidate?(node = T.unsafe(nil)); end
+ def join_candidate?(param0 = T.unsafe(nil)); end
def on_send(node); end
end
@@ -6626,7 +6633,7 @@ class RuboCop::Cop::Style::Attr < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::Cop::AutoCorrector)
- def class_eval?(node = T.unsafe(nil)); end
+ def class_eval?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -6783,7 +6790,7 @@ end
class RuboCop::Cop::Style::CaseEquality < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def case_equality?(node = T.unsafe(nil)); end
+ def case_equality?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -6946,7 +6953,7 @@ RuboCop::Cop::Style::CollectionMethods::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::ColonMethodCall < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def java_type_node?(node = T.unsafe(nil)); end
+ def java_type_node?(param0 = T.unsafe(nil)); end
def on_send(node); end
class << self
@@ -6971,7 +6978,6 @@ class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base
private
def collection_looping_method?(node); end
- def left_sibling_of(node); end
def same_collection_looping?(node, sibling); end
end
@@ -7026,13 +7032,12 @@ RuboCop::Cop::Style::CommentAnnotation::MISSING_NOTE = T.let(T.unsafe(nil), Stri
RuboCop::Cop::Style::CommentAnnotation::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Cop
- def investigate(processed_source); end
+class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base
+ def on_new_investigation; end
private
def line(comment); end
- def message(comment); end
def offensive?(comment); end
end
@@ -7051,8 +7056,8 @@ class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
extend(::RuboCop::Cop::AutoCorrector)
- def assignment_type?(node = T.unsafe(nil)); end
- def candidate_condition?(node = T.unsafe(nil)); end
+ def assignment_type?(param0 = T.unsafe(nil)); end
+ def candidate_condition?(param0 = T.unsafe(nil)); end
def on_and_asgn(node); end
def on_case(node); end
def on_casgn(node); end
@@ -7149,7 +7154,7 @@ end
class RuboCop::Cop::Style::ConstantVisibility < ::RuboCop::Cop::Base
def on_casgn(node); end
- def visibility_declaration_for?(node = T.unsafe(nil), param1); end
+ def visibility_declaration_for?(param0 = T.unsafe(nil), param1); end
private
@@ -7184,13 +7189,16 @@ RuboCop::Cop::Style::Copyright::AUTOCORRECT_EMPTY_WARNING = T.let(T.unsafe(nil),
RuboCop::Cop::Style::Copyright::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::DateTime < ::RuboCop::Cop::Base
- def date_time?(node = T.unsafe(nil)); end
- def historic_date?(node = T.unsafe(nil)); end
+ extend(::RuboCop::Cop::AutoCorrector)
+
+ def date_time?(param0 = T.unsafe(nil)); end
+ def historic_date?(param0 = T.unsafe(nil)); end
def on_send(node); end
- def to_datetime?(node = T.unsafe(nil)); end
+ def to_datetime?(param0 = T.unsafe(nil)); end
private
+ def autocorrect(corrector, node); end
def disallow_coercion?; end
end
@@ -7210,7 +7218,7 @@ RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::Dir < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def dir_replacement?(node = T.unsafe(nil)); end
+ def dir_replacement?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -7238,11 +7246,11 @@ class RuboCop::Cop::Style::Documentation < ::RuboCop::Cop::Base
include(::RuboCop::Cop::Style::AnnotationComment)
include(::RuboCop::Cop::DocumentationComment)
- def constant_definition?(node = T.unsafe(nil)); end
- def constant_visibility_declaration?(node = T.unsafe(nil)); end
+ def constant_definition?(param0 = T.unsafe(nil)); end
+ def constant_visibility_declaration?(param0 = T.unsafe(nil)); end
def on_class(node); end
def on_module(node); end
- def outer_module(node0); end
+ def outer_module(param0); end
private
@@ -7262,7 +7270,7 @@ class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base
include(::RuboCop::Cop::DocumentationComment)
include(::RuboCop::Cop::DefNode)
- def module_function_node?(node = T.unsafe(nil)); end
+ def module_function_node?(param0 = T.unsafe(nil)); end
def on_def(node); end
def on_defs(node); end
@@ -7285,7 +7293,7 @@ RuboCop::Cop::Style::DoubleCopDisableDirective::MSG = T.let(T.unsafe(nil), Strin
class RuboCop::Cop::Style::DoubleNegation < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- def double_negative?(node = T.unsafe(nil)); end
+ def double_negative?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -7302,7 +7310,7 @@ RuboCop::Cop::Style::DoubleNegation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr
class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def offending_each_range(node = T.unsafe(nil)); end
+ def offending_each_range(param0 = T.unsafe(nil)); end
def on_block(node); end
end
@@ -7312,7 +7320,7 @@ class RuboCop::Cop::Style::EachWithObject < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::Cop::AutoCorrector)
- def each_with_object_candidate?(node = T.unsafe(nil)); end
+ def each_with_object_candidate?(param0 = T.unsafe(nil)); end
def on_block(node); end
private
@@ -7404,12 +7412,12 @@ class RuboCop::Cop::Style::EmptyLiteral < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::Cop::AutoCorrector)
- def array_node(node = T.unsafe(nil)); end
- def array_with_block(node = T.unsafe(nil)); end
- def hash_node(node = T.unsafe(nil)); end
- def hash_with_block(node = T.unsafe(nil)); end
+ def array_node(param0 = T.unsafe(nil)); end
+ def array_with_block(param0 = T.unsafe(nil)); end
+ def hash_node(param0 = T.unsafe(nil)); end
+ def hash_with_block(param0 = T.unsafe(nil)); end
def on_send(node); end
- def str_node(node = T.unsafe(nil)); end
+ def str_node(param0 = T.unsafe(nil)); end
private
@@ -7483,8 +7491,8 @@ end
RuboCop::Cop::Style::EndBlock::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base
- def eval_without_location?(node = T.unsafe(nil)); end
- def line_with_offset?(node = T.unsafe(nil), param1, param2); end
+ def eval_without_location?(param0 = T.unsafe(nil)); end
+ def line_with_offset?(param0 = T.unsafe(nil), param1, param2); end
def on_send(node); end
private
@@ -7508,7 +7516,7 @@ RuboCop::Cop::Style::EvalWithLocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A
class RuboCop::Cop::Style::EvenOdd < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def even_odd_candidate?(node = T.unsafe(nil)); end
+ def even_odd_candidate?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -7524,10 +7532,10 @@ class RuboCop::Cop::Style::ExpandPathArguments < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::Cop::AutoCorrector)
- def file_expand_path(node = T.unsafe(nil)); end
+ def file_expand_path(param0 = T.unsafe(nil)); end
def on_send(node); end
- def pathname_new_parent_expand_path(node = T.unsafe(nil)); end
- def pathname_parent_expand_path(node = T.unsafe(nil)); end
+ def pathname_new_parent_expand_path(param0 = T.unsafe(nil)); end
+ def pathname_parent_expand_path(param0 = T.unsafe(nil)); end
private
@@ -7557,7 +7565,7 @@ class RuboCop::Cop::Style::ExplicitBlockArgument < ::RuboCop::Cop::Base
def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end
def on_yield(node); end
- def yielding_block?(node = T.unsafe(nil)); end
+ def yielding_block?(param0 = T.unsafe(nil)); end
private
@@ -7587,11 +7595,11 @@ RuboCop::Cop::Style::ExponentialNotation::MESSAGES = T.let(T.unsafe(nil), Hash)
class RuboCop::Cop::Style::FloatDivision < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- def any_coerce?(node = T.unsafe(nil)); end
- def both_coerce?(node = T.unsafe(nil)); end
- def left_coerce?(node = T.unsafe(nil)); end
+ def any_coerce?(param0 = T.unsafe(nil)); end
+ def both_coerce?(param0 = T.unsafe(nil)); end
+ def left_coerce?(param0 = T.unsafe(nil)); end
def on_send(node); end
- def right_coerce?(node = T.unsafe(nil)); end
+ def right_coerce?(param0 = T.unsafe(nil)); end
private
@@ -7626,9 +7634,9 @@ class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
extend(::RuboCop::Cop::AutoCorrector)
- def formatter(node = T.unsafe(nil)); end
+ def formatter(param0 = T.unsafe(nil)); end
def on_send(node); end
- def variable_argument?(node = T.unsafe(nil)); end
+ def variable_argument?(param0 = T.unsafe(nil)); end
private
@@ -7646,7 +7654,7 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array
class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- def format_string_in_typical_context?(node = T.unsafe(nil)); end
+ def format_string_in_typical_context?(param0 = T.unsafe(nil)); end
def on_str(node); end
private
@@ -7699,7 +7707,7 @@ RuboCop::Cop::Style::FrozenStringLiteralComment::SHEBANG = T.let(T.unsafe(nil),
class RuboCop::Cop::Style::GlobalStdStream < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def const_to_gvar_assignment?(node = T.unsafe(nil), param1); end
+ def const_to_gvar_assignment?(param0 = T.unsafe(nil), param1); end
def on_const(node); end
private
@@ -7757,14 +7765,16 @@ class RuboCop::Cop::Style::HashAsLastArrayItem < ::RuboCop::Cop::Base
def braces_style?; end
def check_braces(node); end
def check_no_braces(node); end
- def last_array_item?(node); end
+ def containing_array(hash_node); end
+ def explicit_array?(array); end
+ def last_array_item?(array, node); end
end
class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base
include(::RuboCop::Cop::Lint::UnusedArgument)
extend(::RuboCop::Cop::AutoCorrector)
- def kv_each(node = T.unsafe(nil)); end
+ def kv_each(param0 = T.unsafe(nil)); end
def on_block(node); end
private
@@ -7781,7 +7791,7 @@ end
RuboCop::Cop::Style::HashEachMethods::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::HashLikeCase < ::RuboCop::Cop::Base
- def hash_like_case?(node = T.unsafe(nil)); end
+ def hash_like_case?(param0 = T.unsafe(nil)); end
def on_case(node); end
private
@@ -7829,10 +7839,10 @@ class RuboCop::Cop::Style::HashTransformKeys < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::TargetRubyVersion)
extend(::RuboCop::Cop::AutoCorrector)
- def on_bad_each_with_object(node = T.unsafe(nil)); end
- def on_bad_hash_brackets_map(node = T.unsafe(nil)); end
- def on_bad_map_to_h(node = T.unsafe(nil)); end
- def on_bad_to_h(node = T.unsafe(nil)); end
+ def on_bad_each_with_object(param0 = T.unsafe(nil)); end
+ def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end
+ def on_bad_map_to_h(param0 = T.unsafe(nil)); end
+ def on_bad_to_h(param0 = T.unsafe(nil)); end
private
@@ -7844,10 +7854,10 @@ class RuboCop::Cop::Style::HashTransformValues < ::RuboCop::Cop::Base
include(::RuboCop::Cop::HashTransformMethod)
extend(::RuboCop::Cop::AutoCorrector)
- def on_bad_each_with_object(node = T.unsafe(nil)); end
- def on_bad_hash_brackets_map(node = T.unsafe(nil)); end
- def on_bad_map_to_h(node = T.unsafe(nil)); end
- def on_bad_to_h(node = T.unsafe(nil)); end
+ def on_bad_each_with_object(param0 = T.unsafe(nil)); end
+ def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end
+ def on_bad_map_to_h(param0 = T.unsafe(nil)); end
+ def on_bad_to_h(param0 = T.unsafe(nil)); end
private
@@ -7909,7 +7919,6 @@ class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base
def another_statement_on_same_line?(node); end
def autocorrect(corrector, node); end
- def first_line_comment(node); end
def ignored_patterns; end
def line_length_enabled_at_line?(line); end
def named_capture_in_condition?(node); end
@@ -7951,7 +7960,7 @@ end
RuboCop::Cop::Style::IfWithSemicolon::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::ImplicitRuntimeError < ::RuboCop::Cop::Base
- def implicit_runtime_error_raise_or_fail(node = T.unsafe(nil)); end
+ def implicit_runtime_error_raise_or_fail(param0 = T.unsafe(nil)); end
def on_send(node); end
end
@@ -8000,8 +8009,8 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::Cop::AutoCorrector)
- def inverse_block?(node = T.unsafe(nil)); end
- def inverse_candidate?(node = T.unsafe(nil)); end
+ def inverse_block?(param0 = T.unsafe(nil)); end
+ def inverse_candidate?(param0 = T.unsafe(nil)); end
def on_block(node); end
def on_send(node); end
@@ -8064,7 +8073,6 @@ class RuboCop::Cop::Style::KeywordParametersOrder < ::RuboCop::Cop::Base
private
def remove_kwargs(kwarg_nodes, corrector); end
- def right_siblings_of(node); end
end
RuboCop::Cop::Style::KeywordParametersOrder::MSG = T.let(T.unsafe(nil), String)
@@ -8265,7 +8273,7 @@ RuboCop::Cop::Style::MethodDefParentheses::MSG_PRESENT = T.let(T.unsafe(nil), St
class RuboCop::Cop::Style::MinMax < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def min_max_candidate(node = T.unsafe(nil)); end
+ def min_max_candidate(param0 = T.unsafe(nil)); end
def on_array(node); end
def on_return(node); end
@@ -8341,15 +8349,9 @@ RuboCop::Cop::Style::MixinGrouping::MIXIN_METHODS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Style::MixinGrouping::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::MixinUsage < ::RuboCop::Cop::Base
- def include_statement(node = T.unsafe(nil)); end
+ def in_top_level_scope?(param0 = T.unsafe(nil)); end
+ def include_statement(param0 = T.unsafe(nil)); end
def on_send(node); end
- def wrapped_macro_scope?(node = T.unsafe(nil)); end
-
- private
-
- def accepted_include?(node); end
- def ascend_macro_scope?(ancestor); end
- def belongs_to_class_or_module?(node); end
end
RuboCop::Cop::Style::MixinUsage::MSG = T.let(T.unsafe(nil), String)
@@ -8360,10 +8362,10 @@ class RuboCop::Cop::Style::ModuleFunction < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
extend(::RuboCop::Cop::AutoCorrector)
- def extend_self_node?(node = T.unsafe(nil)); end
- def module_function_node?(node = T.unsafe(nil)); end
+ def extend_self_node?(param0 = T.unsafe(nil)); end
+ def module_function_node?(param0 = T.unsafe(nil)); end
def on_module(node); end
- def private_directive?(node = T.unsafe(nil)); end
+ def private_directive?(param0 = T.unsafe(nil)); end
private
@@ -8380,7 +8382,7 @@ RuboCop::Cop::Style::ModuleFunction::FORBIDDEN_MSG = T.let(T.unsafe(nil), String
RuboCop::Cop::Style::ModuleFunction::MODULE_FUNCTION_MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Style::MultilineBlockChain < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Style::MultilineBlockChain < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
def on_block(node); end
@@ -8484,8 +8486,8 @@ RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base
def on_or(node); end
- def simple_comparison?(node = T.unsafe(nil)); end
- def simple_double_comparison?(node = T.unsafe(nil)); end
+ def simple_comparison?(param0 = T.unsafe(nil)); end
+ def simple_double_comparison?(param0 = T.unsafe(nil)); end
private
@@ -8507,9 +8509,9 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base
def on_casgn(node); end
def on_or_asgn(node); end
- def operation_produces_immutable_object?(node = T.unsafe(nil)); end
- def range_enclosed_in_parentheses?(node = T.unsafe(nil)); end
- def splat_value(node = T.unsafe(nil)); end
+ def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end
+ def range_enclosed_in_parentheses?(param0 = T.unsafe(nil)); end
+ def splat_value(param0 = T.unsafe(nil)); end
private
@@ -8660,8 +8662,8 @@ class RuboCop::Cop::Style::NilComparison < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
extend(::RuboCop::Cop::AutoCorrector)
- def nil_check?(node = T.unsafe(nil)); end
- def nil_comparison?(node = T.unsafe(nil)); end
+ def nil_check?(param0 = T.unsafe(nil)); end
+ def nil_comparison?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -8680,13 +8682,13 @@ RuboCop::Cop::Style::NilComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra
class RuboCop::Cop::Style::NonNilCheck < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def nil_check?(node = T.unsafe(nil)); end
- def not_and_nil_check?(node = T.unsafe(nil)); end
- def not_equal_to_nil?(node = T.unsafe(nil)); end
+ def nil_check?(param0 = T.unsafe(nil)); end
+ def not_and_nil_check?(param0 = T.unsafe(nil)); end
+ def not_equal_to_nil?(param0 = T.unsafe(nil)); end
def on_def(node); end
def on_defs(node); end
def on_send(node); end
- def unless_check?(node = T.unsafe(nil)); end
+ def unless_check?(param0 = T.unsafe(nil)); end
private
@@ -8790,10 +8792,10 @@ class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base
include(::RuboCop::Cop::IgnoredMethods)
extend(::RuboCop::Cop::AutoCorrector)
- def comparison(node = T.unsafe(nil)); end
- def inverted_comparison(node = T.unsafe(nil)); end
+ def comparison(param0 = T.unsafe(nil)); end
+ def inverted_comparison(param0 = T.unsafe(nil)); end
def on_send(node); end
- def predicate(node = T.unsafe(nil)); end
+ def predicate(param0 = T.unsafe(nil)); end
private
@@ -8837,7 +8839,7 @@ RuboCop::Cop::Style::OneLineConditional::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::OptionHash < ::RuboCop::Cop::Base
def on_args(node); end
- def option_hash(node = T.unsafe(nil)); end
+ def option_hash(param0 = T.unsafe(nil)); end
private
@@ -8860,6 +8862,8 @@ end
RuboCop::Cop::Style::OptionalArguments::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::OptionalBooleanParameter < ::RuboCop::Cop::Base
+ include(::RuboCop::Cop::AllowedMethods)
+
def on_def(node); end
def on_defs(node); end
end
@@ -8876,8 +8880,8 @@ class RuboCop::Cop::Style::OrAssignment < ::RuboCop::Cop::Base
def on_if(node); end
def on_ivasgn(node); end
def on_lvasgn(node); end
- def ternary_assignment?(node = T.unsafe(nil)); end
- def unless_assignment?(node = T.unsafe(nil)); end
+ def ternary_assignment?(param0 = T.unsafe(nil)); end
+ def unless_assignment?(param0 = T.unsafe(nil)); end
private
@@ -8892,7 +8896,7 @@ class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RescueNode)
extend(::RuboCop::Cop::AutoCorrector)
- def implicit_self_getter?(node = T.unsafe(nil)); end
+ def implicit_self_getter?(param0 = T.unsafe(nil)); end
def on_masgn(node); end
private
@@ -8916,11 +8920,11 @@ class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter
def accesses?(rhs, lhs); end
def dependency?(lhs, rhs); end
- def matching_calls(node0, param1, param2); end
+ def matching_calls(param0, param1, param2); end
def tsort_each_child(assignment); end
def tsort_each_node(&block); end
- def uses_var?(node0, param1); end
- def var_name(node = T.unsafe(nil)); end
+ def uses_var?(param0, param1); end
+ def var_name(param0 = T.unsafe(nil)); end
end
class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector
@@ -8970,7 +8974,7 @@ class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base
include(::RuboCop::Cop::Parentheses)
extend(::RuboCop::Cop::AutoCorrector)
- def control_op_condition(node = T.unsafe(nil)); end
+ def control_op_condition(param0 = T.unsafe(nil)); end
def on_if(node); end
def on_until(node); end
def on_while(node); end
@@ -9061,7 +9065,7 @@ class RuboCop::Cop::Style::Proc < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_block(node); end
- def proc_new?(node = T.unsafe(nil)); end
+ def proc_new?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Style::Proc::MSG = T.let(T.unsafe(nil), String)
@@ -9091,12 +9095,12 @@ RuboCop::Cop::Style::RaiseArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Style::RandomWithOffset < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def integer_op_rand?(node = T.unsafe(nil)); end
+ def integer_op_rand?(param0 = T.unsafe(nil)); end
def on_send(node); end
- def rand_modified?(node = T.unsafe(nil)); end
- def rand_op_integer?(node = T.unsafe(nil)); end
- def random_call(node = T.unsafe(nil)); end
- def to_int(node = T.unsafe(nil)); end
+ def rand_modified?(param0 = T.unsafe(nil)); end
+ def rand_op_integer?(param0 = T.unsafe(nil)); end
+ def random_call(param0 = T.unsafe(nil)); end
+ def to_int(param0 = T.unsafe(nil)); end
private
@@ -9117,7 +9121,7 @@ class RuboCop::Cop::Style::RedundantAssignment < ::RuboCop::Cop::Base
def on_def(node); end
def on_defs(node); end
- def redundant_assignment?(node = T.unsafe(nil)); end
+ def redundant_assignment?(param0 = T.unsafe(nil)); end
private
@@ -9127,8 +9131,6 @@ class RuboCop::Cop::Style::RedundantAssignment < ::RuboCop::Cop::Base
def check_ensure_node(node); end
def check_if_node(node); end
def check_rescue_node(node); end
- def right_sibling_of(node); end
- def siblings_of(node); end
end
RuboCop::Cop::Style::RedundantAssignment::MSG = T.let(T.unsafe(nil), String)
@@ -9185,13 +9187,13 @@ RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::RedundantCondition::REDUNDANT_CONDITION = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Style::RedundantConditional < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Style::RedundantConditional < ::RuboCop::Cop::Base
include(::RuboCop::Cop::Alignment)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_if(node); end
- def redundant_condition?(node = T.unsafe(nil)); end
- def redundant_condition_inverted?(node = T.unsafe(nil)); end
+ def redundant_condition?(param0 = T.unsafe(nil)); end
+ def redundant_condition_inverted?(param0 = T.unsafe(nil)); end
private
@@ -9210,8 +9212,8 @@ RuboCop::Cop::Style::RedundantConditional::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::RedundantException < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def compact?(node = T.unsafe(nil)); end
- def exploded?(node = T.unsafe(nil)); end
+ def compact?(param0 = T.unsafe(nil)); end
+ def exploded?(param0 = T.unsafe(nil)); end
def fix_compact(node); end
def fix_exploded(node); end
def on_send(node); end
@@ -9229,8 +9231,8 @@ class RuboCop::Cop::Style::RedundantFetchBlock < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_block(node); end
- def rails_cache?(node = T.unsafe(nil)); end
- def redundant_fetch_block_candidate?(node = T.unsafe(nil)); end
+ def rails_cache?(param0 = T.unsafe(nil)); end
+ def redundant_fetch_block_candidate?(param0 = T.unsafe(nil)); end
private
@@ -9250,7 +9252,7 @@ class RuboCop::Cop::Style::RedundantFileExtensionInRequire < ::RuboCop::Cop::Bas
extend(::RuboCop::Cop::AutoCorrector)
def on_send(node); end
- def require_call?(node = T.unsafe(nil)); end
+ def require_call?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Style::RedundantFileExtensionInRequire::MSG = T.let(T.unsafe(nil), String)
@@ -9262,7 +9264,7 @@ class RuboCop::Cop::Style::RedundantFreeze < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_send(node); end
- def operation_produces_immutable_object?(node = T.unsafe(nil)); end
+ def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end
private
@@ -9304,15 +9306,15 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base
include(::RuboCop::Cop::Parentheses)
extend(::RuboCop::Cop::AutoCorrector)
- def arg_in_call_with_block?(node = T.unsafe(nil)); end
- def first_send_argument?(node = T.unsafe(nil)); end
- def first_super_argument?(node = T.unsafe(nil)); end
- def first_yield_argument?(node = T.unsafe(nil)); end
- def method_node_and_args(node = T.unsafe(nil)); end
+ def arg_in_call_with_block?(param0 = T.unsafe(nil)); end
+ def first_send_argument?(param0 = T.unsafe(nil)); end
+ def first_super_argument?(param0 = T.unsafe(nil)); end
+ def first_yield_argument?(param0 = T.unsafe(nil)); end
+ def method_node_and_args(param0 = T.unsafe(nil)); end
def on_begin(node); end
- def range_end?(node = T.unsafe(nil)); end
- def rescue?(node = T.unsafe(nil)); end
- def square_brackets?(node = T.unsafe(nil)); end
+ def range_end?(param0 = T.unsafe(nil)); end
+ def rescue?(param0 = T.unsafe(nil)); end
+ def square_brackets?(param0 = T.unsafe(nil)); end
private
@@ -9345,8 +9347,9 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base
def suspect_unary?(node); end
end
-class RuboCop::Cop::Style::RedundantPercentQ < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Style::RedundantPercentQ < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def on_dstr(node); end
def on_str(node); end
@@ -9422,10 +9425,10 @@ RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_WITHIN_CHAR_CLASS_METACHAR_E
RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_def(node); end
def on_defs(node); end
@@ -9439,6 +9442,7 @@ class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Cop
def check_case_node(node); end
def check_ensure_node(node); end
def check_if_node(node); end
+ def check_resbody_node(node); end
def check_rescue_node(node); end
def check_return_node(node); end
def correct_with_arguments(return_node, corrector); end
@@ -9451,10 +9455,11 @@ RuboCop::Cop::Style::RedundantReturn::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::RedundantReturn::MULTI_RETURN_MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end
- def autocorrect(node); end
def on_and_asgn(node); end
def on_args(node); end
def on_block(node); end
@@ -9496,8 +9501,8 @@ class RuboCop::Cop::Style::RedundantSelfAssignment < ::RuboCop::Cop::Base
def on_ivasgn(node); end
def on_lvasgn(node); end
def on_send(node); end
- def redundant_nonself_assignment?(node = T.unsafe(nil), param1, param2); end
- def redundant_self_assignment?(node = T.unsafe(nil), param1); end
+ def redundant_nonself_assignment?(param0 = T.unsafe(nil), param1, param2); end
+ def redundant_self_assignment?(param0 = T.unsafe(nil), param1); end
private
@@ -9512,18 +9517,19 @@ RuboCop::Cop::Style::RedundantSelfAssignment::METHODS_RETURNING_SELF = T.let(T.u
RuboCop::Cop::Style::RedundantSelfAssignment::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_send(node); end
- def redundant_sort?(node = T.unsafe(nil)); end
+ def redundant_sort?(param0 = T.unsafe(nil)); end
private
def accessor_start(node); end
def arg_node(node); end
def arg_value(node); end
+ def autocorrect(corrector, node, sort_node, sorter, accessor); end
def base(accessor, arg); end
def message(node, sorter, accessor); end
def offense_range(sort_node, ancestor); end
@@ -9535,12 +9541,12 @@ RuboCop::Cop::Style::RedundantSort::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::RedundantSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-class RuboCop::Cop::Style::RedundantSortBy < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Style::RedundantSortBy < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_block(node); end
- def redundant_sort_by(node = T.unsafe(nil)); end
+ def redundant_sort_by(param0 = T.unsafe(nil)); end
private
@@ -9597,15 +9603,20 @@ end
RuboCop::Cop::Style::RescueModifier::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Style::RescueStandardError < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Style::RescueStandardError < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RescueNode)
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_resbody(node); end
- def rescue_standard_error?(node = T.unsafe(nil)); end
- def rescue_without_error_class?(node = T.unsafe(nil)); end
+ def rescue_standard_error?(param0 = T.unsafe(nil)); end
+ def rescue_without_error_class?(param0 = T.unsafe(nil)); end
+
+ private
+
+ def offense_for_exlicit_enforced_style(node); end
+ def offense_for_implicit_enforced_style(node, error); end
end
RuboCop::Cop::Style::RescueStandardError::MSG_EXPLICIT = T.let(T.unsafe(nil), String)
@@ -9616,11 +9627,11 @@ class RuboCop::Cop::Style::ReturnNil < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
extend(::RuboCop::Cop::AutoCorrector)
- def chained_send?(node = T.unsafe(nil)); end
- def define_method?(node = T.unsafe(nil)); end
+ def chained_send?(param0 = T.unsafe(nil)); end
+ def define_method?(param0 = T.unsafe(nil)); end
def on_return(node); end
- def return_nil_node?(node = T.unsafe(nil)); end
- def return_node?(node = T.unsafe(nil)); end
+ def return_nil_node?(param0 = T.unsafe(nil)); end
+ def return_node?(param0 = T.unsafe(nil)); end
private
@@ -9640,8 +9651,8 @@ class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def check_node(node); end
- def modifier_if_safe_navigation_candidate(node = T.unsafe(nil)); end
- def not_nil_check?(node = T.unsafe(nil)); end
+ def modifier_if_safe_navigation_candidate(param0 = T.unsafe(nil)); end
+ def not_nil_check?(param0 = T.unsafe(nil)); end
def on_and(node); end
def on_if(node); end
def use_var_only_in_unless_modifier?(node, variable); end
@@ -9676,7 +9687,7 @@ class RuboCop::Cop::Style::Sample < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_send(node); end
- def sample_candidate?(node = T.unsafe(nil)); end
+ def sample_candidate?(param0 = T.unsafe(nil)); end
private
@@ -9752,8 +9763,8 @@ class RuboCop::Cop::Style::SignalException < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
extend(::RuboCop::Cop::AutoCorrector)
- def custom_fail_methods(node0); end
- def kernel_call?(node = T.unsafe(nil), param1); end
+ def custom_fail_methods(param0); end
+ def kernel_call?(param0 = T.unsafe(nil), param1); end
def on_new_investigation; end
def on_rescue(node); end
def on_send(node); end
@@ -9779,7 +9790,7 @@ class RuboCop::Cop::Style::SingleArgumentDig < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_send(node); end
- def single_argument_dig?(node = T.unsafe(nil)); end
+ def single_argument_dig?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String)
@@ -9825,7 +9836,7 @@ class RuboCop::Cop::Style::SlicingWithRange < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::TargetRubyVersion)
def on_send(node); end
- def range_till_minus_one?(node = T.unsafe(nil)); end
+ def range_till_minus_one?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Style::SlicingWithRange::MSG = T.let(T.unsafe(nil), String)
@@ -9899,7 +9910,7 @@ class RuboCop::Cop::Style::StderrPuts < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_send(node); end
- def stderr_puts?(node = T.unsafe(nil)); end
+ def stderr_puts?(param0 = T.unsafe(nil)); end
private
@@ -9916,7 +9927,7 @@ class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_send(node); end
- def string_concatenation?(node = T.unsafe(nil)); end
+ def string_concatenation?(param0 = T.unsafe(nil)); end
private
@@ -9936,8 +9947,8 @@ class RuboCop::Cop::Style::StringHashKeys < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_pair(node); end
- def receive_environments_method?(node = T.unsafe(nil)); end
- def string_hash_key?(node = T.unsafe(nil)); end
+ def receive_environments_method?(param0 = T.unsafe(nil)); end
+ def string_hash_key?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Style::StringHashKeys::MSG = T.let(T.unsafe(nil), String)
@@ -9992,7 +10003,7 @@ class RuboCop::Cop::Style::Strip < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::Cop::AutoCorrector)
- def lstrip_rstrip(node = T.unsafe(nil)); end
+ def lstrip_rstrip(param0 = T.unsafe(nil)); end
def on_send(node); end
end
@@ -10005,7 +10016,7 @@ class RuboCop::Cop::Style::StructInheritance < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_class(node); end
- def struct_constructor?(node = T.unsafe(nil)); end
+ def struct_constructor?(param0 = T.unsafe(nil)); end
private
@@ -10055,8 +10066,8 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base
def destructuring_block_argument?(argument_node); end
def on_block(node); end
- def proc_node?(node = T.unsafe(nil)); end
- def symbol_proc?(node = T.unsafe(nil)); end
+ def proc_node?(param0 = T.unsafe(nil)); end
+ def symbol_proc?(param0 = T.unsafe(nil)); end
private
@@ -10102,7 +10113,7 @@ class RuboCop::Cop::Style::TernaryParentheses < ::RuboCop::Cop::Base
include(::RuboCop::Cop::SurroundingSpace)
extend(::RuboCop::Cop::AutoCorrector)
- def method_name(node = T.unsafe(nil)); end
+ def method_name(param0 = T.unsafe(nil)); end
def on_if(node); end
def only_closing_parenthesis_is_last_line?(condition); end
@@ -10133,7 +10144,7 @@ RuboCop::Cop::Style::TernaryParentheses::MSG_COMPLEX = T.let(T.unsafe(nil), Stri
RuboCop::Cop::Style::TernaryParentheses::NON_COMPLEX_TYPES = T.let(T.unsafe(nil), Array)
-RuboCop::Cop::Style::TernaryParentheses::VARIABLE_TYPES = T.let(T.unsafe(nil), Array)
+RuboCop::Cop::Style::TernaryParentheses::VARIABLE_TYPES = T.let(T.unsafe(nil), Set)
class RuboCop::Cop::Style::TrailingBodyOnClass < ::RuboCop::Cop::Base
include(::RuboCop::Cop::Alignment)
@@ -10257,7 +10268,7 @@ class RuboCop::Cop::Style::TrivialAccessors < ::RuboCop::Cop::Base
include(::RuboCop::Cop::AllowedMethods)
extend(::RuboCop::Cop::AutoCorrector)
- def looks_like_trivial_writer?(node = T.unsafe(nil)); end
+ def looks_like_trivial_writer?(param0 = T.unsafe(nil)); end
def on_def(node); end
def on_defs(node); end
@@ -10303,7 +10314,7 @@ class RuboCop::Cop::Style::UnpackFirst < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def on_send(node); end
- def unpack_and_first_element?(node = T.unsafe(nil)); end
+ def unpack_and_first_element?(param0 = T.unsafe(nil)); end
private
@@ -10386,7 +10397,7 @@ class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::Cop::AutoCorrector)
- def file_constant_equal_program_name?(node = T.unsafe(nil)); end
+ def file_constant_equal_program_name?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
@@ -10419,12 +10430,12 @@ RuboCop::Cop::Style::YodaCondition::REVERSE_COMPARISON = T.let(T.unsafe(nil), Ha
class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
- def non_polymorphic_collection?(node = T.unsafe(nil)); end
- def nonzero_length_predicate(node = T.unsafe(nil)); end
+ def non_polymorphic_collection?(param0 = T.unsafe(nil)); end
+ def nonzero_length_predicate(param0 = T.unsafe(nil)); end
def on_send(node); end
- def other_receiver(node = T.unsafe(nil)); end
- def zero_length_predicate(node = T.unsafe(nil)); end
- def zero_length_receiver(node = T.unsafe(nil)); end
+ def other_receiver(param0 = T.unsafe(nil)); end
+ def zero_length_predicate(param0 = T.unsafe(nil)); end
+ def zero_length_receiver(param0 = T.unsafe(nil)); end
private
@@ -10593,7 +10604,6 @@ end
module RuboCop::Cop::Util
include(::RuboCop::PathUtil)
- include(::RuboCop::TokensUtil)
private
@@ -11045,20 +11055,26 @@ RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol
module RuboCop::Cop::VisibilityHelp
extend(::RuboCop::AST::NodePattern::Macros)
- def visibility_block?(node = T.unsafe(nil)); end
+ def visibility_block?(param0 = T.unsafe(nil)); end
private
def find_visibility_end(node); end
def find_visibility_start(node); end
- def left_siblings_of(node); end
def node_visibility(node); end
- def right_siblings_of(node); end
- def siblings_of(node); end
end
RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Array)
+class RuboCop::DirectiveComment
+ def initialize(comment); end
+
+ def comment; end
+ def cops; end
+ def match?(cop_names); end
+ def range; end
+end
+
class RuboCop::Error < ::StandardError
end
@@ -11169,6 +11185,8 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo
def output_offending_files(output_buffer, cfg, cop_name); end
def output_offenses; end
def set_max(cfg, cop_name); end
+ def show_offense_counts?; end
+ def show_timestamp?; end
def timestamp; end
class << self
@@ -11344,9 +11362,9 @@ RuboCop::Formatter::PacmanFormatter::FALLBACK_TERMINAL_WIDTH = T.let(T.unsafe(ni
RuboCop::Formatter::PacmanFormatter::GHOST = T.let(T.unsafe(nil), String)
-RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::Presenter)
+RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::NullPresenter)
-RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::Presenter)
+RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::NullPresenter)
class RuboCop::Formatter::ProgressFormatter < ::RuboCop::Formatter::ClangStyleFormatter
include(::RuboCop::Formatter::TextUtil)
@@ -11775,6 +11793,8 @@ class RuboCop::TargetFinder
def order; end
end
+RuboCop::TargetFinder::HIDDEN_PATH_SUBSTRING = T.let(T.unsafe(nil), String)
+
class RuboCop::TargetRuby
def initialize(config); end
@@ -11836,30 +11856,12 @@ end
RuboCop::Token = RuboCop::AST::Token
-module RuboCop::TokensUtil
-
- private
-
- def fast_index_of_first_token(node); end
- def fast_index_of_last_token(node); end
- def fast_tokens(node); end
- def index_of_first_token(node); end
- def index_of_last_token(node); end
- def sorted_tokens?(tokens); end
- def tokens(node); end
-
- class << self
- def index_of_first_token(node); end
- def index_of_last_token(node); end
- def tokens(node); end
- end
-end
-
class RuboCop::ValidationError < ::RuboCop::Error
end
module RuboCop::Version
class << self
+ def document_version; end
def version(debug: T.unsafe(nil)); end
end
end | true |
Other | Homebrew | brew | b3d12361acb9d41fbe5ca772a01af941a9be9bf1.json | sorbet: Update RBI files and prune files.yaml.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml). | Library/Homebrew/sorbet/rbi/gems/strscan@1.0.3.rbi | @@ -0,0 +1,8 @@
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `strscan` gem.
+# Please instead update this file by running `tapioca sync`.
+
+# typed: true
+
+# THIS IS AN EMPTY RBI FILE.
+# see https://github.com/Shopify/tapioca/blob/master/README.md#manual-gem-requires | true |
Other | Homebrew | brew | b3d12361acb9d41fbe5ca772a01af941a9be9bf1.json | sorbet: Update RBI files and prune files.yaml.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml). | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -14200,893 +14200,7 @@ end
ParseError = Racc::ParseError
-Parser::CurrentRuby = Parser::Ruby26
-
-class Parser::Ruby24
- def _reduce_10(val, _values, result); end
-
- def _reduce_100(val, _values, result); end
-
- def _reduce_101(val, _values, result); end
-
- def _reduce_102(val, _values, result); end
-
- def _reduce_103(val, _values, result); end
-
- def _reduce_104(val, _values, result); end
-
- def _reduce_105(val, _values, result); end
-
- def _reduce_106(val, _values, result); end
-
- def _reduce_107(val, _values, result); end
-
- def _reduce_108(val, _values, result); end
-
- def _reduce_11(val, _values, result); end
-
- def _reduce_110(val, _values, result); end
-
- def _reduce_111(val, _values, result); end
-
- def _reduce_112(val, _values, result); end
-
- def _reduce_118(val, _values, result); end
-
- def _reduce_12(val, _values, result); end
-
- def _reduce_122(val, _values, result); end
-
- def _reduce_123(val, _values, result); end
-
- def _reduce_124(val, _values, result); end
-
- def _reduce_13(val, _values, result); end
-
- def _reduce_14(val, _values, result); end
-
- def _reduce_16(val, _values, result); end
-
- def _reduce_17(val, _values, result); end
-
- def _reduce_18(val, _values, result); end
-
- def _reduce_19(val, _values, result); end
-
- def _reduce_196(val, _values, result); end
-
- def _reduce_197(val, _values, result); end
-
- def _reduce_198(val, _values, result); end
-
- def _reduce_199(val, _values, result); end
-
- def _reduce_2(val, _values, result); end
-
- def _reduce_20(val, _values, result); end
-
- def _reduce_200(val, _values, result); end
-
- def _reduce_201(val, _values, result); end
-
- def _reduce_202(val, _values, result); end
-
- def _reduce_203(val, _values, result); end
-
- def _reduce_204(val, _values, result); end
-
- def _reduce_205(val, _values, result); end
-
- def _reduce_206(val, _values, result); end
-
- def _reduce_207(val, _values, result); end
-
- def _reduce_208(val, _values, result); end
-
- def _reduce_209(val, _values, result); end
-
- def _reduce_21(val, _values, result); end
-
- def _reduce_210(val, _values, result); end
-
- def _reduce_211(val, _values, result); end
-
- def _reduce_212(val, _values, result); end
-
- def _reduce_213(val, _values, result); end
-
- def _reduce_214(val, _values, result); end
-
- def _reduce_215(val, _values, result); end
-
- def _reduce_216(val, _values, result); end
-
- def _reduce_217(val, _values, result); end
-
- def _reduce_218(val, _values, result); end
-
- def _reduce_219(val, _values, result); end
-
- def _reduce_22(val, _values, result); end
-
- def _reduce_220(val, _values, result); end
-
- def _reduce_221(val, _values, result); end
-
- def _reduce_222(val, _values, result); end
-
- def _reduce_223(val, _values, result); end
-
- def _reduce_224(val, _values, result); end
-
- def _reduce_225(val, _values, result); end
-
- def _reduce_226(val, _values, result); end
-
- def _reduce_227(val, _values, result); end
-
- def _reduce_228(val, _values, result); end
-
- def _reduce_229(val, _values, result); end
-
- def _reduce_23(val, _values, result); end
-
- def _reduce_230(val, _values, result); end
-
- def _reduce_231(val, _values, result); end
-
- def _reduce_232(val, _values, result); end
-
- def _reduce_233(val, _values, result); end
-
- def _reduce_234(val, _values, result); end
-
- def _reduce_235(val, _values, result); end
-
- def _reduce_236(val, _values, result); end
-
- def _reduce_24(val, _values, result); end
-
- def _reduce_241(val, _values, result); end
-
- def _reduce_242(val, _values, result); end
-
- def _reduce_244(val, _values, result); end
-
- def _reduce_245(val, _values, result); end
-
- def _reduce_246(val, _values, result); end
-
- def _reduce_248(val, _values, result); end
-
- def _reduce_25(val, _values, result); end
-
- def _reduce_251(val, _values, result); end
-
- def _reduce_252(val, _values, result); end
-
- def _reduce_253(val, _values, result); end
-
- def _reduce_254(val, _values, result); end
-
- def _reduce_255(val, _values, result); end
-
- def _reduce_256(val, _values, result); end
-
- def _reduce_257(val, _values, result); end
-
- def _reduce_258(val, _values, result); end
-
- def _reduce_259(val, _values, result); end
-
- def _reduce_26(val, _values, result); end
-
- def _reduce_260(val, _values, result); end
-
- def _reduce_261(val, _values, result); end
-
- def _reduce_262(val, _values, result); end
-
- def _reduce_263(val, _values, result); end
-
- def _reduce_264(val, _values, result); end
-
- def _reduce_265(val, _values, result); end
-
- def _reduce_266(val, _values, result); end
-
- def _reduce_267(val, _values, result); end
-
- def _reduce_269(val, _values, result); end
-
- def _reduce_27(val, _values, result); end
-
- def _reduce_270(val, _values, result); end
-
- def _reduce_271(val, _values, result); end
-
- def _reduce_28(val, _values, result); end
-
- def _reduce_282(val, _values, result); end
-
- def _reduce_283(val, _values, result); end
-
- def _reduce_284(val, _values, result); end
-
- def _reduce_285(val, _values, result); end
-
- def _reduce_286(val, _values, result); end
-
- def _reduce_287(val, _values, result); end
-
- def _reduce_288(val, _values, result); end
-
- def _reduce_289(val, _values, result); end
-
- def _reduce_290(val, _values, result); end
-
- def _reduce_291(val, _values, result); end
-
- def _reduce_292(val, _values, result); end
-
- def _reduce_293(val, _values, result); end
-
- def _reduce_294(val, _values, result); end
-
- def _reduce_295(val, _values, result); end
-
- def _reduce_296(val, _values, result); end
-
- def _reduce_297(val, _values, result); end
-
- def _reduce_298(val, _values, result); end
-
- def _reduce_299(val, _values, result); end
-
- def _reduce_3(val, _values, result); end
-
- def _reduce_30(val, _values, result); end
-
- def _reduce_300(val, _values, result); end
-
- def _reduce_301(val, _values, result); end
-
- def _reduce_303(val, _values, result); end
-
- def _reduce_304(val, _values, result); end
-
- def _reduce_305(val, _values, result); end
-
- def _reduce_306(val, _values, result); end
-
- def _reduce_307(val, _values, result); end
-
- def _reduce_308(val, _values, result); end
-
- def _reduce_309(val, _values, result); end
-
- def _reduce_31(val, _values, result); end
-
- def _reduce_310(val, _values, result); end
-
- def _reduce_311(val, _values, result); end
-
- def _reduce_312(val, _values, result); end
-
- def _reduce_313(val, _values, result); end
-
- def _reduce_314(val, _values, result); end
-
- def _reduce_315(val, _values, result); end
-
- def _reduce_316(val, _values, result); end
-
- def _reduce_317(val, _values, result); end
-
- def _reduce_318(val, _values, result); end
-
- def _reduce_319(val, _values, result); end
-
- def _reduce_32(val, _values, result); end
-
- def _reduce_320(val, _values, result); end
-
- def _reduce_321(val, _values, result); end
-
- def _reduce_322(val, _values, result); end
-
- def _reduce_323(val, _values, result); end
-
- def _reduce_324(val, _values, result); end
-
- def _reduce_325(val, _values, result); end
-
- def _reduce_326(val, _values, result); end
-
- def _reduce_327(val, _values, result); end
-
- def _reduce_328(val, _values, result); end
-
- def _reduce_329(val, _values, result); end
-
- def _reduce_330(val, _values, result); end
-
- def _reduce_331(val, _values, result); end
-
- def _reduce_332(val, _values, result); end
-
- def _reduce_333(val, _values, result); end
-
- def _reduce_337(val, _values, result); end
-
- def _reduce_34(val, _values, result); end
-
- def _reduce_341(val, _values, result); end
-
- def _reduce_343(val, _values, result); end
-
- def _reduce_346(val, _values, result); end
-
- def _reduce_347(val, _values, result); end
-
- def _reduce_348(val, _values, result); end
-
- def _reduce_349(val, _values, result); end
-
- def _reduce_35(val, _values, result); end
-
- def _reduce_351(val, _values, result); end
-
- def _reduce_352(val, _values, result); end
-
- def _reduce_353(val, _values, result); end
-
- def _reduce_354(val, _values, result); end
-
- def _reduce_355(val, _values, result); end
-
- def _reduce_356(val, _values, result); end
-
- def _reduce_357(val, _values, result); end
-
- def _reduce_358(val, _values, result); end
-
- def _reduce_359(val, _values, result); end
-
- def _reduce_36(val, _values, result); end
-
- def _reduce_360(val, _values, result); end
-
- def _reduce_361(val, _values, result); end
-
- def _reduce_362(val, _values, result); end
-
- def _reduce_363(val, _values, result); end
-
- def _reduce_364(val, _values, result); end
-
- def _reduce_365(val, _values, result); end
-
- def _reduce_366(val, _values, result); end
-
- def _reduce_367(val, _values, result); end
-
- def _reduce_368(val, _values, result); end
-
- def _reduce_369(val, _values, result); end
-
- def _reduce_37(val, _values, result); end
-
- def _reduce_371(val, _values, result); end
-
- def _reduce_372(val, _values, result); end
-
- def _reduce_373(val, _values, result); end
-
- def _reduce_374(val, _values, result); end
-
- def _reduce_375(val, _values, result); end
-
- def _reduce_376(val, _values, result); end
-
- def _reduce_377(val, _values, result); end
-
- def _reduce_378(val, _values, result); end
-
- def _reduce_38(val, _values, result); end
-
- def _reduce_380(val, _values, result); end
-
- def _reduce_381(val, _values, result); end
-
- def _reduce_382(val, _values, result); end
-
- def _reduce_383(val, _values, result); end
-
- def _reduce_384(val, _values, result); end
-
- def _reduce_385(val, _values, result); end
-
- def _reduce_386(val, _values, result); end
-
- def _reduce_387(val, _values, result); end
-
- def _reduce_388(val, _values, result); end
-
- def _reduce_389(val, _values, result); end
-
- def _reduce_39(val, _values, result); end
-
- def _reduce_391(val, _values, result); end
-
- def _reduce_392(val, _values, result); end
-
- def _reduce_393(val, _values, result); end
-
- def _reduce_394(val, _values, result); end
-
- def _reduce_395(val, _values, result); end
-
- def _reduce_396(val, _values, result); end
-
- def _reduce_397(val, _values, result); end
-
- def _reduce_398(val, _values, result); end
-
- def _reduce_399(val, _values, result); end
-
- def _reduce_4(val, _values, result); end
-
- def _reduce_40(val, _values, result); end
-
- def _reduce_400(val, _values, result); end
-
- def _reduce_401(val, _values, result); end
-
- def _reduce_402(val, _values, result); end
-
- def _reduce_403(val, _values, result); end
-
- def _reduce_404(val, _values, result); end
-
- def _reduce_405(val, _values, result); end
-
- def _reduce_406(val, _values, result); end
-
- def _reduce_407(val, _values, result); end
-
- def _reduce_408(val, _values, result); end
-
- def _reduce_409(val, _values, result); end
-
- def _reduce_41(val, _values, result); end
-
- def _reduce_410(val, _values, result); end
-
- def _reduce_411(val, _values, result); end
-
- def _reduce_412(val, _values, result); end
-
- def _reduce_413(val, _values, result); end
-
- def _reduce_414(val, _values, result); end
-
- def _reduce_415(val, _values, result); end
-
- def _reduce_416(val, _values, result); end
-
- def _reduce_417(val, _values, result); end
-
- def _reduce_418(val, _values, result); end
-
- def _reduce_419(val, _values, result); end
-
- def _reduce_420(val, _values, result); end
-
- def _reduce_421(val, _values, result); end
-
- def _reduce_422(val, _values, result); end
-
- def _reduce_423(val, _values, result); end
-
- def _reduce_424(val, _values, result); end
-
- def _reduce_425(val, _values, result); end
-
- def _reduce_427(val, _values, result); end
-
- def _reduce_428(val, _values, result); end
-
- def _reduce_429(val, _values, result); end
-
- def _reduce_43(val, _values, result); end
-
- def _reduce_432(val, _values, result); end
-
- def _reduce_434(val, _values, result); end
-
- def _reduce_439(val, _values, result); end
-
- def _reduce_440(val, _values, result); end
-
- def _reduce_441(val, _values, result); end
-
- def _reduce_442(val, _values, result); end
-
- def _reduce_443(val, _values, result); end
-
- def _reduce_444(val, _values, result); end
-
- def _reduce_445(val, _values, result); end
-
- def _reduce_446(val, _values, result); end
-
- def _reduce_447(val, _values, result); end
-
- def _reduce_448(val, _values, result); end
-
- def _reduce_449(val, _values, result); end
-
- def _reduce_450(val, _values, result); end
-
- def _reduce_451(val, _values, result); end
-
- def _reduce_452(val, _values, result); end
-
- def _reduce_453(val, _values, result); end
-
- def _reduce_454(val, _values, result); end
-
- def _reduce_455(val, _values, result); end
-
- def _reduce_456(val, _values, result); end
-
- def _reduce_457(val, _values, result); end
-
- def _reduce_458(val, _values, result); end
-
- def _reduce_459(val, _values, result); end
-
- def _reduce_46(val, _values, result); end
-
- def _reduce_460(val, _values, result); end
-
- def _reduce_461(val, _values, result); end
-
- def _reduce_462(val, _values, result); end
-
- def _reduce_463(val, _values, result); end
-
- def _reduce_464(val, _values, result); end
-
- def _reduce_465(val, _values, result); end
-
- def _reduce_466(val, _values, result); end
-
- def _reduce_467(val, _values, result); end
-
- def _reduce_468(val, _values, result); end
-
- def _reduce_469(val, _values, result); end
-
- def _reduce_47(val, _values, result); end
-
- def _reduce_470(val, _values, result); end
-
- def _reduce_471(val, _values, result); end
-
- def _reduce_472(val, _values, result); end
-
- def _reduce_473(val, _values, result); end
-
- def _reduce_475(val, _values, result); end
-
- def _reduce_476(val, _values, result); end
-
- def _reduce_477(val, _values, result); end
-
- def _reduce_478(val, _values, result); end
-
- def _reduce_479(val, _values, result); end
-
- def _reduce_48(val, _values, result); end
-
- def _reduce_480(val, _values, result); end
-
- def _reduce_481(val, _values, result); end
-
- def _reduce_482(val, _values, result); end
-
- def _reduce_483(val, _values, result); end
-
- def _reduce_484(val, _values, result); end
-
- def _reduce_485(val, _values, result); end
-
- def _reduce_486(val, _values, result); end
-
- def _reduce_487(val, _values, result); end
-
- def _reduce_488(val, _values, result); end
-
- def _reduce_489(val, _values, result); end
-
- def _reduce_49(val, _values, result); end
-
- def _reduce_490(val, _values, result); end
-
- def _reduce_491(val, _values, result); end
-
- def _reduce_492(val, _values, result); end
-
- def _reduce_493(val, _values, result); end
-
- def _reduce_494(val, _values, result); end
-
- def _reduce_495(val, _values, result); end
-
- def _reduce_496(val, _values, result); end
-
- def _reduce_497(val, _values, result); end
-
- def _reduce_498(val, _values, result); end
-
- def _reduce_499(val, _values, result); end
-
- def _reduce_5(val, _values, result); end
-
- def _reduce_500(val, _values, result); end
-
- def _reduce_501(val, _values, result); end
-
- def _reduce_502(val, _values, result); end
-
- def _reduce_503(val, _values, result); end
-
- def _reduce_504(val, _values, result); end
-
- def _reduce_505(val, _values, result); end
-
- def _reduce_506(val, _values, result); end
-
- def _reduce_507(val, _values, result); end
-
- def _reduce_508(val, _values, result); end
-
- def _reduce_509(val, _values, result); end
-
- def _reduce_510(val, _values, result); end
-
- def _reduce_511(val, _values, result); end
-
- def _reduce_512(val, _values, result); end
-
- def _reduce_513(val, _values, result); end
-
- def _reduce_514(val, _values, result); end
-
- def _reduce_515(val, _values, result); end
-
- def _reduce_516(val, _values, result); end
-
- def _reduce_517(val, _values, result); end
-
- def _reduce_518(val, _values, result); end
-
- def _reduce_519(val, _values, result); end
-
- def _reduce_520(val, _values, result); end
-
- def _reduce_521(val, _values, result); end
-
- def _reduce_522(val, _values, result); end
-
- def _reduce_523(val, _values, result); end
-
- def _reduce_524(val, _values, result); end
-
- def _reduce_525(val, _values, result); end
-
- def _reduce_526(val, _values, result); end
-
- def _reduce_527(val, _values, result); end
-
- def _reduce_528(val, _values, result); end
-
- def _reduce_529(val, _values, result); end
-
- def _reduce_530(val, _values, result); end
-
- def _reduce_531(val, _values, result); end
-
- def _reduce_533(val, _values, result); end
-
- def _reduce_534(val, _values, result); end
-
- def _reduce_535(val, _values, result); end
-
- def _reduce_536(val, _values, result); end
-
- def _reduce_537(val, _values, result); end
-
- def _reduce_538(val, _values, result); end
-
- def _reduce_539(val, _values, result); end
-
- def _reduce_540(val, _values, result); end
-
- def _reduce_541(val, _values, result); end
-
- def _reduce_542(val, _values, result); end
-
- def _reduce_543(val, _values, result); end
-
- def _reduce_544(val, _values, result); end
-
- def _reduce_545(val, _values, result); end
-
- def _reduce_546(val, _values, result); end
-
- def _reduce_547(val, _values, result); end
-
- def _reduce_55(val, _values, result); end
-
- def _reduce_550(val, _values, result); end
-
- def _reduce_551(val, _values, result); end
-
- def _reduce_552(val, _values, result); end
-
- def _reduce_553(val, _values, result); end
-
- def _reduce_554(val, _values, result); end
-
- def _reduce_555(val, _values, result); end
-
- def _reduce_556(val, _values, result); end
-
- def _reduce_557(val, _values, result); end
-
- def _reduce_56(val, _values, result); end
-
- def _reduce_560(val, _values, result); end
-
- def _reduce_561(val, _values, result); end
-
- def _reduce_564(val, _values, result); end
-
- def _reduce_565(val, _values, result); end
-
- def _reduce_566(val, _values, result); end
-
- def _reduce_568(val, _values, result); end
-
- def _reduce_569(val, _values, result); end
-
- def _reduce_57(val, _values, result); end
-
- def _reduce_571(val, _values, result); end
-
- def _reduce_572(val, _values, result); end
-
- def _reduce_573(val, _values, result); end
-
- def _reduce_574(val, _values, result); end
-
- def _reduce_575(val, _values, result); end
-
- def _reduce_576(val, _values, result); end
-
- def _reduce_589(val, _values, result); end
-
- def _reduce_59(val, _values, result); end
-
- def _reduce_590(val, _values, result); end
-
- def _reduce_595(val, _values, result); end
-
- def _reduce_596(val, _values, result); end
-
- def _reduce_6(val, _values, result); end
-
- def _reduce_60(val, _values, result); end
-
- def _reduce_600(val, _values, result); end
-
- def _reduce_604(val, _values, result); end
-
- def _reduce_61(val, _values, result); end
-
- def _reduce_62(val, _values, result); end
-
- def _reduce_63(val, _values, result); end
-
- def _reduce_64(val, _values, result); end
-
- def _reduce_65(val, _values, result); end
-
- def _reduce_66(val, _values, result); end
-
- def _reduce_67(val, _values, result); end
-
- def _reduce_68(val, _values, result); end
-
- def _reduce_69(val, _values, result); end
-
- def _reduce_70(val, _values, result); end
-
- def _reduce_71(val, _values, result); end
-
- def _reduce_72(val, _values, result); end
-
- def _reduce_73(val, _values, result); end
-
- def _reduce_75(val, _values, result); end
-
- def _reduce_76(val, _values, result); end
-
- def _reduce_77(val, _values, result); end
-
- def _reduce_78(val, _values, result); end
-
- def _reduce_79(val, _values, result); end
-
- def _reduce_8(val, _values, result); end
-
- def _reduce_80(val, _values, result); end
-
- def _reduce_81(val, _values, result); end
-
- def _reduce_82(val, _values, result); end
-
- def _reduce_83(val, _values, result); end
-
- def _reduce_85(val, _values, result); end
-
- def _reduce_86(val, _values, result); end
-
- def _reduce_87(val, _values, result); end
-
- def _reduce_88(val, _values, result); end
-
- def _reduce_89(val, _values, result); end
-
- def _reduce_9(val, _values, result); end
-
- def _reduce_90(val, _values, result); end
-
- def _reduce_91(val, _values, result); end
-
- def _reduce_92(val, _values, result); end
-
- def _reduce_93(val, _values, result); end
-
- def _reduce_94(val, _values, result); end
-
- def _reduce_95(val, _values, result); end
-
- def _reduce_96(val, _values, result); end
-
- def _reduce_97(val, _values, result); end
-
- def _reduce_98(val, _values, result); end
-
- def _reduce_99(val, _values, result); end
-
- def _reduce_none(val, _values, result); end
-
- def default_encoding(); end
-
- def version(); end
- Racc_arg = ::T.let(nil, ::T.untyped)
- Racc_debug_parser = ::T.let(nil, ::T.untyped)
- Racc_token_to_s_table = ::T.let(nil, ::T.untyped)
-end
-
class Parser::Ruby24
-end
-
-class Parser::Ruby26
def _reduce_10(val, _values, result); end
def _reduce_100(val, _values, result); end
@@ -15107,42 +14221,42 @@ class Parser::Ruby26
def _reduce_108(val, _values, result); end
- def _reduce_109(val, _values, result); end
-
def _reduce_11(val, _values, result); end
def _reduce_110(val, _values, result); end
def _reduce_111(val, _values, result); end
- def _reduce_113(val, _values, result); end
-
- def _reduce_114(val, _values, result); end
+ def _reduce_112(val, _values, result); end
- def _reduce_115(val, _values, result); end
+ def _reduce_118(val, _values, result); end
def _reduce_12(val, _values, result); end
- def _reduce_121(val, _values, result); end
-
- def _reduce_125(val, _values, result); end
+ def _reduce_122(val, _values, result); end
- def _reduce_126(val, _values, result); end
+ def _reduce_123(val, _values, result); end
- def _reduce_127(val, _values, result); end
+ def _reduce_124(val, _values, result); end
def _reduce_13(val, _values, result); end
def _reduce_14(val, _values, result); end
- def _reduce_15(val, _values, result); end
+ def _reduce_16(val, _values, result); end
def _reduce_17(val, _values, result); end
def _reduce_18(val, _values, result); end
def _reduce_19(val, _values, result); end
+ def _reduce_196(val, _values, result); end
+
+ def _reduce_197(val, _values, result); end
+
+ def _reduce_198(val, _values, result); end
+
def _reduce_199(val, _values, result); end
def _reduce_2(val, _values, result); end
@@ -15203,6 +14317,8 @@ class Parser::Ruby26
def _reduce_224(val, _values, result); end
+ def _reduce_225(val, _values, result); end
+
def _reduce_226(val, _values, result); end
def _reduce_227(val, _values, result); end
@@ -15227,30 +14343,38 @@ class Parser::Ruby26
def _reduce_236(val, _values, result); end
- def _reduce_237(val, _values, result); end
+ def _reduce_24(val, _values, result); end
- def _reduce_238(val, _values, result); end
+ def _reduce_241(val, _values, result); end
- def _reduce_24(val, _values, result); end
+ def _reduce_242(val, _values, result); end
def _reduce_244(val, _values, result); end
def _reduce_245(val, _values, result); end
- def _reduce_249(val, _values, result); end
+ def _reduce_246(val, _values, result); end
+
+ def _reduce_248(val, _values, result); end
def _reduce_25(val, _values, result); end
- def _reduce_250(val, _values, result); end
+ def _reduce_251(val, _values, result); end
def _reduce_252(val, _values, result); end
def _reduce_253(val, _values, result); end
def _reduce_254(val, _values, result); end
+ def _reduce_255(val, _values, result); end
+
def _reduce_256(val, _values, result); end
+ def _reduce_257(val, _values, result); end
+
+ def _reduce_258(val, _values, result); end
+
def _reduce_259(val, _values, result); end
def _reduce_26(val, _values, result); end
@@ -15271,8 +14395,6 @@ class Parser::Ruby26
def _reduce_267(val, _values, result); end
- def _reduce_268(val, _values, result); end
-
def _reduce_269(val, _values, result); end
def _reduce_27(val, _values, result); end
@@ -15281,23 +14403,23 @@ class Parser::Ruby26
def _reduce_271(val, _values, result); end
- def _reduce_272(val, _values, result); end
+ def _reduce_28(val, _values, result); end
- def _reduce_273(val, _values, result); end
+ def _reduce_282(val, _values, result); end
- def _reduce_274(val, _values, result); end
+ def _reduce_283(val, _values, result); end
- def _reduce_275(val, _values, result); end
+ def _reduce_284(val, _values, result); end
- def _reduce_277(val, _values, result); end
+ def _reduce_285(val, _values, result); end
- def _reduce_278(val, _values, result); end
+ def _reduce_286(val, _values, result); end
- def _reduce_279(val, _values, result); end
+ def _reduce_287(val, _values, result); end
- def _reduce_28(val, _values, result); end
+ def _reduce_288(val, _values, result); end
- def _reduce_29(val, _values, result); end
+ def _reduce_289(val, _values, result); end
def _reduce_290(val, _values, result); end
@@ -15321,12 +14443,12 @@ class Parser::Ruby26
def _reduce_3(val, _values, result); end
+ def _reduce_30(val, _values, result); end
+
def _reduce_300(val, _values, result); end
def _reduce_301(val, _values, result); end
- def _reduce_302(val, _values, result); end
-
def _reduce_303(val, _values, result); end
def _reduce_304(val, _values, result); end
@@ -15343,6 +14465,8 @@ class Parser::Ruby26
def _reduce_31(val, _values, result); end
+ def _reduce_310(val, _values, result); end
+
def _reduce_311(val, _values, result); end
def _reduce_312(val, _values, result); end
@@ -15383,8 +14507,6 @@ class Parser::Ruby26
def _reduce_329(val, _values, result); end
- def _reduce_33(val, _values, result); end
-
def _reduce_330(val, _values, result); end
def _reduce_331(val, _values, result); end
@@ -15393,28 +14515,30 @@ class Parser::Ruby26
def _reduce_333(val, _values, result); end
- def _reduce_334(val, _values, result); end
-
- def _reduce_335(val, _values, result); end
-
def _reduce_337(val, _values, result); end
- def _reduce_340(val, _values, result); end
+ def _reduce_34(val, _values, result); end
+
+ def _reduce_341(val, _values, result); end
- def _reduce_344(val, _values, result); end
+ def _reduce_343(val, _values, result); end
def _reduce_346(val, _values, result); end
+ def _reduce_347(val, _values, result); end
+
+ def _reduce_348(val, _values, result); end
+
def _reduce_349(val, _values, result); end
def _reduce_35(val, _values, result); end
- def _reduce_350(val, _values, result); end
-
def _reduce_351(val, _values, result); end
def _reduce_352(val, _values, result); end
+ def _reduce_353(val, _values, result); end
+
def _reduce_354(val, _values, result); end
def _reduce_355(val, _values, result); end
@@ -15451,12 +14575,12 @@ class Parser::Ruby26
def _reduce_37(val, _values, result); end
- def _reduce_370(val, _values, result); end
-
def _reduce_371(val, _values, result); end
def _reduce_372(val, _values, result); end
+ def _reduce_373(val, _values, result); end
+
def _reduce_374(val, _values, result); end
def _reduce_375(val, _values, result); end
@@ -15467,14 +14591,14 @@ class Parser::Ruby26
def _reduce_378(val, _values, result); end
- def _reduce_379(val, _values, result); end
-
def _reduce_38(val, _values, result); end
def _reduce_380(val, _values, result); end
def _reduce_381(val, _values, result); end
+ def _reduce_382(val, _values, result); end
+
def _reduce_383(val, _values, result); end
def _reduce_384(val, _values, result); end
@@ -15491,12 +14615,12 @@ class Parser::Ruby26
def _reduce_39(val, _values, result); end
- def _reduce_390(val, _values, result); end
-
def _reduce_391(val, _values, result); end
def _reduce_392(val, _values, result); end
+ def _reduce_393(val, _values, result); end
+
def _reduce_394(val, _values, result); end
def _reduce_395(val, _values, result); end
@@ -15555,8 +14679,6 @@ class Parser::Ruby26
def _reduce_419(val, _values, result); end
- def _reduce_42(val, _values, result); end
-
def _reduce_420(val, _values, result); end
def _reduce_421(val, _values, result); end
@@ -15569,23 +14691,23 @@ class Parser::Ruby26
def _reduce_425(val, _values, result); end
- def _reduce_426(val, _values, result); end
-
def _reduce_427(val, _values, result); end
def _reduce_428(val, _values, result); end
- def _reduce_430(val, _values, result); end
+ def _reduce_429(val, _values, result); end
- def _reduce_431(val, _values, result); end
+ def _reduce_43(val, _values, result); end
def _reduce_432(val, _values, result); end
- def _reduce_435(val, _values, result); end
+ def _reduce_434(val, _values, result); end
+
+ def _reduce_439(val, _values, result); end
- def _reduce_437(val, _values, result); end
+ def _reduce_440(val, _values, result); end
- def _reduce_44(val, _values, result); end
+ def _reduce_441(val, _values, result); end
def _reduce_442(val, _values, result); end
@@ -15623,6 +14745,8 @@ class Parser::Ruby26
def _reduce_459(val, _values, result); end
+ def _reduce_46(val, _values, result); end
+
def _reduce_460(val, _values, result); end
def _reduce_461(val, _values, result); end
@@ -15653,12 +14777,12 @@ class Parser::Ruby26
def _reduce_473(val, _values, result); end
- def _reduce_474(val, _values, result); end
-
def _reduce_475(val, _values, result); end
def _reduce_476(val, _values, result); end
+ def _reduce_477(val, _values, result); end
+
def _reduce_478(val, _values, result); end
def _reduce_479(val, _values, result); end
@@ -15709,8 +14833,6 @@ class Parser::Ruby26
def _reduce_5(val, _values, result); end
- def _reduce_50(val, _values, result); end
-
def _reduce_500(val, _values, result); end
def _reduce_501(val, _values, result); end
@@ -15771,18 +14893,16 @@ class Parser::Ruby26
def _reduce_529(val, _values, result); end
- def _reduce_53(val, _values, result); end
-
def _reduce_530(val, _values, result); end
def _reduce_531(val, _values, result); end
- def _reduce_532(val, _values, result); end
-
def _reduce_533(val, _values, result); end
def _reduce_534(val, _values, result); end
+ def _reduce_535(val, _values, result); end
+
def _reduce_536(val, _values, result); end
def _reduce_537(val, _values, result); end
@@ -15791,8 +14911,6 @@ class Parser::Ruby26
def _reduce_539(val, _values, result); end
- def _reduce_54(val, _values, result); end
-
def _reduce_540(val, _values, result); end
def _reduce_541(val, _values, result); end
@@ -15809,12 +14927,14 @@ class Parser::Ruby26
def _reduce_547(val, _values, result); end
- def _reduce_548(val, _values, result); end
-
- def _reduce_549(val, _values, result); end
+ def _reduce_55(val, _values, result); end
def _reduce_550(val, _values, result); end
+ def _reduce_551(val, _values, result); end
+
+ def _reduce_552(val, _values, result); end
+
def _reduce_553(val, _values, result); end
def _reduce_554(val, _values, result); end
@@ -15825,57 +14945,55 @@ class Parser::Ruby26
def _reduce_557(val, _values, result); end
- def _reduce_558(val, _values, result); end
-
- def _reduce_559(val, _values, result); end
+ def _reduce_56(val, _values, result); end
def _reduce_560(val, _values, result); end
- def _reduce_563(val, _values, result); end
+ def _reduce_561(val, _values, result); end
def _reduce_564(val, _values, result); end
- def _reduce_567(val, _values, result); end
+ def _reduce_565(val, _values, result); end
+
+ def _reduce_566(val, _values, result); end
def _reduce_568(val, _values, result); end
def _reduce_569(val, _values, result); end
+ def _reduce_57(val, _values, result); end
+
def _reduce_571(val, _values, result); end
def _reduce_572(val, _values, result); end
+ def _reduce_573(val, _values, result); end
+
def _reduce_574(val, _values, result); end
def _reduce_575(val, _values, result); end
def _reduce_576(val, _values, result); end
- def _reduce_577(val, _values, result); end
-
- def _reduce_578(val, _values, result); end
-
- def _reduce_579(val, _values, result); end
-
- def _reduce_58(val, _values, result); end
+ def _reduce_589(val, _values, result); end
def _reduce_59(val, _values, result); end
- def _reduce_592(val, _values, result); end
-
- def _reduce_593(val, _values, result); end
+ def _reduce_590(val, _values, result); end
- def _reduce_598(val, _values, result); end
+ def _reduce_595(val, _values, result); end
- def _reduce_599(val, _values, result); end
+ def _reduce_596(val, _values, result); end
def _reduce_6(val, _values, result); end
def _reduce_60(val, _values, result); end
- def _reduce_603(val, _values, result); end
+ def _reduce_600(val, _values, result); end
+
+ def _reduce_604(val, _values, result); end
- def _reduce_607(val, _values, result); end
+ def _reduce_61(val, _values, result); end
def _reduce_62(val, _values, result); end
@@ -15901,12 +15019,12 @@ class Parser::Ruby26
def _reduce_73(val, _values, result); end
- def _reduce_74(val, _values, result); end
-
def _reduce_75(val, _values, result); end
def _reduce_76(val, _values, result); end
+ def _reduce_77(val, _values, result); end
+
def _reduce_78(val, _values, result); end
def _reduce_79(val, _values, result); end
@@ -15921,12 +15039,12 @@ class Parser::Ruby26
def _reduce_83(val, _values, result); end
- def _reduce_84(val, _values, result); end
-
def _reduce_85(val, _values, result); end
def _reduce_86(val, _values, result); end
+ def _reduce_87(val, _values, result); end
+
def _reduce_88(val, _values, result); end
def _reduce_89(val, _values, result); end
@@ -15963,7 +15081,11 @@ class Parser::Ruby26
Racc_token_to_s_table = ::T.let(nil, ::T.untyped)
end
+class Parser::Ruby24
+end
+
class Parser::Ruby26
+ Racc_debug_parser = ::T.let(nil, ::T.untyped)
end
class Pathname
@@ -20092,17 +19214,29 @@ module RuboCop::AST::CollectionNode
end
class RuboCop::AST::Node
- def block_args(node=T.unsafe(nil)); end
+ def block_args(param0=T.unsafe(nil)); end
+
+ def block_body(param0=T.unsafe(nil)); end
- def block_body(node=T.unsafe(nil)); end
+ def cask_block?(param0=T.unsafe(nil)); end
- def cask_block?(node=T.unsafe(nil)); end
+ def key_node(param0=T.unsafe(nil)); end
- def key_node(node=T.unsafe(nil)); end
+ def method_node(param0=T.unsafe(nil)); end
- def method_node(node=T.unsafe(nil)); end
+ def val_node(param0=T.unsafe(nil)); end
+end
+
+class RuboCop::AST::NodePattern::Parser
+ Racc_debug_parser = ::T.let(nil, ::T.untyped)
+end
- def val_node(node=T.unsafe(nil)); end
+module RuboCop::AST::NodePattern::Sets
+ SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped)
+ SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped)
+ SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
+ SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
+ SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
end
class RuboCop::Cask::AST::CaskBlock
@@ -20244,79 +19378,79 @@ class RuboCop::Cop::Cop
end
class RuboCop::Cop::FormulaAudit::ComponentsOrder
- def depends_on_node?(node=T.unsafe(nil)); end
+ def depends_on_node?(param0=T.unsafe(nil)); end
end
class RuboCop::Cop::FormulaAudit::DependencyOrder
- def build_with_dependency_node(node0); end
+ def build_with_dependency_node(param0); end
- def buildtime_dependency?(node0); end
+ def buildtime_dependency?(param0); end
- def dependency_name_node(node0); end
+ def dependency_name_node(param0); end
- def depends_on_node?(node=T.unsafe(nil)); end
+ def depends_on_node?(param0=T.unsafe(nil)); end
- def negate_normal_dependency?(node0); end
+ def negate_normal_dependency?(param0); end
- def optional_dependency?(node0); end
+ def optional_dependency?(param0); end
- def recommended_dependency?(node0); end
+ def recommended_dependency?(param0); end
- def test_dependency?(node0); end
+ def test_dependency?(param0); end
- def uses_from_macos_node?(node=T.unsafe(nil)); end
+ def uses_from_macos_node?(param0=T.unsafe(nil)); end
end
class RuboCop::Cop::FormulaAudit::DeprecateDisableDate
- def date(node0); end
+ def date(param0); end
end
class RuboCop::Cop::FormulaAudit::DeprecateDisableReason
- def reason(node0); end
+ def reason(param0); end
end
class RuboCop::Cop::FormulaAudit::Miscellaneous
- def conditional_dependencies(node0); end
+ def conditional_dependencies(param0); end
- def destructure_hash(node=T.unsafe(nil)); end
+ def destructure_hash(param0=T.unsafe(nil)); end
- def formula_path_strings(node0, param1); end
+ def formula_path_strings(param0, param1); end
- def hash_dep(node=T.unsafe(nil)); end
+ def hash_dep(param0=T.unsafe(nil)); end
- def languageNodeModule?(node0); end
+ def languageNodeModule?(param0); end
end
class RuboCop::Cop::FormulaAudit::OptionDeclarations
- def depends_on_build_with(node0); end
+ def depends_on_build_with(param0); end
end
class RuboCop::Cop::FormulaAudit::Patches
- def patch_data?(node0); end
+ def patch_data?(param0); end
end
class RuboCop::Cop::FormulaAudit::Test
- def test_calls(node0); end
+ def test_calls(param0); end
end
class RuboCop::Cop::FormulaAudit::Text
- def prefix_path(node0); end
+ def prefix_path(param0); end
end
class RuboCop::Cop::FormulaAuditStrict::Text
- def interpolated_share_path_starts_with(node0, param1); end
+ def interpolated_share_path_starts_with(param0, param1); end
- def share_path_starts_with(node0, param1); end
+ def share_path_starts_with(param0, param1); end
end
class RuboCop::Cop::FormulaCop
- def dependency_name_hash_match?(node0, param1); end
+ def dependency_name_hash_match?(param0, param1); end
- def dependency_type_hash_match?(node0, param1); end
+ def dependency_type_hash_match?(param0, param1); end
- def required_dependency?(node0); end
+ def required_dependency?(param0); end
- def required_dependency_name?(node0, param1); end
+ def required_dependency_name?(param0, param1); end
end
module RuboCop::RSpec::ExpectOffense | true |
Other | Homebrew | brew | fc9a74dd282b6a00bfaa663d901b478f4f937c4b.json | Prevent tapping `phinze/cask`. | Library/Homebrew/tap.rb | @@ -235,7 +235,7 @@ def install(full_clone: true, quiet: false, clone_target: nil, force_auto_update
if official? && DEPRECATED_OFFICIAL_TAPS.include?(repo)
odie "#{name} was deprecated. This tap is now empty and all its contents were either deleted or migrated."
- elsif user == "caskroom"
+ elsif user == "caskroom" || name == "phinze/cask"
new_repo = repo == "cask" ? "cask" : "cask-#{repo}"
odie "#{name} was moved. Tap homebrew/#{new_repo} instead."
end | false |
Other | Homebrew | brew | 0c74d93939e67e6929a6e581506cf33892f252c6.json | Fix man page difference on Linux. | Library/Homebrew/cask/cmd/abstract_command.rb | @@ -1,6 +1,5 @@
# frozen_string_literal: true
-require "cask/config"
require "search"
module Cask
@@ -35,8 +34,7 @@ def self.banner_headline
OPTIONS = [
[:switch, "--[no-]binaries", {
- description: "Disable/enable linking of helper executables to `#{Config.global.binarydir}`. " \
- "Default: enabled",
+ description: "Disable/enable linking of helper executables. Default: enabled",
env: :cask_opts_binaries,
}],
[:switch, "--require-sha", { | true |
Other | Homebrew | brew | 0c74d93939e67e6929a6e581506cf33892f252c6.json | Fix man page difference on Linux. | docs/Manpage.md | @@ -382,7 +382,7 @@ installed formulae or, every 30 days, for all formulae.
* `--language`:
Set language of the Cask to install. The first matching language is used, otherwise the default language on the Cask. The default value is the `language of your system`
* `--[no-]binaries`:
- Disable/enable linking of helper executables to `/usr/local/bin`. Default: enabled
+ Disable/enable linking of helper executables. Default: enabled
* `--require-sha`:
Require all casks to have a checksum.
* `--[no-]quarantine`: | true |
Other | Homebrew | brew | 0c74d93939e67e6929a6e581506cf33892f252c6.json | Fix man page difference on Linux. | manpages/brew.1 | @@ -593,7 +593,7 @@ Set language of the Cask to install\. The first matching language is used, other
.
.TP
\fB\-\-[no\-]binaries\fR
-Disable/enable linking of helper executables to \fB/usr/local/bin\fR\. Default: enabled
+Disable/enable linking of helper executables\. Default: enabled
.
.TP
\fB\-\-require\-sha\fR | true |
Other | Homebrew | brew | 08be729af04de693d7f44f3a3b216c3e15172dcb.json | Support all cask options in `brew install`. | Library/Homebrew/cask/cmd.rb | @@ -79,6 +79,70 @@ def self.description
EOS
end
+ OPTIONS = [
+ [:flag, "--appdir=", {
+ description: "Target location for Applications. " \
+ "Default: `#{Config::DEFAULT_DIRS[:appdir]}`",
+ }],
+ [:flag, "--colorpickerdir=", {
+ description: "Target location for Color Pickers. " \
+ "Default: `#{Config::DEFAULT_DIRS[:colorpickerdir]}`",
+ }],
+ [:flag, "--prefpanedir=", {
+ description: "Target location for Preference Panes. " \
+ "Default: `#{Config::DEFAULT_DIRS[:prefpanedir]}`",
+ }],
+ [:flag, "--qlplugindir=", {
+ description: "Target location for QuickLook Plugins. " \
+ "Default: `#{Config::DEFAULT_DIRS[:qlplugindir]}`",
+ }],
+ [:flag, "--mdimporterdir=", {
+ description: "Target location for Spotlight Plugins. " \
+ "Default: `#{Config::DEFAULT_DIRS[:mdimporterdir]}`",
+ }],
+ [:flag, "--dictionarydir=", {
+ description: "Target location for Dictionaries. " \
+ "Default: `#{Config::DEFAULT_DIRS[:dictionarydir]}`",
+ }],
+ [:flag, "--fontdir=", {
+ description: "Target location for Fonts. " \
+ "Default: `#{Config::DEFAULT_DIRS[:fontdir]}`",
+ }],
+ [:flag, "--servicedir=", {
+ description: "Target location for Services. " \
+ "Default: `#{Config::DEFAULT_DIRS[:servicedir]}`",
+ }],
+ [:flag, "--input_methoddir=", {
+ description: "Target location for Input Methods. " \
+ "Default: `#{Config::DEFAULT_DIRS[:input_methoddir]}`",
+ }],
+ [:flag, "--internet_plugindir=", {
+ description: "Target location for Internet Plugins. " \
+ "Default: `#{Config::DEFAULT_DIRS[:internet_plugindir]}`",
+ }],
+ [:flag, "--audio_unit_plugindir=", {
+ description: "Target location for Audio Unit Plugins. " \
+ "Default: `#{Config::DEFAULT_DIRS[:audio_unit_plugindir]}`",
+ }],
+ [:flag, "--vst_plugindir=", {
+ description: "Target location for VST Plugins. " \
+ "Default: `#{Config::DEFAULT_DIRS[:vst_plugindir]}`",
+ }],
+ [:flag, "--vst3_plugindir=", {
+ description: "Target location for VST3 Plugins. " \
+ "Default: `#{Config::DEFAULT_DIRS[:vst3_plugindir]}`",
+ }],
+ [:flag, "--screen_saverdir=", {
+ description: "Target location for Screen Savers. " \
+ "Default: `#{Config::DEFAULT_DIRS[:screen_saverdir]}`",
+ }],
+ [:comma_array, "--language", {
+ description: "Set language of the Cask to install. The first matching " \
+ "language is used, otherwise the default language on the Cask. " \
+ "The default value is the `language of your system`",
+ }],
+ ].freeze
+
def self.parser(&block)
Homebrew::CLI::Parser.new do
if block_given?
@@ -91,52 +155,9 @@ def self.parser(&block)
EOS
end
- flag "--appdir=",
- description: "Target location for Applications. " \
- "Default: `#{Config::DEFAULT_DIRS[:appdir]}`"
- flag "--colorpickerdir=",
- description: "Target location for Color Pickers. " \
- "Default: `#{Config::DEFAULT_DIRS[:colorpickerdir]}`"
- flag "--prefpanedir=",
- description: "Target location for Preference Panes. " \
- "Default: `#{Config::DEFAULT_DIRS[:prefpanedir]}`"
- flag "--qlplugindir=",
- description: "Target location for QuickLook Plugins. " \
- "Default: `#{Config::DEFAULT_DIRS[:qlplugindir]}`"
- flag "--mdimporterdir=",
- description: "Target location for Spotlight Plugins. " \
- "Default: `#{Config::DEFAULT_DIRS[:mdimporterdir]}`"
- flag "--dictionarydir=",
- description: "Target location for Dictionaries. " \
- "Default: `#{Config::DEFAULT_DIRS[:dictionarydir]}`"
- flag "--fontdir=",
- description: "Target location for Fonts. " \
- "Default: `#{Config::DEFAULT_DIRS[:fontdir]}`"
- flag "--servicedir=",
- description: "Target location for Services. " \
- "Default: `#{Config::DEFAULT_DIRS[:servicedir]}`"
- flag "--input_methoddir=",
- description: "Target location for Input Methods. " \
- "Default: `#{Config::DEFAULT_DIRS[:input_methoddir]}`"
- flag "--internet_plugindir=",
- description: "Target location for Internet Plugins. " \
- "Default: `#{Config::DEFAULT_DIRS[:internet_plugindir]}`"
- flag "--audio_unit_plugindir=",
- description: "Target location for Audio Unit Plugins. " \
- "Default: `#{Config::DEFAULT_DIRS[:audio_unit_plugindir]}`"
- flag "--vst_plugindir=",
- description: "Target location for VST Plugins. " \
- "Default: `#{Config::DEFAULT_DIRS[:vst_plugindir]}`"
- flag "--vst3_plugindir=",
- description: "Target location for VST3 Plugins. " \
- "Default: `#{Config::DEFAULT_DIRS[:vst3_plugindir]}`"
- flag "--screen_saverdir=",
- description: "Target location for Screen Savers. " \
- "Default: `#{Config::DEFAULT_DIRS[:screen_saverdir]}`"
- comma_array "--language",
- description: "Set language of the Cask to install. The first matching " \
- "language is used, otherwise the default language on the Cask. " \
- "The default value is the `language of your system`"
+ OPTIONS.each do |option|
+ send(*option)
+ end
end
end
| true |
Other | Homebrew | brew | 08be729af04de693d7f44f3a3b216c3e15172dcb.json | Support all cask options in `brew install`. | Library/Homebrew/cask/cmd/abstract_command.rb | @@ -33,6 +33,22 @@ def self.banner_headline
"`#{command_name}` [<options>]#{banner_args}"
end
+ OPTIONS = [
+ [:switch, "--[no-]binaries", {
+ description: "Disable/enable linking of helper executables to `#{Config.global.binarydir}`. " \
+ "Default: enabled",
+ env: :cask_opts_binaries,
+ }],
+ [:switch, "--require-sha", {
+ description: "Require all casks to have a checksum.",
+ env: :cask_opts_require_sha,
+ }],
+ [:switch, "--[no-]quarantine", {
+ description: "Disable/enable quarantining of downloads. Default: enabled",
+ env: :cask_opts_quarantine,
+ }],
+ ].freeze
+
def self.parser(&block)
banner = <<~EOS
`cask` #{banner_headline}
@@ -48,18 +64,9 @@ def self.parser(&block)
instance_eval(&block) if block_given?
- switch "--[no-]binaries",
- description: "Disable/enable linking of helper executables to `#{Config.global.binarydir}`. " \
- "Default: enabled",
- env: :cask_opts_binaries
-
- switch "--require-sha",
- description: "Require all casks to have a checksum.",
- env: :cask_opts_require_sha
-
- switch "--[no-]quarantine",
- description: "Disable/enable quarantining of downloads. Default: enabled",
- env: :cask_opts_quarantine
+ OPTIONS.each do |option|
+ send(*option)
+ end
min_named min_n unless min_n.nil?
max_named max_n unless max_n.nil? | true |
Other | Homebrew | brew | 08be729af04de693d7f44f3a3b216c3e15172dcb.json | Support all cask options in `brew install`. | Library/Homebrew/cask/cmd/install.rb | @@ -14,12 +14,20 @@ def self.description
"Installs the given <cask>."
end
+ OPTIONS = [
+ [:switch, "--skip-cask-deps", {
+ description: "Skip installing cask dependencies.",
+ }],
+ ].freeze
+
def self.parser(&block)
super do
switch "--force",
description: "Force overwriting existing files."
- switch "--skip-cask-deps",
- description: "Skip installing cask dependencies."
+
+ OPTIONS.each do |option|
+ send(*option)
+ end
instance_eval(&block) if block_given?
end | true |
Other | Homebrew | brew | 08be729af04de693d7f44f3a3b216c3e15172dcb.json | Support all cask options in `brew install`. | Library/Homebrew/cmd/install.rb | @@ -1,6 +1,8 @@
# frozen_string_literal: true
require "cask/config"
+require "cask/cmd"
+require "cask/cmd/install"
require "missing_formula"
require "formula_installer"
require "development_tools"
@@ -16,110 +18,94 @@ module Homebrew
module_function
def install_args
- cask_only_options = {
- ["--cask", "--casks"] => {
+ cask_only_options = [
+ [:switch, "--cask", "--casks", {
description: "Treat all named arguments as casks.",
- },
- ["--[no-]binaries"] => {
- description: "Disable/enable linking of helper executables to `#{Cask::Config.global.binarydir}`. " \
- "Default: enabled",
- env: :cask_opts_binaries,
- },
- ["--require-sha"] => {
- description: "Require all casks to have a checksum.",
- env: :cask_opts_require_sha,
- },
- ["--[no-]quarantine"] => {
- description: "Disable/enable quarantining of downloads. Default: enabled",
- env: :cask_opts_quarantine,
- },
- ["--skip-cask-deps"] => {
- description: "Skip installing cask dependencies.",
- },
- }.freeze
-
- formula_only_options = {
- ["--formula", "--formulae"] => {
+ }],
+ *Cask::Cmd::OPTIONS,
+ *Cask::Cmd::AbstractCommand::OPTIONS,
+ *Cask::Cmd::Install::OPTIONS,
+ ]
+
+ formula_only_options = [
+ [:switch, "--formula", "--formulae", {
description: "Treat all named arguments as formulae.",
- },
- ["--env="] => {
+ }],
+ [:flag, "--env=", {
description: "If `std` is passed, use the standard build environment instead of superenv. "\
"If `super` is passed, use superenv even if the formula specifies the "\
"standard build environment.",
- },
- ["--ignore-dependencies"] => {
+ }],
+ [:switch, "--ignore-dependencies", {
description: "An unsupported Homebrew development flag to skip installing any dependencies of "\
"any kind. If the dependencies are not already present, the formula will have issues. "\
"If you're not developing Homebrew, consider adjusting your PATH rather than "\
"using this flag.",
- },
- ["--only-dependencies"] => {
+ }],
+ [:switch, "--only-dependencies", {
description: "Install the dependencies with specified options but do not install the "\
"formula itself.",
- },
- ["--cc="] => {
+ }],
+ [:flag, "--cc=", {
description: "Attempt to compile using the specified <compiler>, which should be the "\
"name of the compiler's executable, e.g. `gcc-7` for GCC 7. "\
"In order to use LLVM's clang, specify `llvm_clang`. To use the "\
"Apple-provided clang, specify `clang`. This option will only accept "\
"compilers that are provided by Homebrew or bundled with macOS. "\
"Please do not file issues if you encounter errors while using this option.",
- },
- ["-s", "--build-from-source"] => {
+ }],
+ [:switch, "-s", "--build-from-source", {
description: "Compile <formula> from source even if a bottle is provided. "\
"Dependencies will still be installed from bottles if they are available.",
- },
- ["--force-bottle"] => {
+ }],
+ [:switch, "--force-bottle", {
description: "Install from a bottle if it exists for the current or newest version of "\
"macOS, even if it would not normally be used for installation.",
- },
- ["--include-test"] => {
+ }],
+ [:switch, "--include-test", {
description: "Install testing dependencies required to run `brew test` <formula>.",
- },
- ["--HEAD"] => {
+ }],
+ [:switch, "--HEAD", {
description: "If <formula> defines it, install the HEAD version, aka. master, trunk, unstable.",
- },
- ["--fetch-HEAD"] => {
+ }], [:switch, "--fetch-HEAD", {
description: "Fetch the upstream repository to detect if the HEAD installation of the "\
"formula is outdated. Otherwise, the repository's HEAD will only be checked for "\
"updates when a new stable or development version has been released.",
- },
- ["--keep-tmp"] => {
+ }], [:switch, "--keep-tmp", {
description: "Retain the temporary files created during installation.",
- },
- ["--build-bottle"] => {
+ }], [:switch, "--build-bottle", {
description: "Prepare the formula for eventual bottling during installation, skipping any "\
"post-install steps.",
- },
- ["--bottle-arch="] => {
+ }],
+ [:flag, "--bottle-arch=", {
depends_on: "--build-bottle",
description: "Optimise bottles for the specified architecture rather than the oldest "\
"architecture supported by the version of macOS the bottles are built on.",
- },
- ["--display-times"] => {
+ }],
+ [:switch, "--display-times", {
env: :display_install_times,
description: "Print install times for each formula at the end of the run.",
- },
- ["-i", "--interactive"] => {
+ }],
+ [:switch, "-i", "--interactive", {
description: "Download and patch <formula>, then open a shell. This allows the user to "\
"run `./configure --help` and otherwise determine how to turn the software "\
"package into a Homebrew package.",
- },
- ["-g", "--git"] => {
+ }],
+ [:switch, "-g", "--git", {
description: "Create a Git repository, useful for creating patches to the software.",
- },
- }.freeze
+ }]
+ ]
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
@@ -134,27 +120,22 @@ def install_args
description: "If brewing fails, open an interactive debugging session with access to IRB "\
"or a shell inside the temporary build directory."
switch "-f", "--force",
- description: "Install without checking for previously installed keg-only or "\
- "non-migrated versions."
+ description: "Install formulae without checking for previously installed keg-only or "\
+ "non-migrated versions. Overwrite existing files when installing casks."
switch "-v", "--verbose",
description: "Print the verification and postinstall steps."
conflicts "--ignore-dependencies", "--only-dependencies"
conflicts "--build-from-source", "--build-bottle", "--force-bottle"
- formula_only_options.each do |flags, **options|
- if flags.last.end_with?("=")
- flag(*flags, **options)
- else
- switch(*flags, **options)
- end
-
- conflicts "--cask", flags.last
+ formula_only_options.each do |options|
+ send(*options)
+ conflicts "--cask", options[-2]
end
- cask_only_options.each do |flags, **options|
- switch(*flags, **options)
- conflicts "--formula", flags.last
+ cask_only_options.each do |options|
+ send(*options)
+ conflicts "--formula", options[-2]
end
formula_options
@@ -187,8 +168,6 @@ def install
formulae, casks = formulae_or_casks.partition { |formula_or_cask| formula_or_cask.is_a?(Formula) }
if casks.any?
- require "cask/cmd/install"
-
Cask::Cmd::Install.install_casks(
*casks,
binaries: args.binaries?, | true |
Other | Homebrew | brew | 08be729af04de693d7f44f3a3b216c3e15172dcb.json | Support all cask options in `brew install`. | docs/Manpage.md | @@ -314,7 +314,7 @@ installed formulae or, every 30 days, for all formulae.
* `-d`, `--debug`:
If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory.
* `-f`, `--force`:
- Install without checking for previously installed keg-only or non-migrated versions.
+ Install formulae without checking for previously installed keg-only or non-migrated versions. Overwrite existing files when installing casks.
* `-v`, `--verbose`:
Print the verification and postinstall steps.
* `--formula`:
@@ -351,6 +351,36 @@ installed formulae or, every 30 days, for all formulae.
Create a Git repository, useful for creating patches to the software.
* `--cask`:
Treat all named arguments as casks.
+* `--appdir`:
+ Target location for Applications. Default: `/Applications`
+* `--colorpickerdir`:
+ Target location for Color Pickers. Default: `~/Library/ColorPickers`
+* `--prefpanedir`:
+ Target location for Preference Panes. Default: `~/Library/PreferencePanes`
+* `--qlplugindir`:
+ Target location for QuickLook Plugins. Default: `~/Library/QuickLook`
+* `--mdimporterdir`:
+ Target location for Spotlight Plugins. Default: `~/Library/Spotlight`
+* `--dictionarydir`:
+ Target location for Dictionaries. Default: `~/Library/Dictionaries`
+* `--fontdir`:
+ Target location for Fonts. Default: `~/Library/Fonts`
+* `--servicedir`:
+ Target location for Services. Default: `~/Library/Services`
+* `--input_methoddir`:
+ Target location for Input Methods. Default: `~/Library/Input Methods`
+* `--internet_plugindir`:
+ Target location for Internet Plugins. Default: `~/Library/Internet Plug-Ins`
+* `--audio_unit_plugindir`:
+ Target location for Audio Unit Plugins. Default: `~/Library/Audio/Plug-Ins/Components`
+* `--vst_plugindir`:
+ Target location for VST Plugins. Default: `~/Library/Audio/Plug-Ins/VST`
+* `--vst3_plugindir`:
+ Target location for VST3 Plugins. Default: `~/Library/Audio/Plug-Ins/VST3`
+* `--screen_saverdir`:
+ Target location for Screen Savers. Default: `~/Library/Screen Savers`
+* `--language`:
+ Set language of the Cask to install. The first matching language is used, otherwise the default language on the Cask. The default value is the `language of your system`
* `--[no-]binaries`:
Disable/enable linking of helper executables to `/usr/local/bin`. Default: enabled
* `--require-sha`: | true |
Other | Homebrew | brew | 08be729af04de693d7f44f3a3b216c3e15172dcb.json | Support all cask options in `brew install`. | manpages/brew.1 | @@ -457,7 +457,7 @@ If brewing fails, open an interactive debugging session with access to IRB or a
.
.TP
\fB\-f\fR, \fB\-\-force\fR
-Install without checking for previously installed keg\-only or non\-migrated versions\.
+Install formulae without checking for previously installed keg\-only or non\-migrated versions\. Overwrite existing files when installing casks\.
.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
@@ -532,6 +532,66 @@ Create a Git repository, useful for creating patches to the software\.
Treat all named arguments as casks\.
.
.TP
+\fB\-\-appdir\fR
+Target location for Applications\. Default: \fB/Applications\fR
+.
+.TP
+\fB\-\-colorpickerdir\fR
+Target location for Color Pickers\. Default: \fB~/Library/ColorPickers\fR
+.
+.TP
+\fB\-\-prefpanedir\fR
+Target location for Preference Panes\. Default: \fB~/Library/PreferencePanes\fR
+.
+.TP
+\fB\-\-qlplugindir\fR
+Target location for QuickLook Plugins\. Default: \fB~/Library/QuickLook\fR
+.
+.TP
+\fB\-\-mdimporterdir\fR
+Target location for Spotlight Plugins\. Default: \fB~/Library/Spotlight\fR
+.
+.TP
+\fB\-\-dictionarydir\fR
+Target location for Dictionaries\. Default: \fB~/Library/Dictionaries\fR
+.
+.TP
+\fB\-\-fontdir\fR
+Target location for Fonts\. Default: \fB~/Library/Fonts\fR
+.
+.TP
+\fB\-\-servicedir\fR
+Target location for Services\. Default: \fB~/Library/Services\fR
+.
+.TP
+\fB\-\-input_methoddir\fR
+Target location for Input Methods\. Default: \fB~/Library/Input Methods\fR
+.
+.TP
+\fB\-\-internet_plugindir\fR
+Target location for Internet Plugins\. Default: \fB~/Library/Internet Plug\-Ins\fR
+.
+.TP
+\fB\-\-audio_unit_plugindir\fR
+Target location for Audio Unit Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/Components\fR
+.
+.TP
+\fB\-\-vst_plugindir\fR
+Target location for VST Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST\fR
+.
+.TP
+\fB\-\-vst3_plugindir\fR
+Target location for VST3 Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST3\fR
+.
+.TP
+\fB\-\-screen_saverdir\fR
+Target location for Screen Savers\. Default: \fB~/Library/Screen Savers\fR
+.
+.TP
+\fB\-\-language\fR
+Set language of the Cask to install\. The first matching language is used, otherwise the default language on the Cask\. The default value is the \fBlanguage of your system\fR
+.
+.TP
\fB\-\-[no\-]binaries\fR
Disable/enable linking of helper executables to \fB/usr/local/bin\fR\. Default: enabled
. | true |
Other | Homebrew | brew | 73ac03149c35687d1674497e01bcd58d6a18fd13.json | Switch most dependabot updates back to `daily`. | .github/dependabot.yml | @@ -5,14 +5,23 @@ updates:
- package-ecosystem: github-actions
directory: /
schedule:
- interval: weekly
+ interval: daily
- package-ecosystem: bundler
directory: /docs
schedule:
interval: weekly
+ - package-ecosystem: bundler
+ directory: /Library/Homebrew
+ schedule:
+ interval: daily
+ ignore:
+ - dependency-name: sorbet*
+
- package-ecosystem: bundler
directory: /Library/Homebrew
schedule:
interval: weekly
+ allow:
+ - dependency-name: sorbet* | false |
Other | Homebrew | brew | 87b05a9be29170fe7e932710bf01d5a94e135f78.json | sorbet: Update RBI files and prune files.yaml.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml). | Library/Homebrew/sorbet/rbi/gems/regexp_parser@1.8.0.rbi | @@ -1,6 +1,6 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `regexp_parser` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
+# Please instead update this file by running `tapioca sync`.
# typed: true
@@ -794,7 +794,7 @@ class Regexp::Expression::WhiteSpace < ::Regexp::Expression::FreeSpace
end
class Regexp::Lexer
- def lex(input, syntax = T.unsafe(nil), &block); end
+ def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end
private
@@ -815,8 +815,8 @@ class Regexp::Lexer
def tokens=(_); end
class << self
- def lex(input, syntax = T.unsafe(nil), &block); end
- def scan(input, syntax = T.unsafe(nil), &block); end
+ def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end
+ def scan(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end
end
end
@@ -865,7 +865,7 @@ class Regexp::Parser
include(::Regexp::Syntax)
include(::Regexp::Expression::UnicodeProperty)
- def parse(input, syntax = T.unsafe(nil), &block); end
+ def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end
private
@@ -886,6 +886,7 @@ class Regexp::Parser
def count_captured_group; end
def decrease_nesting; end
def escape(token); end
+ def extract_options(input, options); end
def free_space(token); end
def group(token); end
def intersection(token); end
@@ -901,7 +902,6 @@ class Regexp::Parser
def node=(_); end
def open_group(token); end
def open_set(token); end
- def options_from_input(input); end
def options_group(token); end
def options_stack; end
def options_stack=(_); end
@@ -921,7 +921,7 @@ class Regexp::Parser
def update_transplanted_subtree(exp, new_parent); end
class << self
- def parse(input, syntax = T.unsafe(nil), &block); end
+ def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end
end
end
@@ -944,7 +944,7 @@ Regexp::Parser::VERSION = T.let(T.unsafe(nil), String)
class Regexp::Scanner
def emit(type, token, text, ts, te); end
- def scan(input_object, &block); end
+ def scan(input_object, options: T.unsafe(nil), &block); end
private
@@ -959,6 +959,7 @@ class Regexp::Scanner
def emit_options(text, ts, te); end
def free_spacing; end
def free_spacing=(_); end
+ def free_spacing?(input_object, options); end
def group_depth; end
def group_depth=(_); end
def in_group?; end
@@ -976,7 +977,7 @@ class Regexp::Scanner
class << self
def long_prop_map; end
- def scan(input_object, &block); end
+ def scan(input_object, options: T.unsafe(nil), &block); end
def short_prop_map; end
end
end | false |
Other | Homebrew | brew | 0447b2200ff5da3d249d0f6cedb79ea0cbb4ce3b.json | dev-cmd/pull: recommend gh over hub.
`gh` is the official GitHub tool and better maintained at this point. | Library/Homebrew/dev-cmd/pull.rb | @@ -43,6 +43,6 @@ def pull_args
end
def pull
- odisabled "brew pull", "hub checkout"
+ odisabled "brew pull", "gh pr checkout"
end
end | false |
Other | Homebrew | brew | 415c36041a87ef59eab0c04f557f8f498d762b90.json | dev-cmd/pr-pull: use GitHub API to get PR commits | Library/Homebrew/dev-cmd/pr-pull.rb | @@ -275,22 +275,20 @@ def autosquash!(original_commit, path: ".", args: nil)
raise
end
- def cherry_pick_pr!(pr, args:, path: ".")
+ def cherry_pick_pr!(user, repo, pr, args:, path: ".")
if args.dry_run?
puts <<~EOS
git fetch --force origin +refs/pull/#{pr}/head
git merge-base HEAD FETCH_HEAD
git cherry-pick --ff --allow-empty $merge_base..FETCH_HEAD
EOS
- else
- safe_system "git", "-C", path, "fetch", "--quiet", "--force", "origin", "+refs/pull/#{pr}/head"
- merge_base = Utils.popen_read("git", "-C", path, "merge-base", "HEAD", "FETCH_HEAD").strip
- commit_count = Utils.popen_read("git", "-C", path, "rev-list", "#{merge_base}..FETCH_HEAD").lines.count
-
- ohai "Using #{commit_count} commit#{"s" unless commit_count == 1} from ##{pr}"
- Utils::Git.cherry_pick!(path, "--ff", "--allow-empty", "#{merge_base}..FETCH_HEAD",
- verbose: args.verbose?, resolve: args.resolve?)
+ return
end
+
+ commits = GitHub.pull_request_commits(user, repo, pr)
+ safe_system "git", "-C", path, "fetch", "--quiet", "--force", "origin", commits.last
+ ohai "Using #{commits.count} commit#{"s" unless commits.count == 1} from ##{pr}"
+ Utils::Git.cherry_pick!(path, "--ff", "--allow-empty", *commits, verbose: args.verbose?, resolve: args.resolve?)
end
def check_branch(path, ref, args:)
@@ -391,7 +389,7 @@ def pr_pull
Dir.mktmpdir pr do |dir|
cd dir do
original_commit = Utils.popen_read("git", "-C", tap.path, "rev-parse", "HEAD").chomp
- cherry_pick_pr!(pr, path: tap.path, args: args)
+ cherry_pick_pr!(user, repo, pr, path: tap.path, args: args)
autosquash!(original_commit, path: tap.path, args: args) if args.autosquash?
signoff!(pr, tap: tap, args: args) unless args.clean?
| true |
Other | Homebrew | brew | 415c36041a87ef59eab0c04f557f8f498d762b90.json | dev-cmd/pr-pull: use GitHub API to get PR commits | Library/Homebrew/test/utils/github_spec.rb | @@ -75,4 +75,11 @@
expect(url).to eq("https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/3557392/zip")
end
end
+
+ describe "::pull_request_commits", :needs_network do
+ it "gets the correct commits hashes for a pull request" do
+ hashes = %w[188606a4a9587365d930b02c98ad6857b1d00150 25a71fe1ea1558415d6496d23834dc70778ddee5]
+ expect(subject.pull_request_commits("Homebrew", "legacy-homebrew", 50678)).to eq(hashes)
+ end
+ end
end | true |
Other | Homebrew | brew | 415c36041a87ef59eab0c04f557f8f498d762b90.json | dev-cmd/pr-pull: use GitHub API to get PR commits | Library/Homebrew/utils/github.rb | @@ -747,4 +747,8 @@ def create_bump_pr(info, args:)
end
end
end
+
+ def pull_request_commits(user, repo, pr)
+ open_api(url_to("repos", user, repo, "pulls", pr, "commits?per_page=100")).map { |c| c["sha"] }
+ end
end | true |
Other | Homebrew | brew | e3646c9b4e9dea9204f3c8a3bb472638546c4534.json | Remove unneeded back-references. | Library/Homebrew/extend/ENV/shared.rb | @@ -166,10 +166,12 @@ def fcflags
# end</pre>
def compiler
@compiler ||= if (cc = @cc)
- warn_about_non_apple_gcc($&) if cc =~ GNU_GCC_REGEXP
+ warn_about_non_apple_gcc(cc) if cc.match?(GNU_GCC_REGEXP)
+
fetch_compiler(cc, "--cc")
elsif (cc = homebrew_cc)
- warn_about_non_apple_gcc($&) if cc =~ GNU_GCC_REGEXP
+ warn_about_non_apple_gcc(cc) if cc.match?(GNU_GCC_REGEXP)
+
compiler = fetch_compiler(cc, "HOMEBREW_CC")
if @formula | true |
Other | Homebrew | brew | e3646c9b4e9dea9204f3c8a3bb472638546c4534.json | Remove unneeded back-references. | Library/Homebrew/extend/ENV/std.rb | @@ -46,9 +46,9 @@ def setup_build_environment(**options)
send(compiler)
- return unless cc =~ GNU_GCC_REGEXP
+ return unless cc.match?(GNU_GCC_REGEXP)
- gcc_formula = gcc_version_formula($&)
+ gcc_formula = gcc_version_formula(cc)
append_path "PATH", gcc_formula.opt_bin.to_s
end
alias generic_setup_build_environment setup_build_environment | true |
Other | Homebrew | brew | e3646c9b4e9dea9204f3c8a3bb472638546c4534.json | Remove unneeded back-references. | Library/Homebrew/extend/ENV/super.rb | @@ -111,7 +111,7 @@ def determine_path
path.append("/usr/bin", "/bin", "/usr/sbin", "/sbin")
begin
- path.append(gcc_version_formula($&).opt_bin) if homebrew_cc =~ GNU_GCC_REGEXP
+ path.append(gcc_version_formula(homebrew_cc).opt_bin) if homebrew_cc.match?(GNU_GCC_REGEXP)
rescue FormulaUnavailableError
# Don't fail and don't add these formulae to the path if they don't exist.
nil | true |
Other | Homebrew | brew | e686a392c500888f85a069b625fc70495a920af5.json | bump-formula-pr: add message to check resources | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -330,11 +330,22 @@ def bump_formula_pr
end
unless args.dry_run?
- PyPI.update_python_resources! formula, new_formula_version, silent: args.quiet?, ignore_non_pypi_packages: true
+ resources_checked = PyPI.update_python_resources! formula, new_formula_version,
+ silent: args.quiet?, ignore_non_pypi_packages: true
end
run_audit(formula, alias_rename, old_contents, args: args)
+ pr_message = "Created with `brew bump-formula-pr`."
+ if resources_checked.nil? && formula.resources.present? &&
+ formula.resources.any? { |resource| resource.name != "homebrew-virtualenv" }
+ pr_message += <<~EOS
+
+
+ `resource` blocks may require updates.
+ EOS
+ end
+
pr_info = {
sourcefile_path: formula.path,
old_contents: old_contents,
@@ -345,7 +356,7 @@ def bump_formula_pr
previous_branch: previous_branch,
tap: formula.tap,
tap_full_name: tap_full_name,
- pr_message: "Created with `brew bump-formula-pr`.",
+ pr_message: pr_message,
}
GitHub.create_bump_pr(pr_info, args: args)
end | true |
Other | Homebrew | brew | e686a392c500888f85a069b625fc70495a920af5.json | bump-formula-pr: add message to check resources | Library/Homebrew/utils/pypi.rb | @@ -56,6 +56,7 @@ def get_pypi_info(package, version)
[json["info"]["name"], sdist["url"], sdist["digests"]["sha256"]]
end
+ # Return true if resources were checked (even if no change)
def update_python_resources!(formula, version = nil, print_only: false, silent: false,
ignore_non_pypi_packages: false)
@@ -160,5 +161,7 @@ def update_python_resources!(formula, version = nil, print_only: false, silent:
end
s.sub! inreplace_regex, new_resource_blocks
end
+
+ true
end
end | true |
Other | Homebrew | brew | 34ea8cbc9d0e45b8c30dc05792a3f3ddd82cef9e.json | PULL_REQUEST_TEMPLATE: Add a checklist item for `brew man`
- I've been changing command flags recently. I always forget to run
`brew man`, then I feel bad about causing red CI on my PRs. This has
happened to others too, so make `brew man` more obvious as a thing
that one should check. | .github/PULL_REQUEST_TEMPLATE.md | @@ -4,5 +4,6 @@
- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/test/PATH_spec.rb).
- [ ] Have you successfully run `brew style` with your changes locally?
- [ ] Have you successfully run `brew tests` with your changes locally?
+- [ ] Have you successfully run `brew man` locally and committed any changes?
----- | false |
Other | Homebrew | brew | 7ecb73f9da89bd3c6e752b860e8731e5607782e2.json | sorbet/files.yaml: Preserve newline at EOF | Library/Homebrew/dev-cmd/typecheck.rb | @@ -54,7 +54,7 @@ def typecheck
end
end
- File.write(SORBET_FILES_YAML, lines_to_keep.join("\n"))
+ File.write(SORBET_FILES_YAML, "#{lines_to_keep.join("\n")}\n")
end
if args.update_definitions? | true |
Other | Homebrew | brew | 7ecb73f9da89bd3c6e752b860e8731e5607782e2.json | sorbet/files.yaml: Preserve newline at EOF | Library/Homebrew/sorbet/files.yaml | @@ -963,4 +963,4 @@ strict:
- ./requirements.rb
- ./requirements/osxfuse_requirement.rb
- ./rubocops.rb
- - ./rubocops/rubocop-cask.rb
\ No newline at end of file
+ - ./rubocops/rubocop-cask.rb | true |
Other | Homebrew | brew | 56a8f8f99d73ea2b40b460e48105008b3c4ffdef.json | livecheck: fix TTY output for progress bar | Library/Homebrew/livecheck/livecheck.rb | @@ -75,7 +75,10 @@ def livecheck_formulae(formulae_to_check, args)
formulae_to_check.length
end
- $stderr.puts Formatter.headline("Running checks", color: :blue)
+ Tty.with($stderr) do |stderr|
+ stderr.puts Formatter.headline("Running checks", color: :blue)
+ end
+
progress = ProgressBar.create(
total: total_formulae,
progress_mark: "#",
@@ -182,7 +185,9 @@ def livecheck_formulae(formulae_to_check, args)
if progress
progress.finish
- $stderr.print "#{Tty.up}#{Tty.erase_line}" * 2
+ Tty.with($stderr) do |stderr|
+ stderr.print "#{Tty.up}#{Tty.erase_line}" * 2
+ end
end
puts JSON.generate(formulae_checked.compact) | true |
Other | Homebrew | brew | 56a8f8f99d73ea2b40b460e48105008b3c4ffdef.json | livecheck: fix TTY output for progress bar | Library/Homebrew/utils/tty.rb | @@ -88,7 +88,7 @@ def reset_escape_sequence!
SPECIAL_CODES.each do |name, code|
define_singleton_method(name) do
- if $stdout.tty?
+ if @stream.tty?
"\033[#{code}"
else
"" | true |
Other | Homebrew | brew | 4315a2647fec13e93976cba2a68e77f9b6e4947f.json | pr-pull: implement autosquash option | Library/Homebrew/dev-cmd/pr-pull.rb | @@ -31,6 +31,9 @@ def pr_pull_args
switch "--keep-old",
description: "If the formula specifies a rebuild version, " \
"attempt to preserve its value in the generated DSL."
+ switch "--autosquash",
+ description: "Automatically reformat and reword commits in the pull request to our "\
+ "preferred format."
switch "--branch-okay",
description: "Do not warn if pulling to a branch besides master (useful for testing)."
switch "--resolve",
@@ -39,6 +42,9 @@ def pr_pull_args
switch "--warn-on-upload-failure",
description: "Warn instead of raising an error if the bottle upload fails. "\
"Useful for repairing bottle uploads that previously failed."
+ flag "--message=",
+ depends_on: "--autosquash",
+ description: "Message to include when autosquashing revision bumps, deletions, and rebuilds."
flag "--workflow=",
description: "Retrieve artifacts from the specified workflow (default: `tests.yml`)."
flag "--artifact=",
@@ -52,8 +58,8 @@ def pr_pull_args
flag "--bintray-mirror=",
description: "Use the specified Bintray repository to automatically mirror stable URLs "\
"defined in the formulae (default: `mirror`)."
-
min_named 1
+ conflicts "--clean", "--autosquash"
end
end
@@ -78,21 +84,29 @@ def setup_git_environment!
end
end
- def signoff!(pr, tap:, args:)
- message = Utils.popen_read "git", "-C", tap.path, "log", "-1", "--pretty=%B"
+ # Separates a commit message into subject, body, and trailers.
+ def separate_commit_message(message)
subject = message.lines.first.strip
# Skip the subject and separate lines that look like trailers (e.g. "Co-authored-by")
# from lines that look like regular body text.
trailers, body = message.lines.drop(1).partition { |s| s.match?(/^[a-z-]+-by:/i) }
- # Approving reviewers also sign-off on merge
- trailers += GitHub.approved_reviews(tap.user, "homebrew-#{tap.repo}", pr).map do |r|
- "Signed-off-by: #{r["name"]} <#{r["email"]}>\n"
- end
trailers = trailers.uniq.join.strip
body = body.join.strip.gsub(/\n{3,}/, "\n\n")
+ [subject, body, trailers]
+ end
+
+ def signoff!(pr, tap:, args:)
+ message = Utils.popen_read "git", "-C", tap.path, "log", "-1", "--pretty=%B"
+ subject, body, trailers = separate_commit_message(message)
+
+ # Approving reviewers also sign-off on merge.
+ trailers += GitHub.approved_reviews(tap.user, "homebrew-#{tap.repo}", pr).map do |r|
+ "Signed-off-by: #{r["name"]} <#{r["email"]}>"
+ end.join("\n")
+
close_message = "Closes ##{pr}."
body += "\n\n#{close_message}" unless body.include? close_message
new_message = [subject, body, trailers].join("\n\n").strip
@@ -104,6 +118,163 @@ def signoff!(pr, tap:, args:)
end
end
+ def determine_bump_subject(file, original_commit, path: ".", reason: nil)
+ full_path = Pathname.new(path)/file
+ formula_name = File.basename(file.chomp(".rb"))
+
+ new_formula = begin
+ Formulary::FormulaLoader.new(formula_name, full_path).get_formula(:stable)
+ rescue FormulaUnavailableError
+ return "#{formula_name}: delete #{reason}"
+ end
+
+ old_formula = begin
+ old_file = Utils.popen_read "git", "-C", path, "show", "#{original_commit}:#{file}"
+ Formulary.from_contents(formula_name, full_path, old_file, :stable)
+ rescue FormulaUnavailableError
+ return "#{formula_name} #{new_formula.stable.version} (new formula)"
+ end
+
+ if old_formula.stable.version != new_formula.stable.version
+ "#{formula_name} #{new_formula.stable.version}"
+ elsif old_formula.revision != new_formula.revision
+ "#{formula_name}: revision #{reason}"
+ else
+ "#{formula_name}: #{reason || "rebuild"}"
+ end
+ end
+
+ # Cherry picks a single commit that modifies a single file.
+ # Potentially rewords this commit using `determine_bump_subject`.
+ def reword_formula_commit(commit, file, args:, path: ".")
+ formula_name = File.basename(file.chomp(".rb"))
+ odebug "Cherry-picking #{file}: #{commit}"
+ Utils::Git.cherry_pick!(path, commit, verbose: args.verbose?, resolve: args.resolve?)
+
+ bump_subject = determine_bump_subject(file, "HEAD^", path: path, reason: args.message).strip
+ message = Utils.popen_read("git", "-C", path, "log", "-1", "--pretty=%B")
+ subject, body, trailers = separate_commit_message(message)
+
+ if subject != bump_subject && !subject.start_with?("#{formula_name}:")
+ safe_system("git", "-C", path, "commit", "--amend", "-q",
+ "-m", bump_subject, "-m", subject, "-m", body, "-m", trailers)
+ ohai bump_subject
+ else
+ ohai subject
+ end
+ end
+
+ # Cherry picks multiple commits that each modify a single file.
+ # Words the commit according to `determine_bump_subject` with the body
+ # corresponding to all the original commit messages combined.
+ def squash_formula_commits(commits, file, args:, path: ".")
+ odebug "Squashing #{file}: #{commits.join " "}"
+
+ # Format commit messages into something similar to `git fmt-merge-message`.
+ # * subject 1
+ # * subject 2
+ # optional body
+ # * subject 3
+ messages = []
+ trailers = []
+ commits.each do |commit|
+ original_message = Utils.safe_popen_read("git", "-C", path, "show", "--no-patch", "--pretty=%B", commit)
+ subject, body, trailer = separate_commit_message(original_message)
+ body = body.lines.map { |line| " #{line.strip}" }.join("\n")
+ messages << "* #{subject}\n#{body}".strip
+ trailers << trailer
+ end
+
+ # Get the set of authors in this series.
+ authors = Utils.safe_popen_read("git", "-C", path, "show",
+ "--no-patch", "--pretty=%an <%ae>", *commits).lines.map(&:strip).uniq.compact
+
+ # Get the author and date of the first commit of this series, which we use for the squashed commit.
+ original_author = authors.shift
+ original_date = Utils.safe_popen_read "git", "-C", path, "show", "--no-patch", "--pretty=%ad", commits.first
+
+ # Generate trailers for coauthors and combine them with the existing trailers.
+ co_author_trailers = authors.map { |au| "Co-authored-by: #{au}" }
+ trailers = [trailers + co_author_trailers].flatten.uniq.compact
+
+ # Apply the patch series but don't commit anything yet.
+ Utils::Git.cherry_pick!(path, "--no-commit", *commits, verbose: args.verbose?, resolve: args.resolve?)
+
+ # Determine the bump subject by comparing the original state of the tree to its current state.
+ bump_subject = determine_bump_subject(file, "#{commits.first}^", path: path, reason: args.message).strip
+
+ # Commit with the new subject, body, and trailers.
+ safe_system("git", "-C", path, "commit", "--quiet",
+ "-m", bump_subject, "-m", messages.join("\n"), "-m", trailers.join("\n"),
+ "--author", original_author, "--date", original_date, "--", file)
+ ohai bump_subject
+ end
+
+ def autosquash!(original_commit, path: ".", args: nil)
+ # Autosquash assumes we've already modified the current state of the git repository,
+ # so just exit early if we're in a dry run.
+ return if args.dry_run?
+
+ original_head = Utils.safe_popen_read("git", "-C", path, "rev-parse", "HEAD").strip
+
+ commits = Utils.safe_popen_read("git", "-C", path, "rev-list",
+ "--reverse", "#{original_commit}..HEAD").lines.map(&:strip)
+
+ # Generate a bidirectional mapping of commits <=> formula files.
+ files_to_commits = {}
+ commits_to_files = commits.map do |commit|
+ files = Utils.safe_popen_read("git", "-C", path, "diff-tree", "--diff-filter=AMD",
+ "-r", "--name-only", "#{commit}^", commit).lines.map(&:strip)
+ files.each do |file|
+ files_to_commits[file] ||= []
+ files_to_commits[file] << commit
+ next if %r{^Formula/.*\.rb$}.match?(file)
+
+ odie <<~EOS
+ Autosquash can't squash commits that modify non-formula files.
+ File: #{file}
+ Commit: #{commit}
+ EOS
+ end
+ [commit, files]
+ end.to_h
+
+ # Reset to state before cherry-picking.
+ safe_system "git", "-C", path, "reset", "--hard", original_commit
+
+ # Iterate over every commit in the pull request series, but if we have to squash
+ # multiple commits into one, ensure that we skip over commits we've already squashed.
+ processed_commits = []
+ commits.each do |commit|
+ next if processed_commits.include? commit
+
+ files = commits_to_files[commit]
+ if files.length == 1 && files_to_commits[files.first].length == 1
+ # If there's a 1:1 mapping of commits to files, just cherry pick and (maybe) reword.
+ reword_formula_commit(commit, files.first, path: path, args: args)
+ processed_commits << commit
+ elsif files.length == 1 && files_to_commits[files.first].length > 1
+ # If multiple commits modify a single file, squash them down into a single commit.
+ file = files.first
+ commits = files_to_commits[file]
+ squash_formula_commits(commits, file, path: path, args: args)
+ processed_commits += commits
+ else
+ # We can't split commits (yet) so just raise an error.
+ odie <<~EOS
+ Autosquash can't split commits that modify multiple files.
+ Commit: #{commit}
+ Files: #{files.join " "}
+ EOS
+ end
+ end
+ rescue
+ opoo "Autosquash encountered an error; resetting to original cherry-picked state at #{original_head}"
+ system "git", "-C", path, "reset", "--hard", original_head
+ system "git", "-C", path, "cherry-pick", "--abort"
+ raise
+ end
+
def cherry_pick_pr!(pr, args:, path: ".")
if args.dry_run?
puts <<~EOS
@@ -116,19 +287,9 @@ def cherry_pick_pr!(pr, args:, path: ".")
merge_base = Utils.popen_read("git", "-C", path, "merge-base", "HEAD", "FETCH_HEAD").strip
commit_count = Utils.popen_read("git", "-C", path, "rev-list", "#{merge_base}..FETCH_HEAD").lines.count
- # git cherry-pick unfortunately has no quiet option
- ohai "Cherry-picking #{commit_count} commit#{"s" unless commit_count == 1} from ##{pr}"
- cherry_pick_args = "git", "-C", path, "cherry-pick", "--ff", "--allow-empty", "#{merge_base}..FETCH_HEAD"
- result = args.verbose? ? system(*cherry_pick_args) : quiet_system(*cherry_pick_args)
-
- unless result
- if args.resolve?
- odie "Cherry-pick failed: try to resolve it."
- else
- system "git", "-C", path, "cherry-pick", "--abort"
- odie "Cherry-pick failed!"
- end
- end
+ ohai "Using #{commit_count} commit#{"s" unless commit_count == 1} from ##{pr}"
+ Utils::Git.cherry_pick!(path, "--ff", "--allow-empty", "#{merge_base}..FETCH_HEAD",
+ verbose: args.verbose?, resolve: args.resolve?)
end
end
@@ -231,6 +392,7 @@ def pr_pull
cd dir do
original_commit = Utils.popen_read("git", "-C", tap.path, "rev-parse", "HEAD").chomp
cherry_pick_pr!(pr, path: tap.path, args: args)
+ autosquash!(original_commit, path: tap.path, args: args) if args.autosquash?
signoff!(pr, tap: tap, args: args) unless args.clean?
unless args.no_upload? | true |
Other | Homebrew | brew | 4315a2647fec13e93976cba2a68e77f9b6e4947f.json | pr-pull: implement autosquash option | docs/Manpage.md | @@ -1096,12 +1096,16 @@ Requires write access to the repository.
Do not amend the commits from pull requests.
* `--keep-old`:
If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL.
+* `--autosquash`:
+ Automatically reformat and reword commits in the pull request to our preferred format.
* `--branch-okay`:
Do not warn if pulling to a branch besides master (useful for testing).
* `--resolve`:
When a patch fails to apply, leave in progress and allow user to resolve, instead of aborting.
* `--warn-on-upload-failure`:
Warn instead of raising an error if the bottle upload fails. Useful for repairing bottle uploads that previously failed.
+* `--message`:
+ Message to include when autosquashing revision bumps, deletions, and rebuilds.
* `--workflow`:
Retrieve artifacts from the specified workflow (default: `tests.yml`).
* `--artifact`: | true |
Other | Homebrew | brew | 4315a2647fec13e93976cba2a68e77f9b6e4947f.json | pr-pull: implement autosquash option | manpages/brew.1 | @@ -1519,6 +1519,10 @@ Do not amend the commits from pull requests\.
If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL\.
.
.TP
+\fB\-\-autosquash\fR
+Automatically reformat and reword commits in the pull request to our preferred format\.
+.
+.TP
\fB\-\-branch\-okay\fR
Do not warn if pulling to a branch besides master (useful for testing)\.
.
@@ -1531,6 +1535,10 @@ When a patch fails to apply, leave in progress and allow user to resolve, instea
Warn instead of raising an error if the bottle upload fails\. Useful for repairing bottle uploads that previously failed\.
.
.TP
+\fB\-\-message\fR
+Message to include when autosquashing revision bumps, deletions, and rebuilds\.
+.
+.TP
\fB\-\-workflow\fR
Retrieve artifacts from the specified workflow (default: \fBtests\.yml\fR)\.
. | true |
Other | Homebrew | brew | 86a838c03f5bea58cb4e19ef77d805a0af93829b.json | test/language/java_spec: drop version to 1.6+ | Library/Homebrew/test/language/java_spec.rb | @@ -5,7 +5,7 @@
describe Language::Java do
describe "::java_home" do
it "returns valid JAVA_HOME if version is specified", :needs_java do
- java_home = described_class.java_home("1.8+")
+ java_home = described_class.java_home("1.6+")
expect(java_home/"bin/java").to be_an_executable
end
| false |
Other | Homebrew | brew | f04b0142102a872d255440aef75984c1b213c584.json | language/python: build python binary names dynamically.
Co-authored-by: Alexander Bayandin <a.bayandin@gmail.com> | Library/Homebrew/language/python.rb | @@ -177,7 +177,7 @@ def needs_python?(python)
def virtualenv_install_with_resources(options = {})
python = options[:using]
if python.nil?
- pythons = %w[python python3 python@3 python@3.7 python@3.8 python@3.9 pypy pypy3]
+ pythons = %w[python python3 pypy pypy3] + Formula.names.select { |name| name.start_with? "python@" }
wanted = pythons.select { |py| needs_python?(py) }
raise FormulaUnknownPythonError, self if wanted.empty?
raise FormulaAmbiguousPythonError, self if wanted.size > 1 | false |
Other | Homebrew | brew | 875696de1b21ee992335c39b978097b77faba955.json | sorbet: update RBI files using Tapioca.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml). | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -13372,6 +13372,7 @@ class Object
HOMEBREW_PRODUCT = ::T.let(nil, ::T.untyped)
HOMEBREW_PULL_API_REGEX = ::T.let(nil, ::T.untyped)
HOMEBREW_PULL_OR_COMMIT_URL_REGEX = ::T.let(nil, ::T.untyped)
+ HOMEBREW_RELEASES_URL_REGEX = ::T.let(nil, ::T.untyped)
HOMEBREW_REPOSITORY = ::T.let(nil, ::T.untyped)
HOMEBREW_REQUIRED_RUBY_VERSION = ::T.let(nil, ::T.untyped)
HOMEBREW_SHIMS_PATH = ::T.let(nil, ::T.untyped) | false |
Other | Homebrew | brew | 584c839dcaf466b9f0a925e52b844a8db99f2114.json | bump-cask-pr: fix branch name for versions with colon
Replace commas and colons with hyphens | Library/Homebrew/dev-cmd/bump-cask-pr.rb | @@ -193,7 +193,7 @@ def bump_cask_pr
sourcefile_path: cask.sourcefile_path,
old_contents: old_contents,
origin_branch: origin_branch,
- branch_name: "bump-#{cask.token}-#{new_version}",
+ branch_name: "bump-#{cask.token}-#{new_version.tr(",:", "-")}",
commit_message: "Update #{cask.token} from #{old_version} to #{new_version}",
previous_branch: previous_branch,
tap: cask.tap, | false |
Other | Homebrew | brew | 5f0a55a19963b0f6e662f299da658eec7bd1faca.json | sorbet: update RBI files using Tapioca.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml). | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@0.4.0.rbi | @@ -1,6 +1,6 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `rubocop-ast` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
+# Please instead update this file by running `tapioca sync`.
# typed: true
@@ -215,6 +215,7 @@ module RuboCop::AST::CollectionNode
def rotate(*args, &block); end
def rotate!(*args, &block); end
def sample(*args, &block); end
+ def save_plist(*args, &block); end
def select(*args, &block); end
def select!(*args, &block); end
def shelljoin(*args, &block); end
@@ -236,6 +237,7 @@ module RuboCop::AST::CollectionNode
def take_while(*args, &block); end
def to_ary(*args, &block); end
def to_h(*args, &block); end
+ def to_plist(*args, &block); end
def to_set(*args, &block); end
def transpose(*args, &block); end
def union(*args, &block); end
@@ -256,6 +258,16 @@ module RuboCop::AST::ConditionalNode
def single_line_condition?; end
end
+class RuboCop::AST::ConstNode < ::RuboCop::AST::Node
+ def absolute?; end
+ def class_name?; end
+ def each_path(&block); end
+ def module_name?; end
+ def namespace; end
+ def relative?; end
+ def short_name; end
+end
+
class RuboCop::AST::DefNode < ::RuboCop::AST::Node
include(::RuboCop::AST::ParameterizedNode)
include(::RuboCop::AST::MethodIdentifierPredicates)
@@ -626,6 +638,8 @@ class RuboCop::AST::Node < ::Parser::AST::Node
def lambda_or_proc?(node = T.unsafe(nil)); end
def lambda_type?; end
def last_line; end
+ def left_sibling; end
+ def left_siblings; end
def line_count; end
def literal?; end
def loop_keyword?; end
@@ -692,6 +706,8 @@ class RuboCop::AST::Node < ::Parser::AST::Node
def restarg_type?; end
def retry_type?; end
def return_type?; end
+ def right_sibling; end
+ def right_siblings; end
def root_type?; end
def sclass_type?; end
def self_type?; end
@@ -911,7 +927,9 @@ class RuboCop::AST::ProcessedSource
def file_path; end
def find_comment(&block); end
def find_token(&block); end
+ def first_token_of(range_or_node); end
def following_line(token); end
+ def last_token_of(range_or_node); end
def line_indentation(line_number); end
def line_with_comment?(line); end
def lines; end
@@ -922,14 +940,19 @@ class RuboCop::AST::ProcessedSource
def ruby_version; end
def start_with?(string); end
def tokens; end
+ def tokens_within(range_or_node); end
def valid_syntax?; end
private
def comment_index; end
def create_parser(ruby_version); end
+ def first_token_index(range_or_node); end
+ def last_token_index(range_or_node); end
def parse(source, ruby_version); end
def parser_class(ruby_version); end
+ def sorted_tokens; end
+ def source_range(range_or_node); end
def tokenize(parser); end
class << self
@@ -945,6 +968,8 @@ class RuboCop::AST::RangeNode < ::RuboCop::AST::Node
end
class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node
+ include(::RuboCop::Ext::RegexpNode)
+
def content; end
def delimiter?(char); end
def delimiters; end
@@ -968,7 +993,17 @@ RuboCop::AST::RegexpNode::OPTIONS = T.let(T.unsafe(nil), Hash)
class RuboCop::AST::ResbodyNode < ::RuboCop::AST::Node
def body; end
+ def branch_index; end
def exception_variable; end
+ def exceptions; end
+end
+
+class RuboCop::AST::RescueNode < ::RuboCop::AST::Node
+ def body; end
+ def branches; end
+ def else?; end
+ def else_branch; end
+ def resbody_branches; end
end
class RuboCop::AST::ReturnNode < ::RuboCop::AST::Node
@@ -1129,6 +1164,7 @@ module RuboCop::AST::Traversal
def on_match_with_trailing_comma(node); end
def on_mlhs(node); end
def on_module(node); end
+ def on_mrasgn(node); end
def on_next(node); end
def on_nil(node); end
def on_not(node); end
@@ -1143,6 +1179,7 @@ module RuboCop::AST::Traversal
def on_postexe(node); end
def on_preexe(node); end
def on_procarg0(node); end
+ def on_rasgn(node); end
def on_rational(node); end
def on_redo(node); end
def on_regexp(node); end | true |
Other | Homebrew | brew | 5f0a55a19963b0f6e662f299da658eec7bd1faca.json | sorbet: update RBI files using Tapioca.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml). | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -20081,14 +20081,10 @@ end
module RuboCop::AST::CollectionNode
def extract_options!(*args, &block); end
- def save_plist(*args, &block); end
-
def to_default_s(*args, &block); end
def to_formatted_s(*args, &block); end
- def to_plist(*args, &block); end
-
def to_sentence(*args, &block); end
def to_xml(*args, &block); end
@@ -20108,10 +20104,6 @@ class RuboCop::AST::Node
def val_node(node=T.unsafe(nil)); end
end
-class RuboCop::AST::RegexpNode
- include ::RuboCop::Ext::RegexpNode
-end
-
class RuboCop::Cask::AST::CaskBlock
def cask_body(*args, &block); end
end | true |
Other | Homebrew | brew | c098ce5d16b3b9ca253ca07ffd44cf98cd7366f1.json | Fix tests for `cask audit`. | Library/Homebrew/test/cask/audit_spec.rb | @@ -17,15 +17,15 @@ def include_msg?(messages, msg)
end
end
- matcher :fail_with do |error_msg|
+ matcher :fail_with do |message|
match do |audit|
- include_msg?(audit.errors, error_msg)
+ include_msg?(audit.errors, message)
end
end
- matcher :warn_with do |warning_msg|
+ matcher :warn_with do |message|
match do |audit|
- include_msg?(audit.warnings, warning_msg)
+ include_msg?(audit.warnings, message)
end
end
@@ -53,6 +53,10 @@ def include_msg?(messages, msg)
it "implies `strict`" do
expect(audit).to be_strict
end
+
+ it "implies `token_conflicts`" do
+ expect(audit.token_conflicts?).to be true
+ end
end
context "when `online` is specified" do
@@ -66,14 +70,6 @@ def include_msg?(messages, msg)
expect(audit.download).to be_truthy
end
end
-
- context "when `strict` is specified" do
- let(:strict) { true }
-
- it "implies `token_conflicts`" do
- expect(audit.token_conflicts?).to be true
- end
- end
end
describe "#result" do
@@ -152,85 +148,95 @@ def tmp_cask(name, text)
context "when cask token is not lowercase" do
let(:cask_token) { "Upper-Case" }
- it "warns about lowercase" do
- expect(subject).to warn_with(/token is not lowercase/)
+ it "fails" do
+ expect(subject).to fail_with(/lowercase/)
end
end
context "when cask token is not ascii" do
let(:cask_token) { "ascii⌘" }
- it "warns about ascii" do
- expect(subject).to warn_with(/contains non-ascii characters/)
+ it "fails" do
+ expect(subject).to fail_with(/contains non-ascii characters/)
end
end
context "when cask token has +" do
let(:cask_token) { "app++" }
- it "warns about +" do
- expect(subject).to warn_with(/\+ should be replaced by -plus-/)
+ it "fails" do
+ expect(subject).to fail_with(/\+ should be replaced by -plus-/)
end
end
context "when cask token has @" do
let(:cask_token) { "app@stuff" }
- it "warns about +" do
- expect(subject).to warn_with(/@ should be replaced by -at-/)
+ it "fails" do
+ expect(subject).to fail_with(/@ should be replaced by -at-/)
end
end
context "when cask token has whitespace" do
let(:cask_token) { "app stuff" }
- it "warns about whitespace" do
- expect(subject).to warn_with(/whitespace should be replaced by hyphens/)
+ it "fails" do
+ expect(subject).to fail_with(/whitespace should be replaced by hyphens/)
end
end
context "when cask token has underscores" do
let(:cask_token) { "app_stuff" }
- it "warns about underscores" do
- expect(subject).to warn_with(/underscores should be replaced by hyphens/)
+ it "fails" do
+ expect(subject).to fail_with(/underscores should be replaced by hyphens/)
end
end
context "when cask token has non-alphanumeric characters" do
let(:cask_token) { "app(stuff)" }
- it "warns about non-alphanumeric characters" do
- expect(subject).to warn_with(/should only contain alphanumeric characters and hyphens/)
+ it "fails" do
+ expect(subject).to fail_with(/alphanumeric characters and hyphens/)
end
end
context "when cask token has double hyphens" do
let(:cask_token) { "app--stuff" }
- it "warns about double hyphens" do
- expect(subject).to warn_with(/should not contain double hyphens/)
+ it "fails" do
+ expect(subject).to fail_with(/should not contain double hyphens/)
+ end
+ end
+
+ context "when cask token has leading hyphens" do
+ let(:cask_token) { "-app" }
+
+ it "fails" do
+ expect(subject).to fail_with(/should not have leading or trailing hyphens/)
end
end
context "when cask token has trailing hyphens" do
let(:cask_token) { "app-" }
- it "warns about trailing hyphens" do
- expect(subject).to warn_with(/should not have leading or trailing hyphens/)
+ it "fails" do
+ expect(subject).to fail_with(/should not have leading or trailing hyphens/)
end
end
end
describe "token bad words" do
- let(:strict) { true }
+ let(:new_cask) { true }
+ let(:online) { false }
let(:cask) do
tmp_cask cask_token.to_s, <<~RUBY
cask '#{cask_token}' do
version '1.0'
sha256 '8dd95daa037ac02455435446ec7bc737b34567afe9156af7d20b2a83805c1d8a'
url "https://brew.sh/"
name 'Audit'
+ desc 'Cask for testing tokens'
homepage 'https://brew.sh/'
app 'Audit.app'
end
@@ -240,72 +246,72 @@ def tmp_cask(name, text)
context "when cask token contains .app" do
let(:cask_token) { "token.app" }
- it "warns about .app" do
- expect(subject).to warn_with(/token contains .app/)
+ it "fails" do
+ expect(subject).to fail_with(/token contains .app/)
end
end
context "when cask token contains version designation" do
let(:cask_token) { "token-beta" }
- it "warns about version in token if the cask is from an official tap" do
+ it "fails if the cask is from an official tap" do
allow(cask).to receive(:tap).and_return(Tap.fetch("homebrew/cask"))
- expect(subject).to warn_with(/token contains version designation/)
+ expect(subject).to fail_with(/token contains version designation/)
end
- it "does not warn about version in token if the cask is from the `cask-versions` tap" do
+ it "does not fail if the cask is from the `cask-versions` tap" do
allow(cask).to receive(:tap).and_return(Tap.fetch("homebrew/cask-versions"))
- expect(subject).not_to warn_with(/token contains version designation/)
+ expect(subject).to pass
end
end
context "when cask token contains launcher" do
let(:cask_token) { "token-launcher" }
- it "warns about launcher in token" do
- expect(subject).to warn_with(/token mentions launcher/)
+ it "fails" do
+ expect(subject).to fail_with(/token mentions launcher/)
end
end
context "when cask token contains desktop" do
let(:cask_token) { "token-desktop" }
- it "warns about desktop in token" do
- expect(subject).to warn_with(/token mentions desktop/)
+ it "fails" do
+ expect(subject).to fail_with(/token mentions desktop/)
end
end
context "when cask token contains platform" do
let(:cask_token) { "token-osx" }
- it "warns about platform in token" do
- expect(subject).to warn_with(/token mentions platform/)
+ it "fails" do
+ expect(subject).to fail_with(/token mentions platform/)
end
end
context "when cask token contains architecture" do
let(:cask_token) { "token-x86" }
- it "warns about architecture in token" do
- expect(subject).to warn_with(/token mentions architecture/)
+ it "fails" do
+ expect(subject).to fail_with(/token mentions architecture/)
end
end
context "when cask token contains framework" do
let(:cask_token) { "token-java" }
- it "warns about framework in token" do
- expect(subject).to warn_with(/cask token mentions framework/)
+ it "fails" do
+ expect(subject).to fail_with(/cask token mentions framework/)
end
end
context "when cask token is framework" do
let(:cask_token) { "java" }
- it "does not warn about framework" do
- expect(subject).not_to warn_with(/token contains version/)
+ it "does not fail" do
+ expect(subject).to pass
end
end
end
@@ -358,206 +364,206 @@ def tmp_cask(name, text)
end
describe "pkg allow_untrusted checks" do
- let(:warning_msg) { "allow_untrusted is not permitted in official Homebrew Cask taps" }
+ let(:message) { "allow_untrusted is not permitted in official Homebrew Cask taps" }
context "when the Cask has no pkg stanza" do
let(:cask_token) { "basic-cask" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask does not have allow_untrusted" do
let(:cask_token) { "with-uninstall-pkgutil" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask has allow_untrusted" do
let(:cask_token) { "with-allow-untrusted" }
- it { is_expected.to warn_with(warning_msg) }
+ it { is_expected.to fail_with(message) }
end
end
describe "when the Cask stanza requires uninstall" do
- let(:warning_msg) { "installer and pkg stanzas require an uninstall stanza" }
+ let(:message) { "installer and pkg stanzas require an uninstall stanza" }
context "when the Cask does not require an uninstall" do
let(:cask_token) { "basic-cask" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the pkg Cask has an uninstall" do
let(:cask_token) { "with-uninstall-pkgutil" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the installer Cask has an uninstall" do
let(:cask_token) { "installer-with-uninstall" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the installer Cask does not have an uninstall" do
let(:cask_token) { "with-installer-manual" }
- it { is_expected.to warn_with(warning_msg) }
+ it { is_expected.to fail_with(message) }
end
context "when the pkg Cask does not have an uninstall" do
let(:cask_token) { "pkg-without-uninstall" }
- it { is_expected.to warn_with(warning_msg) }
+ it { is_expected.to fail_with(message) }
end
end
describe "preflight stanza checks" do
- let(:warning_msg) { "only a single preflight stanza is allowed" }
+ let(:message) { "only a single preflight stanza is allowed" }
context "when the Cask has no preflight stanza" do
let(:cask_token) { "with-zap-rmdir" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask has only one preflight stanza" do
let(:cask_token) { "with-preflight" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask has multiple preflight stanzas" do
let(:cask_token) { "with-preflight-multi" }
- it { is_expected.to warn_with(warning_msg) }
+ it { is_expected.to fail_with(message) }
end
end
- describe "uninstall_postflight stanza checks" do
- let(:warning_msg) { "only a single postflight stanza is allowed" }
+ describe "postflight stanza checks" do
+ let(:message) { "only a single postflight stanza is allowed" }
context "when the Cask has no postflight stanza" do
let(:cask_token) { "with-zap-rmdir" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask has only one postflight stanza" do
let(:cask_token) { "with-postflight" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask has multiple postflight stanzas" do
let(:cask_token) { "with-postflight-multi" }
- it { is_expected.to warn_with(warning_msg) }
+ it { is_expected.to fail_with(message) }
end
end
describe "uninstall stanza checks" do
- let(:warning_msg) { "only a single uninstall stanza is allowed" }
+ let(:message) { "only a single uninstall stanza is allowed" }
context "when the Cask has no uninstall stanza" do
let(:cask_token) { "with-zap-rmdir" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask has only one uninstall stanza" do
let(:cask_token) { "with-uninstall-rmdir" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask has multiple uninstall stanzas" do
let(:cask_token) { "with-uninstall-multi" }
- it { is_expected.to warn_with(warning_msg) }
+ it { is_expected.to fail_with(message) }
end
end
describe "uninstall_preflight stanza checks" do
- let(:warning_msg) { "only a single uninstall_preflight stanza is allowed" }
+ let(:message) { "only a single uninstall_preflight stanza is allowed" }
context "when the Cask has no uninstall_preflight stanza" do
let(:cask_token) { "with-zap-rmdir" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask has only one uninstall_preflight stanza" do
let(:cask_token) { "with-uninstall-preflight" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask has multiple uninstall_preflight stanzas" do
let(:cask_token) { "with-uninstall-preflight-multi" }
- it { is_expected.to warn_with(warning_msg) }
+ it { is_expected.to fail_with(message) }
end
end
describe "uninstall_postflight stanza checks" do
- let(:warning_msg) { "only a single uninstall_postflight stanza is allowed" }
+ let(:message) { "only a single uninstall_postflight stanza is allowed" }
context "when the Cask has no uninstall_postflight stanza" do
let(:cask_token) { "with-zap-rmdir" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask has only one uninstall_postflight stanza" do
let(:cask_token) { "with-uninstall-postflight" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask has multiple uninstall_postflight stanzas" do
let(:cask_token) { "with-uninstall-postflight-multi" }
- it { is_expected.to warn_with(warning_msg) }
+ it { is_expected.to fail_with(message) }
end
end
describe "zap stanza checks" do
- let(:warning_msg) { "only a single zap stanza is allowed" }
+ let(:message) { "only a single zap stanza is allowed" }
context "when the Cask has no zap stanza" do
let(:cask_token) { "with-uninstall-rmdir" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask has only one zap stanza" do
let(:cask_token) { "with-zap-rmdir" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask has multiple zap stanzas" do
let(:cask_token) { "with-zap-multi" }
- it { is_expected.to warn_with(warning_msg) }
+ it { is_expected.to fail_with(message) }
end
end
describe "version checks" do
- let(:error_msg) { "you should use version :latest instead of version 'latest'" }
+ let(:message) { "you should use version :latest instead of version 'latest'" }
context "when version is 'latest'" do
let(:cask_token) { "version-latest-string" }
- it { is_expected.to fail_with(error_msg) }
+ it { is_expected.to fail_with(message) }
end
context "when version is :latest" do
let(:cask_token) { "version-latest-with-checksum" }
- it { is_expected.not_to fail_with(error_msg) }
+ it { is_expected.not_to fail_with(message) }
end
end
@@ -582,93 +588,93 @@ def tmp_cask(name, text)
end
describe "hosting with appcast checks" do
- let(:appcast_warning) { /please add an appcast/ }
+ let(:message) { /please add an appcast/ }
context "when the download does not use hosting with an appcast" do
let(:cask_token) { "basic-cask" }
- it { is_expected.not_to warn_with(appcast_warning) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the download uses GitHub releases and has an appcast" do
let(:cask_token) { "github-with-appcast" }
- it { is_expected.not_to warn_with(appcast_warning) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the download uses GitHub releases and does not have an appcast" do
let(:cask_token) { "github-without-appcast" }
- it { is_expected.to warn_with(appcast_warning) }
+ it { is_expected.to fail_with(message) }
end
context "when the download is hosted on SourceForge and has an appcast" do
let(:cask_token) { "sourceforge-with-appcast" }
- it { is_expected.not_to warn_with(appcast_warning) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the download is hosted on SourceForge and does not have an appcast" do
let(:cask_token) { "sourceforge-correct-url-format" }
- it { is_expected.to warn_with(appcast_warning) }
+ it { is_expected.to fail_with(message) }
end
context "when the download is hosted on DevMate and has an appcast" do
let(:cask_token) { "devmate-with-appcast" }
- it { is_expected.not_to warn_with(appcast_warning) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the download is hosted on DevMate and does not have an appcast" do
let(:cask_token) { "devmate-without-appcast" }
- it { is_expected.to warn_with(appcast_warning) }
+ it { is_expected.to fail_with(message) }
end
context "when the download is hosted on HockeyApp and has an appcast" do
let(:cask_token) { "hockeyapp-with-appcast" }
- it { is_expected.not_to warn_with(appcast_warning) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the download is hosted on HockeyApp and does not have an appcast" do
let(:cask_token) { "hockeyapp-without-appcast" }
- it { is_expected.to warn_with(appcast_warning) }
+ it { is_expected.to fail_with(message) }
end
end
describe "latest with appcast checks" do
- let(:warning_msg) { "Casks with an appcast should not use version :latest" }
+ let(:message) { "Casks with an appcast should not use version :latest" }
context "when the Cask is :latest and does not have an appcast" do
let(:cask_token) { "version-latest" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask is versioned and has an appcast" do
let(:cask_token) { "with-appcast" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "when the Cask is :latest and has an appcast" do
let(:cask_token) { "latest-with-appcast" }
- it { is_expected.to warn_with(warning_msg) }
+ it { is_expected.to fail_with(message) }
end
end
describe "denylist checks" do
- context "when the Cask isn't disallowed" do
+ context "when the Cask is not on the denylist" do
let(:cask_token) { "adobe-air" }
it { is_expected.to pass }
end
- context "when the Cask is disallowed" do
+ context "when the Cask is on the denylist" do
context "and it's in the official Homebrew tap" do
let(:cask_token) { "adobe-illustrator" }
@@ -684,64 +690,64 @@ def tmp_cask(name, text)
end
describe "latest with auto_updates checks" do
- let(:warning_msg) { "Casks with `version :latest` should not use `auto_updates`" }
+ let(:message) { "Casks with `version :latest` should not use `auto_updates`" }
context "when the Cask is :latest and does not have auto_updates" do
let(:cask_token) { "version-latest" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.to pass }
end
context "when the Cask is versioned and does not have auto_updates" do
let(:cask_token) { "basic-cask" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.to pass }
end
context "when the Cask is versioned and has auto_updates" do
let(:cask_token) { "auto-updates" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.to pass }
end
context "when the Cask is :latest and has auto_updates" do
let(:cask_token) { "latest-with-auto-updates" }
- it { is_expected.to warn_with(warning_msg) }
+ it { is_expected.to fail_with(message) }
end
end
describe "preferred download URL formats" do
- let(:warning_msg) { /URL format incorrect/ }
+ let(:message) { /URL format incorrect/ }
context "with incorrect SourceForge URL format" do
let(:cask_token) { "sourceforge-incorrect-url-format" }
- it { is_expected.to warn_with(warning_msg) }
+ it { is_expected.to fail_with(message) }
end
context "with correct SourceForge URL format" do
let(:cask_token) { "sourceforge-correct-url-format" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "with correct SourceForge URL format for version :latest" do
let(:cask_token) { "sourceforge-version-latest-correct-url-format" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
context "with incorrect OSDN URL format" do
let(:cask_token) { "osdn-incorrect-url-format" }
- it { is_expected.to warn_with(warning_msg) }
+ it { is_expected.to fail_with(message) }
end
context "with correct OSDN URL format" do
let(:cask_token) { "osdn-correct-url-format" }
- it { is_expected.not_to warn_with(warning_msg) }
+ it { is_expected.not_to fail_with(message) }
end
end
@@ -793,7 +799,7 @@ def tmp_cask(name, text)
context "when cask token does not conflict with a core formula" do
let(:formula_names) { %w[other-formula] }
- it { is_expected.not_to warn_with(/possible duplicate/) }
+ it { is_expected.to pass }
end
end
@@ -802,27 +808,28 @@ def tmp_cask(name, text)
let(:cask) { Cask::CaskLoader.load(cask_token) }
let(:download_double) { instance_double(Cask::Download) }
let(:verify) { class_double(Cask::Verify).as_stubbed_const }
- let(:error_msg) { "Download Failed" }
+ let(:message) { "Download Failed" }
before do
allow(audit).to receive(:download).and_return(download_double)
+ allow(audit).to receive(:check_https_availability)
end
it "when download and verification succeed it does not fail" do
expect(download_double).to receive(:perform)
expect(verify).to receive(:all)
- expect(subject).not_to fail_with(/#{error_msg}/)
+ expect(subject).to pass
end
- it "when download fails it does not fail" do
- expect(download_double).to receive(:perform).and_raise(StandardError.new(error_msg))
- expect(subject).to fail_with(/#{error_msg}/)
+ it "when download fails it fails" do
+ expect(download_double).to receive(:perform).and_raise(StandardError.new(message))
+ expect(subject).to fail_with(/#{message}/)
end
- it "when verification fails it does not fail" do
+ it "when verification fails it fails" do
expect(download_double).to receive(:perform)
- expect(verify).to receive(:all).and_raise(StandardError.new(error_msg))
- expect(subject).to fail_with(/#{error_msg}/)
+ expect(verify).to receive(:all).and_raise(StandardError.new(message))
+ expect(subject).to fail_with(/#{message}/)
end
end
@@ -853,16 +860,16 @@ def tmp_cask(name, text)
context "when `new_cask` is true" do
let(:new_cask) { true }
- it "warns" do
- expect(subject).to warn_with(/should have a description/)
+ it "fails" do
+ expect(subject).to fail_with(/should have a description/)
end
end
- context "when `new_cask` is true" do
+ context "when `new_cask` is false" do
let(:new_cask) { false }
- it "does not warn" do
- expect(subject).not_to warn_with(/should have a description/)
+ it "warns" do
+ expect(subject).to warn_with(/should have a description/)
end
end
end
@@ -883,8 +890,8 @@ def tmp_cask(name, text)
RUBY
end
- it "does not warn" do
- expect(subject).not_to warn_with(/should have a description/)
+ it "passes" do
+ expect(subject).to pass
end
end
end | true |
Other | Homebrew | brew | c098ce5d16b3b9ca253ca07ffd44cf98cd7366f1.json | Fix tests for `cask audit`. | Library/Homebrew/test/cask/cmd/cat_spec.rb | @@ -15,6 +15,8 @@
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "https://brew.sh/TestCask.dmg"
+ name "Basic Cask"
+ desc "Cask for testing basic functionality"
homepage "https://brew.sh/"
app "TestCask.app" | true |
Other | Homebrew | brew | c098ce5d16b3b9ca253ca07ffd44cf98cd7366f1.json | Fix tests for `cask audit`. | Library/Homebrew/test/support/fixtures/cask/Casks/adobe-air.rb | @@ -3,7 +3,8 @@
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "https://brew.sh/TestCask.dmg"
- name "Adobe Air"
+ name "Adobe AIR"
+ desc "Cross-platform application runtime"
homepage "https://brew.sh/"
app "TestCask.app" | true |
Other | Homebrew | brew | c098ce5d16b3b9ca253ca07ffd44cf98cd7366f1.json | Fix tests for `cask audit`. | Library/Homebrew/test/support/fixtures/cask/Casks/auto-updates.rb | @@ -3,6 +3,8 @@
sha256 "5633c3a0f2e572cbf021507dec78c50998b398c343232bdfc7e26221d0a5db4d"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip"
+ name "Auto-Updates"
+ desc "Cask which auto-updates"
homepage "https://brew.sh/MyFancyApp"
auto_updates true | true |
Other | Homebrew | brew | c098ce5d16b3b9ca253ca07ffd44cf98cd7366f1.json | Fix tests for `cask audit`. | Library/Homebrew/test/support/fixtures/cask/Casks/basic-cask.rb | @@ -3,6 +3,8 @@
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "https://brew.sh/TestCask.dmg"
+ name "Basic Cask"
+ desc "Cask for testing basic functionality"
homepage "https://brew.sh/"
app "TestCask.app" | true |
Other | Homebrew | brew | c098ce5d16b3b9ca253ca07ffd44cf98cd7366f1.json | Fix tests for `cask audit`. | Library/Homebrew/test/support/fixtures/cask/Casks/latest-with-auto-updates.rb | @@ -3,6 +3,8 @@
sha256 :no_check
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
+ name "Latest with Auto-Updates"
+ desc "Unversioned cask which auto-updates"
homepage "https://brew.sh/latest-with-auto-updates"
auto_updates true | true |
Other | Homebrew | brew | c098ce5d16b3b9ca253ca07ffd44cf98cd7366f1.json | Fix tests for `cask audit`. | Library/Homebrew/test/support/fixtures/cask/Casks/pkg-without-uninstall.rb | @@ -3,6 +3,8 @@
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
+ name "PKG without Uninstall"
+ desc "Cask with a package installer and no uninstall stanza"
homepage "https://brew.sh/fancy-pkg"
pkg "Fancy.pkg" | true |
Other | Homebrew | brew | c098ce5d16b3b9ca253ca07ffd44cf98cd7366f1.json | Fix tests for `cask audit`. | Library/Homebrew/test/support/fixtures/cask/Casks/version-latest.rb | @@ -3,6 +3,8 @@
sha256 :no_check
url "file://#{TEST_FIXTURE_DIR}/cask/caffeines.zip"
+ name "Version Latest"
+ desc "Unversioned cask"
homepage "https://brew.sh/"
app "Caffeine Mini.app" | true |
Other | Homebrew | brew | c098ce5d16b3b9ca253ca07ffd44cf98cd7366f1.json | Fix tests for `cask audit`. | Library/Homebrew/test/support/fixtures/cask/Casks/with-binary.rb | @@ -3,6 +3,8 @@
sha256 "d5b2dfbef7ea28c25f7a77cd7fa14d013d82b626db1d82e00e25822464ba19e2"
url "file://#{TEST_FIXTURE_DIR}/cask/AppWithBinary.zip"
+ name "With Binary"
+ desc "Cask with a binary stanza"
homepage "https://brew.sh/with-binary"
app "App.app" | true |
Other | Homebrew | brew | c098ce5d16b3b9ca253ca07ffd44cf98cd7366f1.json | Fix tests for `cask audit`. | Library/Homebrew/test/support/fixtures/cask/Casks/with-installer-manual.rb | @@ -3,6 +3,8 @@
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
+ name "With Installer Manual"
+ desc "Cask with a manual installer"
homepage "https://brew.sh/"
installer manual: "Caffeine.app" | true |
Other | Homebrew | brew | c098ce5d16b3b9ca253ca07ffd44cf98cd7366f1.json | Fix tests for `cask audit`. | Library/Homebrew/test/support/fixtures/third-party/Casks/pharo.rb | @@ -4,6 +4,7 @@
url "https://brew.sh/ThirdParty.dmg"
name "Pharo"
+ desc "Cask from a third-party tap"
homepage "https://brew.sh/"
app "ThirdParty.app" | true |
Other | Homebrew | brew | e4356e85d1584ff0de83725875b6e347b8229353.json | Treat more things as errors in `cask audit`. | Library/Homebrew/cask/audit.rb | @@ -143,7 +143,7 @@ def check_untrusted_pkg
return unless cask.artifacts.any? { |k| k.is_a?(Artifact::Pkg) && k.stanza_options.key?(:allow_untrusted) }
- add_warning "allow_untrusted is not permitted in official Homebrew Cask taps"
+ add_error "allow_untrusted is not permitted in official Homebrew Cask taps"
end
def check_stanza_requires_uninstall
@@ -152,14 +152,14 @@ def check_stanza_requires_uninstall
return if cask.artifacts.none? { |k| k.is_a?(Artifact::Pkg) || k.is_a?(Artifact::Installer) }
return if cask.artifacts.any? { |k| k.is_a?(Artifact::Uninstall) }
- add_warning "installer and pkg stanzas require an uninstall stanza"
+ add_error "installer and pkg stanzas require an uninstall stanza"
end
def check_single_pre_postflight
odebug "Auditing preflight and postflight stanzas"
if cask.artifacts.count { |k| k.is_a?(Artifact::PreflightBlock) && k.directives.key?(:preflight) } > 1
- add_warning "only a single preflight stanza is allowed"
+ add_error "only a single preflight stanza is allowed"
end
count = cask.artifacts.count do |k|
@@ -168,33 +168,33 @@ def check_single_pre_postflight
end
return unless count > 1
- add_warning "only a single postflight stanza is allowed"
+ add_error "only a single postflight stanza is allowed"
end
def check_single_uninstall_zap
odebug "Auditing single uninstall_* and zap stanzas"
if cask.artifacts.count { |k| k.is_a?(Artifact::Uninstall) } > 1
- add_warning "only a single uninstall stanza is allowed"
+ add_error "only a single uninstall stanza is allowed"
end
count = cask.artifacts.count do |k|
k.is_a?(Artifact::PreflightBlock) &&
k.directives.key?(:uninstall_preflight)
end
- add_warning "only a single uninstall_preflight stanza is allowed" if count > 1
+ add_error "only a single uninstall_preflight stanza is allowed" if count > 1
count = cask.artifacts.count do |k|
k.is_a?(Artifact::PostflightBlock) &&
k.directives.key?(:uninstall_postflight)
end
- add_warning "only a single uninstall_postflight stanza is allowed" if count > 1
+ add_error "only a single uninstall_postflight stanza is allowed" if count > 1
return unless cask.artifacts.count { |k| k.is_a?(Artifact::Zap) } > 1
- add_warning "only a single zap stanza is allowed"
+ add_error "only a single zap stanza is allowed"
end
def check_required_stanzas
@@ -267,14 +267,14 @@ def check_latest_with_appcast
return unless cask.version.latest?
return unless cask.appcast
- add_warning "Casks with an appcast should not use version :latest"
+ add_error "Casks with an appcast should not use version :latest"
end
def check_latest_with_auto_updates
return unless cask.version.latest?
return unless cask.auto_updates
- add_warning "Casks with `version :latest` should not use `auto_updates`"
+ add_error "Casks with `version :latest` should not use `auto_updates`"
end
def check_hosting_with_appcast
@@ -286,15 +286,15 @@ def check_hosting_with_appcast
when %r{github.com/([^/]+)/([^/]+)/releases/download/(\S+)}
return if cask.version.latest?
- add_warning "Download uses GitHub releases, #{add_appcast}"
+ add_error "Download uses GitHub releases, #{add_appcast}"
when %r{sourceforge.net/(\S+)}
return if cask.version.latest?
- add_warning "Download is hosted on SourceForge, #{add_appcast}"
+ add_error "Download is hosted on SourceForge, #{add_appcast}"
when %r{dl.devmate.com/(\S+)}
- add_warning "Download is hosted on DevMate, #{add_appcast}"
+ add_error "Download is hosted on DevMate, #{add_appcast}"
when %r{rink.hockeyapp.net/(\S+)}
- add_warning "Download is hosted on HockeyApp, #{add_appcast}"
+ add_error "Download is hosted on HockeyApp, #{add_appcast}"
end
end
@@ -303,7 +303,7 @@ def check_desc
return if cask.desc.present?
- add_warning "Cask should have a description. Please add a `desc` stanza."
+ add_error "Cask should have a description. Please add a `desc` stanza."
end
def check_url
@@ -315,9 +315,9 @@ def check_url
def check_download_url_format
odebug "Auditing URL format"
if bad_sourceforge_url?
- add_warning "SourceForge URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
+ add_error "SourceForge URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
elsif bad_osdn_url?
- add_warning "OSDN URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
+ add_error "OSDN URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
end
end
@@ -363,42 +363,33 @@ def check_token_conflicts
end
def check_token_valid
- return unless strict?
-
- add_warning "cask token is not lowercase" if cask.token.downcase!
-
- add_warning "cask token contains non-ascii characters" unless cask.token.ascii_only?
-
- add_warning "cask token + should be replaced by -plus-" if cask.token.include? "+"
-
- add_warning "cask token @ should be replaced by -at-" if cask.token.include? "@"
-
- add_warning "cask token whitespace should be replaced by hyphens" if cask.token.include? " "
-
- add_warning "cask token underscores should be replaced by hyphens" if cask.token.include? "_"
+ add_error "cask token contains non-ascii characters" unless cask.token.ascii_only?
+ add_error "cask token + should be replaced by -plus-" if cask.token.include? "+"
+ add_error "cask token whitespace should be replaced by hyphens" if cask.token.include? " "
+ add_error "cask token @ should be replaced by -at-" if cask.token.include? "@"
+ add_error "cask token underscores should be replaced by hyphens" if cask.token.include? "_"
+ add_error "cask token should not contain double hyphens" if cask.token.include? "--"
if cask.token.match?(/[^a-z0-9\-]/)
- add_warning "cask token should only contain alphanumeric characters and hyphens"
+ add_error "cask token should only contain lowercase alphanumeric characters and hyphens"
end
- add_warning "cask token should not contain double hyphens" if cask.token.include? "--"
-
- return unless cask.token.end_with?("-") || cask.token.start_with?("-")
+ return unless cask.token.start_with?("-") || cask.token.end_with?("-")
- add_warning "cask token should not have leading or trailing hyphens"
+ add_error "cask token should not have leading or trailing hyphens"
end
def check_token_bad_words
return unless strict?
token = cask.token
- add_warning "cask token contains .app" if token.end_with? ".app"
+ add_error "cask token contains .app" if token.end_with? ".app"
if /-(?<designation>alpha|beta|rc|release-candidate)$/ =~ cask.token &&
cask.tap&.official? &&
cask.tap != "homebrew/cask-versions"
- add_warning "cask token contains version designation '#{designation}'"
+ add_error "cask token contains version designation '#{designation}'"
end
add_warning "cask token mentions launcher" if token.end_with? "launcher"
@@ -433,7 +424,7 @@ def check_download
downloaded_path = download.perform
Verify.all(cask, downloaded_path)
rescue => e
- add_error "download not possible: #{e.message}"
+ add_error "download not possible: #{e}"
end
def check_appcast_contains_version
@@ -458,7 +449,7 @@ def check_appcast_contains_version
end
return if appcast_contents.include? adjusted_version_stanza
- add_warning "appcast at URL '#{appcast_stanza}' does not contain"\
+ add_error "appcast at URL '#{appcast_stanza}' does not contain"\
" the version number '#{adjusted_version_stanza}':\n#{appcast_contents}"
end
| false |
Other | Homebrew | brew | 8a4b433dbf95929fd5e14bc31a4d65a25f260689.json | sorbet: update RBI files using Tapioca.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml). | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -13114,8 +13114,6 @@ Net::HTTPClientError::EXCEPTION_TYPE = Net::HTTPServerException
Net::HTTPClientErrorCode = Net::HTTPClientError
-Net::HTTPClientException = Net::HTTPServerException
-
class Net::HTTPEarlyHints
HAS_BODY = ::T.let(nil, ::T.untyped)
end | false |
Other | Homebrew | brew | f21591fd65c1492921fb956b1fbd6912d5f00afc.json | Ignore URLs protected by Incapsula. | Library/Homebrew/utils/curl.rb | @@ -122,6 +122,20 @@ def curl_output(*args, **options)
curl_with_workarounds(*args, print_stderr: false, show_output: true, **options)
end
+# Check if a URL is protected by CloudFlare (e.g. badlion.net and jaxx.io).
+def url_protected_by_cloudflare?(details)
+ [403, 503].include?(details[:status].to_i) &&
+ details[:headers].match?(/^Set-Cookie: __cfduid=/i) &&
+ details[:headers].match?(/^Server: cloudflare/i)
+end
+
+# Check if a URL is protected by Incapsula (e.g. corsair.com).
+def url_protected_by_incapsula?(details)
+ details[:status].to_i == 403 &&
+ details[:headers].match?(/^Set-Cookie: visid_incap_/i) &&
+ details[:headers].match?(/^Set-Cookie: incap_ses_/i)
+end
+
def curl_check_http_content(url, user_agents: [:default], check_content: false, strict: false)
return unless url.start_with? "http"
@@ -142,12 +156,7 @@ def curl_check_http_content(url, user_agents: [:default], check_content: false,
end
unless http_status_ok?(details[:status])
- # Check if the URL is protected by CloudFlare.
- if [403, 503].include?(details[:status].to_i) &&
- details[:headers].include?("set-cookie: __cfduid=") &&
- details[:headers].include?("server: cloudflare")
- return
- end
+ return if url_protected_by_cloudflare?(details) || url_protected_by_incapsula?(details)
return "The URL #{url} is not reachable (HTTP status code #{details[:status]})"
end | false |
Other | Homebrew | brew | cccbb0b4ef767e644eb6db37c0c6c29ed0fabf80.json | sorbet: add new files and solve existing errors
Add 12 new files to sorbet/files.yaml and solve existing type errors.
36 errors=> 33 errors. | Library/Homebrew/sorbet/files.yaml | @@ -133,6 +133,7 @@ false:
- ./dependency.rb
- ./dev-cmd/audit.rb
- ./dev-cmd/bottle.rb
+ - ./dev-cmd/bump-cask-pr.rb
- ./dev-cmd/bump-formula-pr.rb
- ./dev-cmd/bump-revision.rb
- ./dev-cmd/cat.rb
@@ -145,6 +146,7 @@ false:
- ./dev-cmd/install-bundler-gems.rb
- ./dev-cmd/irb.rb
- ./dev-cmd/linkage.rb
+ - ./dev-cmd/livecheck.rb
- ./dev-cmd/man.rb
- ./dev-cmd/mirror.rb
- ./dev-cmd/pr-automerge.rb
@@ -161,6 +163,7 @@ false:
- ./dev-cmd/tap-new.rb
- ./dev-cmd/test.rb
- ./dev-cmd/tests.rb
+ - ./dev-cmd/typecheck.rb
- ./dev-cmd/unpack.rb
- ./dev-cmd/update-license-data.rb
- ./dev-cmd/update-python-resources.rb
@@ -561,6 +564,7 @@ false:
- ./test/dependencies_helpers_spec.rb
- ./test/descriptions_spec.rb
- ./test/dev-cmd/bottle_spec.rb
+ - ./test/dev-cmd/bump-cask-pr_spec.rb
- ./test/dev-cmd/bump-formula-pr_spec.rb
- ./test/dev-cmd/bump-revision_spec.rb
- ./test/dev-cmd/cat_spec.rb
@@ -577,7 +581,6 @@ false:
- ./test/dev-cmd/pr-pull_spec.rb
- ./test/dev-cmd/pr-upload_spec.rb
- ./test/dev-cmd/prof_spec.rb
- - ./test/dev-cmd/pull_spec.rb
- ./test/dev-cmd/release-notes_spec.rb
- ./test/dev-cmd/ruby_spec.rb
- ./test/dev-cmd/sh_spec.rb
@@ -797,6 +800,7 @@ false:
- ./test/support/fixtures/testball.rb
- ./test/support/fixtures/third-party/Casks/pharo.rb
- ./test/support/fixtures/third-party/Casks/third-party-cask.rb
+ - ./test/support/github_formatter.rb
- ./test/support/helper/mktmpdir.rb
- ./test/support/helper/output_as_tty.rb
- ./test/support/helper/spec/shared_examples/formulae_exist.rb
@@ -821,14 +825,17 @@ false:
- ./test/utils/curl_spec.rb
- ./test/utils/git_spec.rb
- ./test/utils/github_spec.rb
+ - ./test/utils/github/actions_spec.rb
- ./test/utils/popen_spec.rb
- ./test/utils/shell_spec.rb
- ./test/utils/spdx_spec.rb
- ./test/utils/svn_spec.rb
+ - ./test/utils/tar_spec.rb
- ./test/utils/tty_spec.rb
- ./test/version_spec.rb
- ./unpack_strategy/uncompressed.rb
- ./utils/gems.rb
+ - ./utils/github/actions.rb
- ./utils/pypi.rb
- ./version.rb
@@ -855,6 +862,7 @@ true:
- ./dependable.rb
- ./dependencies_helpers.rb
- ./dependency_collector.rb
+ - ./deprecate_disable.rb
- ./description_cache_store.rb
- ./descriptions.rb
- ./env_config.rb
@@ -902,11 +910,13 @@ true:
- ./utils/bottles.rb
- ./utils/inreplace.rb
- ./utils/link.rb
+ - ./utils/ruby_check_version_script.rb
- ./utils/shared_audits.rb
- ./utils/shebang.rb
- ./utils/shell.rb
- ./utils/spdx.rb
- ./utils/svn.rb
+ - ./utils/tar.rb
- ./utils/tty.rb
- ./utils/user.rb
- ./version/null.rb | true |
Other | Homebrew | brew | cccbb0b4ef767e644eb6db37c0c6c29ed0fabf80.json | sorbet: add new files and solve existing errors
Add 12 new files to sorbet/files.yaml and solve existing type errors.
36 errors=> 33 errors. | Library/Homebrew/sorbet/rbi/homebrew.rbi | @@ -38,6 +38,10 @@ class Formula
def active_spec; end
+ def any_installed_keg; end
+
+ def latest_installed_prefix; end
+
def patches; end
end
end | true |
Other | Homebrew | brew | cccbb0b4ef767e644eb6db37c0c6c29ed0fabf80.json | sorbet: add new files and solve existing errors
Add 12 new files to sorbet/files.yaml and solve existing type errors.
36 errors=> 33 errors. | Library/Homebrew/sorbet/rbi/utils/utils.rbi | @@ -13,4 +13,8 @@ module Utils
module Shebang
include Kernel
end
+
+ module Tar
+ include Kernel
+ end
end | true |
Other | Homebrew | brew | c98deebdbf0cfac6d9c6c86fa0af138f334d7e99.json | sorbet: Add a RBI file for `utils/svn.rb` typechecking
- Needed to `include Kernel` otherwise Sorbet couldn't find the
`system_command` method.
- I've also attempted to construct method signatures for all the methods.
- Before, `brew typecheck` surfaced 36 errors. Now we're down to 33 errors. | Library/Homebrew/sorbet/rbi/utils/svn.rbi | @@ -0,0 +1,14 @@
+# typed: strict
+
+module Utils::Svn
+ include Kernel
+
+ sig { returns(T::Boolean) }
+ def available?; end
+
+ sig { returns(T.nilable(String)) }
+ def version; end
+
+ sig { params(url: String).returns(T::Boolean) }
+ def remote_exists?(url); end
+end | false |
Other | Homebrew | brew | 7654cf87e99ece6eb3725e3d90ed089dca55a19d.json | sorbet: update RBI files using Tapioca.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml). | Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.8.0.rbi | @@ -1,6 +1,6 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `rubocop-performance` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
+# Please instead update this file by running `tapioca sync`.
# typed: true
@@ -13,18 +13,23 @@ end
module RuboCop::Cop::Performance
end
-class RuboCop::Cop::Performance::AncestorsInclude < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::AncestorsInclude < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
def ancestors_include_candidate?(node = T.unsafe(nil)); end
- def autocorrect(node); end
def on_send(node); end
+
+ private
+
+ def range(node); end
end
RuboCop::Cop::Performance::AncestorsInclude::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def big_decimal_with_numeric_argument?(node = T.unsafe(nil)); end
def on_send(node); end
@@ -35,11 +40,11 @@ end
RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::BindCall < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::BindCall < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
extend(::RuboCop::Cop::TargetRubyVersion)
- def autocorrect(node); end
def bind_with_call_method?(node = T.unsafe(nil)); end
def on_send(node); end
@@ -52,7 +57,7 @@ end
RuboCop::Cop::Performance::BindCall::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::Caller < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::Caller < ::RuboCop::Cop::Base
def caller_with_scope_method?(node = T.unsafe(nil)); end
def on_send(node); end
def slow_caller?(node = T.unsafe(nil)); end
@@ -67,21 +72,23 @@ RuboCop::Cop::Performance::Caller::MSG_BRACE = T.let(T.unsafe(nil), String)
RuboCop::Cop::Performance::Caller::MSG_FIRST = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::CaseWhenSplat < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::CaseWhenSplat < ::RuboCop::Cop::Base
include(::RuboCop::Cop::Alignment)
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(when_node); end
def on_case(case_node); end
private
+ def autocorrect(corrector, when_node); end
def indent_for(node); end
def inline_fix_branch(corrector, when_node); end
def needs_reorder?(when_node); end
def new_branch_without_then(node, new_condition); end
def new_condition_with_then(node, new_condition); end
def non_splat?(condition); end
+ def range(node); end
def reorder_condition(corrector, when_node); end
def reordering_correction(when_node); end
def replacement(conditions); end
@@ -93,8 +100,9 @@ RuboCop::Cop::Performance::CaseWhenSplat::ARRAY_MSG = T.let(T.unsafe(nil), Strin
RuboCop::Cop::Performance::CaseWhenSplat::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def downcase_downcase(node = T.unsafe(nil)); end
def downcase_eq(node = T.unsafe(nil)); end
def eq_downcase(node = T.unsafe(nil)); end
@@ -103,15 +111,15 @@ class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Cop
private
def build_good_method(arg, variable); end
- def correction(node, _receiver, method, arg, variable); end
+ def correction(corrector, node, method, arg, variable); end
def take_method_apart(node); end
end
RuboCop::Cop::Performance::Casecmp::CASE_METHODS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Performance::Casecmp::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
def flat_map_candidate?(node = T.unsafe(nil)); end
@@ -128,10 +136,44 @@ RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY_WHEN_NO_BLOCK
RuboCop::Cop::Performance::ChainArrayAllocation::RETURN_NEW_ARRAY_WHEN_ARGS = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::CompareWithBlock < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::CollectionLiteralInLoop < ::RuboCop::Cop::Base
+ def enumerable_loop?(node = T.unsafe(nil)); end
+ def kernel_loop?(node = T.unsafe(nil)); end
+ def on_send(node); end
+
+ private
+
+ def check_literal?(node, method); end
+ def enumerable_method?(method_name); end
+ def keyword_loop?(type); end
+ def literal_class(node); end
+ def loop?(ancestor, node); end
+ def min_size; end
+ def node_within_enumerable_loop?(node, ancestor); end
+ def nonmutable_method_of_array_or_hash?(node, method); end
+ def parent_is_loop?(node); end
+end
+
+RuboCop::Cop::Performance::CollectionLiteralInLoop::ARRAY_METHODS = T.let(T.unsafe(nil), Set)
+
+RuboCop::Cop::Performance::CollectionLiteralInLoop::ENUMERABLE_METHOD_NAMES = T.let(T.unsafe(nil), Set)
+
+RuboCop::Cop::Performance::CollectionLiteralInLoop::HASH_METHODS = T.let(T.unsafe(nil), Set)
+
+RuboCop::Cop::Performance::CollectionLiteralInLoop::LOOP_TYPES = T.let(T.unsafe(nil), Array)
+
+RuboCop::Cop::Performance::CollectionLiteralInLoop::MSG = T.let(T.unsafe(nil), String)
+
+RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Array)
+
+RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Array)
+
+RuboCop::Cop::Performance::CollectionLiteralInLoop::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array)
+
+class RuboCop::Cop::Performance::CompareWithBlock < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def compare?(node = T.unsafe(nil)); end
def on_block(node); end
def replaceable_body?(node = T.unsafe(nil), param1, param2); end
@@ -145,26 +187,27 @@ end
RuboCop::Cop::Performance::CompareWithBlock::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def count_candidate?(node = T.unsafe(nil)); end
def on_send(node); end
private
+ def autocorrect(corrector, node, selector_node, selector); end
def eligible_node?(node); end
def source_starting_at(node); end
end
RuboCop::Cop::Performance::Count::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::DeletePrefix < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::DeletePrefix < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RegexpMetacharacter)
+ extend(::RuboCop::Cop::AutoCorrector)
extend(::RuboCop::Cop::TargetRubyVersion)
- def autocorrect(node); end
def delete_prefix_candidate?(node = T.unsafe(nil)); end
def on_send(node); end
end
@@ -173,11 +216,11 @@ RuboCop::Cop::Performance::DeletePrefix::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Performance::DeletePrefix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash)
-class RuboCop::Cop::Performance::DeleteSuffix < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::DeleteSuffix < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RegexpMetacharacter)
+ extend(::RuboCop::Cop::AutoCorrector)
extend(::RuboCop::Cop::TargetRubyVersion)
- def autocorrect(node); end
def delete_suffix_candidate?(node = T.unsafe(nil)); end
def on_send(node); end
end
@@ -186,14 +229,16 @@ RuboCop::Cop::Performance::DeleteSuffix::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Performance::DeleteSuffix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash)
-class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def detect_candidate?(node = T.unsafe(nil)); end
def on_send(node); end
private
def accept_first_call?(receiver, body); end
+ def autocorrect(corrector, node); end
def lazy?(node); end
def preferred_method; end
def register_offense(node, receiver, second_method); end
@@ -203,34 +248,36 @@ RuboCop::Cop::Performance::Detect::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::DoubleStartEndWith < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::DoubleStartEndWith < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def check_with_active_support_aliases(node = T.unsafe(nil)); end
def on_or(node); end
def two_start_end_with_calls(node = T.unsafe(nil)); end
private
- def add_offense_for_double_call(node, receiver, method, combined_args); end
+ def autocorrect(corrector, first_call_args, second_call_args, combined_args); end
def check_for_active_support_aliases?; end
def combine_args(first_call_args, second_call_args); end
+ def message(node, receiver, method, combined_args); end
def process_source(node); end
end
RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::EndWith < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::EndWith < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RegexpMetacharacter)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_match_with_lvasgn(node); end
def on_send(node); end
def redundant_regex?(node = T.unsafe(nil)); end
end
RuboCop::Cop::Performance::EndWith::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Base
def counter(node = T.unsafe(nil)); end
def on_send(node); end
@@ -246,15 +293,16 @@ end
RuboCop::Cop::Performance::FixedSize::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::FlatMap < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::FlatMap < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def flat_map_candidate?(node = T.unsafe(nil)); end
def on_send(node); end
private
+ def autocorrect(corrector, node); end
def offense_for_levels(node, map_node, first_method, flatten); end
def offense_for_method(node, map_node, first_method, flatten); end
def register_offense(node, map_node, first_method, flatten, message); end
@@ -264,8 +312,9 @@ RuboCop::Cop::Performance::FlatMap::FLATTEN_MULTIPLE_LEVELS = T.let(T.unsafe(nil
RuboCop::Cop::Performance::FlatMap::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::InefficientHashSearch < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::InefficientHashSearch < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def inefficient_include?(node = T.unsafe(nil)); end
def on_send(node); end
@@ -279,46 +328,48 @@ class RuboCop::Cop::Performance::InefficientHashSearch < ::RuboCop::Cop::Cop
def use_long_method; end
end
-class RuboCop::Cop::Performance::IoReadlines < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::IoReadlines < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_send(node); end
def readlines_on_class?(node = T.unsafe(nil)); end
def readlines_on_instance?(node = T.unsafe(nil)); end
private
+ def autocorrect(corrector, enumerable_call, readlines_call, receiver); end
def build_bad_method(enumerable_call); end
def build_call_args(call_args_node); end
def build_good_method(enumerable_call); end
def correction_range(enumerable_call, readlines_call); end
def enumerable_method?(node); end
- def offense(node, enumerable_call, readlines_call); end
def offense_range(enumerable_call, readlines_call); end
end
RuboCop::Cop::Performance::IoReadlines::ENUMERABLE_METHODS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Performance::IoReadlines::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::OpenStruct < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::OpenStruct < ::RuboCop::Cop::Base
def on_send(node); end
def open_struct(node = T.unsafe(nil)); end
end
RuboCop::Cop::Performance::OpenStruct::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::RangeInclude < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::RangeInclude < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def on_send(node); end
def range_include(node = T.unsafe(nil)); end
end
RuboCop::Cop::Performance::RangeInclude::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def blockarg_assigned?(node0, param1); end
def blockarg_calls(node0, param1); end
def blockarg_def(node = T.unsafe(nil)); end
@@ -327,6 +378,7 @@ class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Cop
private
def args_include_block_pass?(blockcall); end
+ def autocorrect(corrector, node); end
def calls_to_report(argname, body); end
end
@@ -340,25 +392,31 @@ RuboCop::Cop::Performance::RedundantBlockCall::SPACE = T.let(T.unsafe(nil), Stri
RuboCop::Cop::Performance::RedundantBlockCall::YIELD = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::RedundantMatch < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::RedundantMatch < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def match_call?(node = T.unsafe(nil)); end
def on_send(node); end
def only_truthiness_matters?(node = T.unsafe(nil)); end
+
+ private
+
+ def autocorrect(corrector, node); end
end
RuboCop::Cop::Performance::RedundantMatch::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::RedundantMerge < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::RedundantMerge < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def modifier_flow_control?(node = T.unsafe(nil)); end
def on_send(node); end
def redundant_merge_candidate(node = T.unsafe(nil)); end
private
- def correct_multiple_elements(node, parent, new_source); end
- def correct_single_element(node, new_source); end
+ def correct_multiple_elements(corrector, node, parent, new_source); end
+ def correct_single_element(corrector, node, new_source); end
def each_redundant_merge(node); end
def indent_width; end
def kwsplat_used?(pairs); end
@@ -395,11 +453,11 @@ RuboCop::Cop::Performance::RedundantMerge::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Performance::RedundantMerge::WITH_MODIFIER_CORRECTION = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::RedundantSortBlock < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::RedundantSortBlock < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
include(::RuboCop::Cop::SortBlock)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_block(node); end
private
@@ -409,10 +467,10 @@ end
RuboCop::Cop::Performance::RedundantSortBlock::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::RedundantStringChars < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::RedundantStringChars < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_send(node); end
def redundant_chars_call?(node = T.unsafe(nil)); end
@@ -431,8 +489,9 @@ RuboCop::Cop::Performance::RedundantStringChars::MSG = T.let(T.unsafe(nil), Stri
RuboCop::Cop::Performance::RedundantStringChars::REPLACEABLE_METHODS = T.let(T.unsafe(nil), Array)
-class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def last_matches(node0); end
def match_method?(node = T.unsafe(nil)); end
def match_node?(node = T.unsafe(nil)); end
@@ -446,6 +505,7 @@ class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Cop
private
+ def autocorrect(corrector, node); end
def check_condition(cond); end
def correct_operator(corrector, recv, arg, oper = T.unsafe(nil)); end
def correction_range(recv, arg); end
@@ -468,22 +528,26 @@ RuboCop::Cop::Performance::RegexpMatch::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Performance::RegexpMatch::TYPES_IMPLEMENTING_MATCH = T.let(T.unsafe(nil), Array)
-class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_send(node); end
def reverse_each?(node = T.unsafe(nil)); end
+
+ private
+
+ def replacement_range(node); end
end
RuboCop::Cop::Performance::ReverseEach::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Performance::ReverseEach::UNDERSCORE = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_send(node); end
def reverse_first_candidate?(node = T.unsafe(nil)); end
@@ -497,21 +561,22 @@ end
RuboCop::Cop::Performance::ReverseFirst::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::Size < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::Size < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def array?(node = T.unsafe(nil)); end
- def autocorrect(node); end
def count?(node = T.unsafe(nil)); end
def hash?(node = T.unsafe(nil)); end
def on_send(node); end
end
RuboCop::Cop::Performance::Size::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::SortReverse < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::SortReverse < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
include(::RuboCop::Cop::SortBlock)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_block(node); end
private
@@ -521,8 +586,9 @@ end
RuboCop::Cop::Performance::SortReverse::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def on_send(node); end
def squeeze_candidate?(node = T.unsafe(nil)); end
@@ -535,19 +601,20 @@ RuboCop::Cop::Performance::Squeeze::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Performance::Squeeze::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash)
-class RuboCop::Cop::Performance::StartWith < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::StartWith < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RegexpMetacharacter)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_match_with_lvasgn(node); end
def on_send(node); end
def redundant_regex?(node = T.unsafe(nil)); end
end
RuboCop::Cop::Performance::StartWith::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def on_match_with_lvasgn(node); end
def on_send(node); end
def redundant_regex?(node = T.unsafe(nil)); end
@@ -559,24 +626,25 @@ end
RuboCop::Cop::Performance::StringInclude::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(node); end
def on_send(node); end
- def replace_method(node, first, second, first_param, replacement); end
def string_replacement?(node = T.unsafe(nil)); end
private
def accept_first_param?(first_param); end
def accept_second_param?(second_param); end
+ def autocorrect(corrector, node); end
def first_source(first_param); end
def message(node, first_source, second_source); end
def method_suffix(node); end
def offense(node, first_param, second_param); end
def range(node); end
def remove_second_param(corrector, node, first_param); end
+ def replace_method(corrector, node, first_source, second_source, first_param); end
def replacement_method(node, first_source, second_source); end
def source_from_regex_constructor(node); end
def source_from_regex_literal(node); end
@@ -592,8 +660,34 @@ RuboCop::Cop::Performance::StringReplacement::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Performance::StringReplacement::TR = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::TimesMap < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::Sum < ::RuboCop::Cop::Base
+ include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
+
+ def acc_plus_elem?(node = T.unsafe(nil), param1, param2); end
+ def elem_plus_acc?(node = T.unsafe(nil), param1, param2); end
+ def on_block(node); end
+ def on_send(node); end
+ def sum_candidate?(node = T.unsafe(nil)); end
+ def sum_with_block_candidate?(node = T.unsafe(nil)); end
+
+ private
+
+ def autocorrect(corrector, init, range); end
+ def build_block_bad_method(method, init, var_acc, var_elem, body); end
+ def build_block_message(send, init, var_acc, var_elem, body); end
+ def build_good_method(init); end
+ def build_method_bad_method(init, method); end
+ def build_method_message(method, init); end
+ def sum_block_range(send, node); end
+ def sum_method_range(node); end
+end
+
+RuboCop::Cop::Performance::Sum::MSG = T.let(T.unsafe(nil), String)
+
+class RuboCop::Cop::Performance::TimesMap < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def on_block(node); end
def on_send(node); end
def times_map_call(node = T.unsafe(nil)); end
@@ -608,16 +702,17 @@ RuboCop::Cop::Performance::TimesMap::MESSAGE = T.let(T.unsafe(nil), String)
RuboCop::Cop::Performance::TimesMap::MESSAGE_ONLY_IF = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Base
def dup_string?(node = T.unsafe(nil)); end
def on_send(node); end
def string_new?(node = T.unsafe(nil)); end
end
RuboCop::Cop::Performance::UnfreezeString::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Performance::UriDefaultParser < ::RuboCop::Cop::Cop
- def autocorrect(node); end
+class RuboCop::Cop::Performance::UriDefaultParser < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def on_send(node); end
def uri_parser_new?(node = T.unsafe(nil)); end
end | true |
Other | Homebrew | brew | 7654cf87e99ece6eb3725e3d90ed089dca55a19d.json | sorbet: update RBI files using Tapioca.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml). | Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.5.rbi | @@ -173,8 +173,8 @@ class Tapioca::Compilers::SymbolTable::SymbolGenerator
def compile_object(name, value); end
sig { params(constant: Module).returns(String) }
def compile_props(constant); end
- sig { params(signature: T.untyped).returns(String) }
- def compile_signature(signature); end
+ sig { params(signature: T.untyped, parameters: T::Array[[Symbol, String]]).returns(String) }
+ def compile_signature(signature, parameters); end
sig { params(name: String, constant: Module).returns(T.nilable(String)) }
def compile_subconstants(name, constant); end
sig { params(constant: Class).returns(String) } | true |
Other | Homebrew | brew | 7654cf87e99ece6eb3725e3d90ed089dca55a19d.json | sorbet: update RBI files using Tapioca.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml). | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -8162,6 +8162,8 @@ module Homebrew::EnvConfig
def self.temp(); end
+ def self.update_report_only_installed?(); end
+
def self.update_to_tag?(); end
def self.verbose?(); end | true |
Other | Homebrew | brew | cea6bf6efe52c318a4e33ec2f4fd0374db34b090.json | formula: add missing SPDX require.
https://github.com/Homebrew/formulae.brew.sh/pull/328/checks?check_run_id=1102740199#step:6:5 | Library/Homebrew/formula.rb | @@ -23,6 +23,7 @@
require "tab"
require "mktemp"
require "find"
+require "utils/spdx"
# A formula provides instructions and metadata for Homebrew to install a piece
# of software. Every Homebrew formula is a {Formula}. | false |
Other | Homebrew | brew | ba54a54dfcd74dcdf1fe119a080c8915f9f71e9e.json | tests: handle tapped homebrew/bundle. | .github/workflows/tests.yml | @@ -45,11 +45,10 @@ jobs:
- name: Set up Homebrew official command taps
run: |
# Setup taps needed for 'brew tests' and 'brew man'
- brew tap homebrew/bundle
cd "$(brew --repo)"
if [ "$RUNNER_OS" = "macOS" ]; then
- brew update-reset Library/Taps/homebrew/homebrew-cask Library/Taps/homebrew/homebrew-services
+ brew update-reset Library/Taps/homebrew/homebrew-bundle Library/Taps/homebrew/homebrew-cask Library/Taps/homebrew/homebrew-services
else
brew update-reset Library/Taps/homebrew/homebrew-services
fi | false |
Other | Homebrew | brew | 4278847403ba20ec18ebbb10d52541cdc1898161.json | sorbet: update RBI files using Tapioca.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml). | Library/Homebrew/sorbet/rbi/gems/activesupport@6.0.3.2.rbi | @@ -1,7 +0,0 @@
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `activesupport` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
-
-# typed: false
-
- | true |
Other | Homebrew | brew | 4278847403ba20ec18ebbb10d52541cdc1898161.json | sorbet: update RBI files using Tapioca.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml). | Library/Homebrew/sorbet/rbi/gems/activesupport@6.0.3.3.rbi | @@ -0,0 +1,8 @@
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `activesupport` gem.
+# Please instead update this file by running `tapioca sync`.
+
+# typed: false
+
+# THIS IS AN EMPTY RBI FILE.
+# see https://github.com/Shopify/tapioca/blob/master/README.md#manual-gem-requires | true |
Other | Homebrew | brew | 77566d89f72b07247a6beaaea634d51cadf046dd.json | sorbet: update RBI files using Tapioca.
Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml). | Library/Homebrew/sorbet/rbi/todo.rbi | @@ -2,14 +2,13 @@
# srb rbi todo
# typed: strong
+module ::StackProf; end
module DependencyCollector::Compat; end
-module ELFShim::Metadata::PatchELF::PatchError; end
-module ELFShim::PatchELF::PatchError; end
-module ELFShim::PatchELF::Patcher; end
module Homebrew::Error; end
module OS::Mac::Version::NULL; end
-module T::CompatibilityPatches::RSpecCompatibility::MethodDoubleExtensions; end
-module T::CompatibilityPatches::RSpecCompatibility::RecorderExtensions; end
+module SPDX::JSON_PATH; end
+module T::InterfaceWrapper::Helpers; end
+module T::Private::Abstract::Hooks; end
module T::Private::Methods::MethodHooks; end
module T::Private::Methods::SingletonMethodHooks; end
module Test::Unit::AssertionFailedError; end | false |
Other | Homebrew | brew | 37ecdb28f7c892d61d9625ef2f7c92f39f78c0dd.json | Add spec for `NamedArgs#to_paths`. | Library/Homebrew/cli/named_args.rb | @@ -84,7 +84,7 @@ def to_paths(only: nil)
@to_paths ||= {}
@to_paths[only] ||= downcased_unique_named.flat_map do |name|
if File.exist?(name)
- name
+ Pathname(name)
elsif name.count("/") == 1
Tap.fetch(name).path
else | true |
Other | Homebrew | brew | 37ecdb28f7c892d61d9625ef2f7c92f39f78c0dd.json | Add spec for `NamedArgs#to_paths`. | Library/Homebrew/test/cli/named_args_spec.rb | @@ -120,4 +120,45 @@
expect(described_class.new("foo").homebrew_tap_cask_names).to be_empty
end
end
+
+ describe "#to_paths" do
+ let(:existing_path) { mktmpdir }
+ let(:formula_path) { Pathname("/path/to/foo.rb") }
+ let(:cask_path) { Pathname("/path/to/baz.rb") }
+
+ before do
+ allow(formula_path).to receive(:exist?).and_return(true)
+ allow(cask_path).to receive(:exist?).and_return(true)
+
+ allow(Formulary).to receive(:path).and_call_original
+ allow(Cask::CaskLoader).to receive(:path).and_call_original
+ end
+
+ it "returns taps, cask formula and existing paths" do
+ expect(Formulary).to receive(:path).with("foo").and_return(formula_path)
+ expect(Cask::CaskLoader).to receive(:path).with("baz").and_return(cask_path)
+
+ expect(described_class.new("homebrew/core", "foo", "baz", existing_path.to_s).to_paths)
+ .to eq [Tap.fetch("homebrew/core").path, formula_path, cask_path, existing_path]
+ end
+
+ it "returns both cask and formula paths if they exist" do
+ expect(Formulary).to receive(:path).with("foo").and_return(formula_path)
+ expect(Cask::CaskLoader).to receive(:path).with("baz").and_return(cask_path)
+
+ expect(described_class.new("foo", "baz").to_paths).to eq [formula_path, cask_path]
+ end
+
+ it "returns only formulae when `only: :formulae` is specified" do
+ expect(Formulary).to receive(:path).with("foo").and_return(formula_path)
+
+ expect(described_class.new("foo", "baz").to_paths(only: :formulae)).to eq [formula_path, Formulary.path("baz")]
+ end
+
+ it "returns only casks when `only: :casks` is specified" do
+ expect(Cask::CaskLoader).to receive(:path).with("foo").and_return(cask_path)
+
+ expect(described_class.new("foo", "baz").to_paths(only: :casks)).to eq [cask_path, Cask::CaskLoader.path("baz")]
+ end
+ end
end | true |
Other | Homebrew | brew | d45af9e78110415a8298db69a55117848b0fbf36.json | Remove colon from RSpec annotations. | Library/Homebrew/test/support/github_formatter.rb | @@ -33,7 +33,7 @@ def example_failed(failure)
description = failure.example.full_description
message = failure.message_lines.join("\n")
- annotation = "#{description}:\n\n#{message}"
+ annotation = "#{description}\n\n#{message}"
output.puts "\n::error file=#{file},line=#{line}::#{self.class.escape(annotation)}"
end
@@ -48,7 +48,7 @@ def example_pending(pending)
else
"Pending: #{pending.example.execution_result.pending_message}"
end
- annotation = "#{description}:\n\n#{message}"
+ annotation = "#{description}\n\n#{message}"
output.puts "\n::warning file=#{file},line=#{line}::#{self.class.escape(annotation)}"
end | false |
Other | Homebrew | brew | b1cc9bdee7417ca59d9296a7e57d9822cda65829.json | brew.sh: update implied HOMEBREW_VERSION
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/brew.sh | @@ -140,7 +140,7 @@ HOMEBREW_VERSION="$("$HOMEBREW_GIT" -C "$HOMEBREW_REPOSITORY" describe --tags --
HOMEBREW_USER_AGENT_VERSION="$HOMEBREW_VERSION"
if [[ -z "$HOMEBREW_VERSION" ]]
then
- HOMEBREW_VERSION=">=2.2.0 (shallow or no git repository)"
+ HOMEBREW_VERSION=">=2.5.0 (shallow or no git repository)"
HOMEBREW_USER_AGENT_VERSION="2.X.Y"
fi
| false |
Other | Homebrew | brew | 8fd565403ed06efcb83e3c9e08fb7de1083f3da8.json | Remove unused zsh completions | completions/zsh/_brew_cask | @@ -12,10 +12,6 @@
zstyle -T ':completion:*:*:*:brew-cask:*' tag-order && \
zstyle ':completion:*:*:*:brew-cask:*' tag-order 'commands'
-__brew_cask() {
- [ -d "$(brew --repo homebrew/cask)" ] && brew cask $@
-}
-
__brew_all_casks() {
local -a list
local expl
@@ -91,10 +87,6 @@ _brew_cask_cat() {
__brew_all_casks
}
-_brew_cask_cat() {
- __brew_all_casks
-}
-
_brew_cask_create() {
_arguments '*::token:'
} | false |
Other | Homebrew | brew | e0645f395077636cdea3200887951a5b686d647f.json | cask/audit: detect tag from URL | Library/Homebrew/cask/audit.rb | @@ -468,8 +468,9 @@ def check_github_prerelease_version
user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*}) if @online
return if user.nil?
- # TODO: Detect tag from URL instead of using `cask.version`.
- error = SharedAudits.github_release(user, repo, cask.version, cask: cask)
+ tag = SharedAudits.github_tag_from_url(cask.url)
+ tag ||= cask.version
+ error = SharedAudits.github_release(user, repo, tag, cask: cask)
add_error error if error
end
@@ -481,7 +482,9 @@ def check_gitlab_prerelease_version
odebug "Auditing GitLab prerelease"
- error = SharedAudits.gitlab_release(user, repo, cask.version)
+ tag = SharedAudits.gitlab_tag_from_url(cask.url)
+ tag ||= cask.version
+ error = SharedAudits.gitlab_release(user, repo, tag)
add_error error if error
end
| true |
Other | Homebrew | brew | e0645f395077636cdea3200887951a5b686d647f.json | cask/audit: detect tag from URL | Library/Homebrew/dev-cmd/audit.rb | @@ -784,9 +784,7 @@ def audit_specs
owner = Regexp.last_match(1)
repo = Regexp.last_match(2)
- tag = url.match(%r{^https://gitlab\.com/[\w-]+/[\w-]+/-/archive/([^/]+)/})
- .to_a
- .second
+ tag = SharedAudits.gitlab_tag_from_url(url)
tag ||= stable.specs[:tag]
tag ||= stable.version
@@ -797,12 +795,7 @@ def audit_specs
when %r{^https://github.com/([\w-]+)/([\w-]+)}
owner = Regexp.last_match(1)
repo = Regexp.last_match(2)
- tag = url.match(%r{^https://github\.com/[\w-]+/[\w-]+/archive/([^/]+)\.(tar\.gz|zip)$})
- .to_a
- .second
- tag ||= url.match(%r{^https://github\.com/[\w-]+/[\w-]+/releases/download/([^/]+)/})
- .to_a
- .second
+ tag = SharedAudits.github_tag_from_url(url)
tag ||= formula.stable.specs[:tag]
if @online | true |
Other | Homebrew | brew | e0645f395077636cdea3200887951a5b686d647f.json | cask/audit: detect tag from URL | Library/Homebrew/utils/shared_audits.rb | @@ -164,4 +164,22 @@ def bitbucket(user, repo)
"Bitbucket repository not notable enough (<30 forks and <75 watchers)"
end
+
+ def github_tag_from_url(url)
+ url = url.to_s
+ tag = url.match(%r{^https://github\.com/[\w-]+/[\w-]+/archive/([^/]+)\.(tar\.gz|zip)$})
+ .to_a
+ .second
+ tag ||= url.match(%r{^https://github\.com/[\w-]+/[\w-]+/releases/download/([^/]+)/})
+ .to_a
+ .second
+ tag
+ end
+
+ def gitlab_tag_from_url(url)
+ url = url.to_s
+ url.match(%r{^https://gitlab\.com/[\w-]+/[\w-]+/-/archive/([^/]+)/})
+ .to_a
+ .second
+ end
end | true |
Other | Homebrew | brew | 412be8e024b9cb3a27fb7074d60ecbcd2e98dffc.json | docs: add discussion forums to troubleshooting | docs/Troubleshooting.md | @@ -12,6 +12,7 @@ This document will help you check for common issues and make sure your issue has
* Search the [Homebrew/homebrew-core issue tracker](https://github.com/Homebrew/homebrew-core/issues) or [Homebrew/linuxbrew-core issue tracker](https://github.com/Homebrew/linuxbrew-core/issues) to see if someone else has already reported the same issue.
* If a formula that has failed to build is part of a non-core tap or a cask is part of [homebrew/cask](https://github.com/Homebrew/homebrew-cask/issues) check those issue trackers instead.
+* Search the [Homebrew discussion forum](https://github.com/homebrew/discussions/discussions) or [Discourse](https://discourse.brew.sh/) to see if any discussions have started about the issue.
## Create an issue
| false |
Other | Homebrew | brew | 83f62d1fad34f98f7d360f2a84932040fdeb06b1.json | docs: update outdated formula references for Node | docs/Node-for-Formula-Authors.md | @@ -32,11 +32,11 @@ Node modules which are compatible with the latest Node version should declare a
depends_on "node"
```
-If your formula requires being executed with an older Node version you should use one of the versioned node formulae (e.g. `node@6`).
+If your formula requires being executed with an older Node version you should use one of the versioned node formulae (e.g. `node@12`).
### Special requirements for native addons
-If your Node module is a native addon or has a native addon somewhere in its dependency tree you have to declare an additional dependency. Since the compilation of the native addon results in an invocation of `node-gyp` we need an additional build time dependency on `"python"` (because GYP depends on Python 2.7).
+If your Node module is a native addon or has a native addon somewhere in its dependency tree you have to declare an additional dependency. Since the compilation of the native addon results in an invocation of `node-gyp` we need an additional build time dependency on `"python"` (because GYP depends on Python).
```ruby
depends_on "python" => :build
@@ -75,8 +75,6 @@ This will install your Node module in npm's global module style with a custom pr
bin.install_symlink Dir["#{libexec}/bin/*"]
```
-**Note:** Because of a required workaround for `npm@5` calling `npm pack` we currently don't support installing modules (from non-npm registry tarballs), which require a prepublish step (e.g. for transpiling sources). See [Homebrew/brew#2820](https://github.com/Homebrew/brew/pull/2820) for more information.
-
### Installing module dependencies locally with `local_npm_install_args`
In your formula's `install` method, do any installation steps which need to be done before the `npm install` step and then `cd` to the top level of the included Node module. Then, use `system` with `Language::Node.local_npm_install_args` to invoke `npm install` like: | false |
Other | Homebrew | brew | 15a56655c8a5216d9b99d2f961cec4f5047049e9.json | docs: move supporters into its own group | docs/README.md | @@ -26,12 +26,13 @@
- [Python](Homebrew-and-Python.md)
- [How To Build Software Outside Homebrew With Homebrew `keg_only` dependencies](How-to-Build-Software-Outside-Homebrew-with-Homebrew-keg-only-Dependencies.md)
- [Xcode](Xcode.md)
-- [Kickstarter Supporters](Kickstarter-Supporters.md)
- [Creating a Homebrew Issue](Creating-a-Homebrew-Issue.md)
- [Updating Software in Homebrew](Updating-Software-in-Homebrew.md)
- [Adding Software to Homebrew](Adding-Software-to-Homebrew.md)
+- [Kickstarter Supporters](Kickstarter-Supporters.md)
+
## Contributors
- [How To Open A Pull Request (and get it merged)](How-To-Open-a-Homebrew-Pull-Request.md) | false |
Other | Homebrew | brew | d0b0dafb0bbe4eaa253ba7ccbab898c7c49a46c4.json | docs: update cross-compiler practice in core | docs/Custom-GCC-and-cross-compilers.md | @@ -1,22 +1,11 @@
# Custom GCC and Cross Compilers
-Homebrew depends on having an up-to-date version of Xcode because it comes with
-specific versions of build tools, e.g. `clang`.
+Homebrew depends on having an up-to-date version of Xcode because it comes with specific versions of build tools, e.g. `clang`. Installing a custom version of GCC or Autotools into your `PATH` has the potential to break lots of compiles so we prefer the Apple or Homebrew-provided compilers. Cross-compilers based on GCC will typically be "keg-only" and therefore not linked into your `PATH` by default, or are prefixed with the target architecture, again to avoid conflicting with Apple or Homebrew compilers.
-Installing a custom version of GCC or `autotools` into the `PATH` has the
-potential to break lots of compiles so we prefer the Apple- or Homebrew-provided
-compilers.
+Rather than merging formulae for either of these cases at this time, we're listing them on this page. If you come up with a formula for a new version of GCC or cross-compiler suite, please link it in here.
-Cross-compilers based on GCC will typically be "keg-only" and therefore not
-linked into the path by default.
-
-Rather than merging in brews for either of these cases at this time, we're
-listing them on this page. If you come up with a formula for a new version of
-GCC or cross-compiler suite, please link it in here.
-
-- Homebrew provides a `gcc` formula for use with Xcode 4.2+ or when needing
- C++11 support on earlier versions.
+- Homebrew provides a `gcc` formula for use with Xcode 4.2+.
- Homebrew provides older GCC formulae, e.g. `gcc@7`
+- Homebrew provides some cross-compilers and toolchains, but these are named to avoid clashing with the default tools, e.g. `x86_64-elf-gcc`
- Homebrew provides the LLVM Clang, which is bundled with the `llvm` formula.
-- [RISC-V](https://github.com/riscv/homebrew-riscv) provides the RISC-V
- toolchain including binutils and GCC.
+- [RISC-V](https://github.com/riscv/homebrew-riscv) provides the RISC-V toolchain including binutils and GCC. | false |
Other | Homebrew | brew | 196d7badfae5692bfe7dd79e4559f5b41eea5761.json | Improve RSpec annotations. | Library/Homebrew/test/spec_helper.rb | @@ -95,15 +95,15 @@
config.include(Test::Helper::OutputAsTTY)
config.before(:each, :needs_compat) do
- skip "Requires compatibility layer." if ENV["HOMEBREW_NO_COMPAT"]
+ skip "Requires the compatibility layer." if ENV["HOMEBREW_NO_COMPAT"]
end
config.before(:each, :needs_linux) do
- skip "Not on Linux." unless OS.linux?
+ skip "Not running on Linux." unless OS.linux?
end
config.before(:each, :needs_macos) do
- skip "Not on macOS." unless OS.mac?
+ skip "Not running on macOS." unless OS.mac?
end
config.before(:each, :needs_java) do
@@ -113,19 +113,19 @@
else
which("java")
end
- skip "Java not installed." unless java_installed
+ skip "Java is not installed." unless java_installed
end
config.before(:each, :needs_python) do
- skip "Python not installed." unless which("python")
+ skip "Python is not installed." unless which("python")
end
config.before(:each, :needs_network) do
skip "Requires network connection." unless ENV["HOMEBREW_TEST_ONLINE"]
end
config.before(:each, :needs_svn) do
- skip "subversion not installed." unless quiet_system "#{HOMEBREW_SHIMS_PATH}/scm/svn", "--version"
+ skip "Subversion is not installed." unless quiet_system "#{HOMEBREW_SHIMS_PATH}/scm/svn", "--version"
svn_paths = PATH.new(ENV["PATH"])
if OS.mac?
@@ -135,15 +135,15 @@
svn = which("svn", svn_paths)
svnadmin = which("svnadmin", svn_paths)
- skip "subversion not installed." if !svn || !svnadmin
+ skip "Subversion is not installed." if !svn || !svnadmin
ENV["PATH"] = PATH.new(ENV["PATH"])
.append(svn.dirname)
.append(svnadmin.dirname)
end
config.before(:each, :needs_unzip) do
- skip "unzip not installed." unless which("unzip")
+ skip "UnZip is not installed." unless which("unzip")
end
config.around do |example| | true |
Other | Homebrew | brew | 196d7badfae5692bfe7dd79e4559f5b41eea5761.json | Improve RSpec annotations. | Library/Homebrew/test/support/github_formatter.rb | @@ -9,6 +9,13 @@ module Github
class Formatter < RSpec::Core::Formatters::BaseFormatter
RSpec::Core::Formatters.register self, :example_failed, :example_pending
+ def self.escape(string)
+ # See https://github.community/t/set-output-truncates-multiline-strings/16852/3.
+ string.gsub("%", "%25")
+ .gsub("\n", "%0A")
+ .gsub("\r", "%0D")
+ end
+
def self.relative_path(path)
if (workspace = ENV["GITHUB_WORKSPACE"])
workspace = "#{File.realpath(workspace)}#{File::SEPARATOR}"
@@ -23,13 +30,27 @@ def self.relative_path(path)
def example_failed(failure)
file, line = failure.example.location.split(":")
file = self.class.relative_path(file)
- output.puts "\n::error file=#{file},line=#{line}::#{failure.message_lines.join("%0A")}"
+
+ description = failure.example.full_description
+ message = failure.message_lines.join("\n")
+ annotation = "#{description}:\n\n#{message}"
+
+ output.puts "\n::error file=#{file},line=#{line}::#{self.class.escape(annotation)}"
end
def example_pending(pending)
file, line = pending.example.location.split(":")
file = self.class.relative_path(file)
- output.puts "\n::warning file=#{file},line=#{line}::#{pending.example.full_description}"
+
+ description = pending.example.full_description
+ message = if pending.example.skip
+ "Skipped: #{pending.example.execution_result.pending_message}"
+ else
+ "Pending: #{pending.example.execution_result.pending_message}"
+ end
+ annotation = "#{description}:\n\n#{message}"
+
+ output.puts "\n::warning file=#{file},line=#{line}::#{self.class.escape(annotation)}"
end
end
end | true |
Other | Homebrew | brew | 196d7badfae5692bfe7dd79e4559f5b41eea5761.json | Improve RSpec annotations. | Library/Homebrew/utils/github/actions.rb | @@ -6,10 +6,10 @@ module GitHub
# @api private
module Actions
def self.escape(string)
- string.gsub(/\r/, "%0D")
- .gsub(/\n/, "%0A")
- .gsub(/]/, "%5D")
- .gsub(/;/, "%3B")
+ # See https://github.community/t/set-output-truncates-multiline-strings/16852/3.
+ string.gsub("%", "%25")
+ .gsub("\n", "%0A")
+ .gsub("\r", "%0D")
end
# Helper class for formatting annotations on GitHub Actions. | true |
Other | Homebrew | brew | c22c6c4a93a4197046108ecb49a2546454e65aef.json | Remove cbmc from GITHUB_PRERELEASE_ALLOWLIST | Library/Homebrew/utils/shared_audits.rb | @@ -29,7 +29,6 @@ def github_release_data(user, repo, tag)
GITHUB_PRERELEASE_ALLOWLIST = {
"amd-power-gadget" => :all,
- "cbmc" => "5.12.6",
"elm-format" => "0.8.3",
"gitless" => "0.8.8",
"infrakit" => "0.5", | false |
Other | Homebrew | brew | 5b393cb049edbc4d85356896883bf5e85d913acc.json | help: show help text for tapped external command
Previously, running e.g. `brew help bundle` when homebrew-bundle was not
tapped would tap homebrew-bundle and then run `brew bundle` showing
`Error: No Brewfile found` instead of the expected help text. | Library/Homebrew/brew.rb | @@ -143,6 +143,7 @@ class MissingEnvironmentVariables < RuntimeError; end
safe_system(*tap_commands)
end
+ ARGV << "--help" if help_flag
exec HOMEBREW_BREW_FILE, cmd, *ARGV
end
rescue UsageError => e | false |
Other | Homebrew | brew | d7097b5598bc120db273008190f278e01d8a3586.json | Fix the usage of outdated brew cask list | completions/zsh/_brew_cask | @@ -32,7 +32,7 @@ __brew_all_casks() {
__brew_installed_casks() {
local -a list
local expl
- list=( $(__brew_cask list|sed 's/(!)//') )
+ list=( $(brew list --cask) )
_wanted list expl 'installed casks' compadd -a list
}
@@ -136,10 +136,6 @@ _brew_cask_list() {
'*::token:__brew_installed_casks'
}
-_brew_cask_ls() {
- _brew_cask_list
-}
-
_brew_cask_outdated() {
_arguments : \
'--greedy:also list Casks with auto_updates or version \:latest' \ | false |
Other | Homebrew | brew | f2ff0c21ba5b534a99f5e7b3ad867ed17be03e64.json | Add pock to GITHUB_PRERELEASE_ALLOWLIST | Library/Homebrew/utils/shared_audits.rb | @@ -33,6 +33,7 @@ def github_release_data(user, repo, tag)
"elm-format" => "0.8.3",
"gitless" => "0.8.8",
"infrakit" => "0.5",
+ "pock" => :all,
"riff" => "0.5.0",
"telegram-cli" => "1.3.1",
"volta" => "0.8.6", | false |
Other | Homebrew | brew | 249e8e29f9add84e44e66bd453f82e8a68e8f6d1.json | fix latest_tag in homebrew/brew update | Library/Homebrew/cmd/update.sh | @@ -428,7 +428,7 @@ EOS
echo "HOMEBREW_BREW_GIT_REMOTE set: using $HOMEBREW_BREW_GIT_REMOTE for Homebrew/brew Git remote."
git remote set-url origin "$HOMEBREW_BREW_GIT_REMOTE"
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- latest_tag="$(git ls-remote --tags --refs -q origin | tail -n1 | cut -f2)"
+ latest_tag="$(git ls-remote --tags --refs --sort=v:refname -q origin | tail -n1 | cut -f2)"
git fetch --force origin --shallow-since="$latest_tag"
fi
| false |
Other | Homebrew | brew | 4d8dcb1d8114f87664ec43b8c5f65ed83497a839.json | Add RSpec formatter for Github Actions. | Library/Homebrew/dev-cmd/tests.rb | @@ -118,6 +118,8 @@ def tests
--out #{HOMEBREW_CACHE}/tests/parallel_runtime_rspec.log
]
+ bundle_args << "--format" << "RSpec::Github::Formatter" if ENV["GITHUB_ACTIONS"]
+
unless OS.mac?
bundle_args << "--tag" << "~needs_macos" << "--tag" << "~cask"
files = files.reject { |p| p =~ %r{^test/(os/mac|cask)(/.*|_spec\.rb)$} } | true |
Other | Homebrew | brew | 4d8dcb1d8114f87664ec43b8c5f65ed83497a839.json | Add RSpec formatter for Github Actions. | Library/Homebrew/test/sandbox_spec.rb | @@ -2,7 +2,7 @@
require "sandbox"
-describe Sandbox do
+describe Sandbox, :needs_macos do
define_negated_matcher :not_matching, :matching
let(:dir) { mktmpdir } | true |
Other | Homebrew | brew | 4d8dcb1d8114f87664ec43b8c5f65ed83497a839.json | Add RSpec formatter for Github Actions. | Library/Homebrew/test/spec_helper.rb | @@ -36,6 +36,7 @@
require_relative "../global"
require "test/support/no_seed_progress_formatter"
+require "test/support/github_formatter"
require "test/support/helper/cask"
require "test/support/helper/fixtures"
require "test/support/helper/formula" | true |
Other | Homebrew | brew | 4d8dcb1d8114f87664ec43b8c5f65ed83497a839.json | Add RSpec formatter for Github Actions. | Library/Homebrew/test/support/github_formatter.rb | @@ -0,0 +1,36 @@
+# frozen_string_literal: true
+
+require "rspec/core"
+require "rspec/core/formatters/base_formatter"
+
+# TODO: Replace with `rspec-github` when https://github.com/Drieam/rspec-github/pull/4 is merged.
+module RSpec
+ module Github
+ class Formatter < RSpec::Core::Formatters::BaseFormatter
+ RSpec::Core::Formatters.register self, :example_failed, :example_pending
+
+ def self.relative_path(path)
+ if (workspace = ENV["GITHUB_WORKSPACE"])
+ workspace = "#{File.realpath(workspace)}#{File::SEPARATOR}"
+ absolute_path = File.realpath(path)
+
+ return absolute_path.delete_prefix(workspace) if absolute_path.start_with?(workspace)
+ end
+
+ path
+ end
+
+ def example_failed(failure)
+ file, line = failure.example.location.split(":")
+ file = self.class.relative_path(file)
+ output.puts "\n::error file=#{file},line=#{line}::#{failure.message_lines.join("%0A")}"
+ end
+
+ def example_pending(pending)
+ file, line = pending.example.location.split(":")
+ file = self.class.relative_path(file)
+ output.puts "\n::warning file=#{file},line=#{line}::#{pending.example.full_description}"
+ end
+ end
+ end
+end | true |
Other | Homebrew | brew | 55e045d23829328827ae8b2ece0187c25fa6c0ef.json | audit: fix lmod hashcat cert issue | Library/Homebrew/dev-cmd/audit.rb | @@ -547,6 +547,7 @@ def audit_versioned_keg_only
end
CERT_ERROR_ALLOWLIST = {
+ "hashcat" => "https://hashcat.net/hashcat/",
"jinx" => "https://www.jinx-lang.org/",
"lmod" => "https://www.tacc.utexas.edu/research-development/tacc-projects/lmod",
"micropython" => "https://www.micropython.org/", | false |
Other | Homebrew | brew | 8ab5ea52495a3f2a53e376e43e8e3551227e58ef.json | bottle: use File.lutime instead of system call | Library/Homebrew/dev-cmd/bottle.rb | @@ -278,10 +278,7 @@ def bottle_formula(f, args:)
keg.find do |file|
if file.symlink?
- # Ruby does not support `File.lutime` yet.
- # Shellout using `touch` to change modified time of symlink itself.
- system "/usr/bin/touch", "-h",
- "-t", tab.source_modified_time.strftime("%Y%m%d%H%M.%S"), file
+ File.lutime(tab.source_modified_time, tab.source_modified_time, file)
else
file.utime(tab.source_modified_time, tab.source_modified_time)
end | false |
Other | Homebrew | brew | f4d81fee1c57b0e152876ea8bb57115807b3c223.json | Add flowchart for managing pull requests
- Add flowchart for handling ready-to-merge pull requests
- Add diagram guidelines
Many thanks to Sean Molenaar for the idea and initial version of the
chart.
CC: Sean Molenaar <smillernl@me.com> | .editorconfig | @@ -16,6 +16,11 @@ trim_trailing_whitespace = true
# trailing whitespace is crucial for patches
trim_trailing_whitespace = false
+[**.drawio.svg]
+indent_size = unset
+indent_style = unset
+insert_final_newline = false
+
[**.md]
trim_trailing_whitespace = true
x-soft-wrap-text = true | true |
Other | Homebrew | brew | f4d81fee1c57b0e152876ea8bb57115807b3c223.json | Add flowchart for managing pull requests
- Add flowchart for handling ready-to-merge pull requests
- Add diagram guidelines
Many thanks to Sean Molenaar for the idea and initial version of the
chart.
CC: Sean Molenaar <smillernl@me.com> | docs/Diagram-Guidelines.md | @@ -0,0 +1,45 @@
+# Diagram Guidelines
+
+## Preferred file format
+
+For complex diagrams, use the `.drawio.svg` format.
+
+Files with the `.drawio.svg` extension are SVG files with embedded [draw.io](https://www.diagrams.net/) source code. Using that format lends itself to a developer-friendly workflow: it is valid SVG, plays well with `git diff` and can be edited in lock-step using various online and offline flavours of draw.​io. If you use VS Code, you can use an [extension](https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio) for draw.​io integration.
+
+Files in the `.drawio.svg` format can be processed offline.
+
+## Embedding a diagram into Markdown
+
+To embed a `.drawio.svg` file into Markdown, use the same syntax as for any image. Example: ``
+
+Mind that GitHub doesn’t allow styling in Markdown documents. Where styling is allowed (e. g. in the exported brew.sh version of the documentation), always set a background colour of `white` for the diagram. That’s the colour draw.​io assumes, and keeps the diagram easy to read in dark mode without further customization. You can use the CSS selector `img[src$=".drawio.svg"]` for styling.
+
+## Example
+
+Example for an SVG image embedded into Markdown:
+
+```md
+
+```
+
+Result:
+
+
+
+Example for styling (where allowed):
+
+```css
+img[src$=".drawio.svg"] {
+ background-color: white;
+ margin-bottom: 20px;
+ padding: 5%;
+ width: 90%;
+}
+
+@media (prefers-color-scheme: dark) {
+ img[src$=".drawio.svg"] {
+ filter: invert(85%);
+ -webkit-filter: invert(85%);
+ }
+}
+``` | true |
Other | Homebrew | brew | f4d81fee1c57b0e152876ea8bb57115807b3c223.json | Add flowchart for managing pull requests
- Add flowchart for handling ready-to-merge pull requests
- Add diagram guidelines
Many thanks to Sean Molenaar for the idea and initial version of the
chart.
CC: Sean Molenaar <smillernl@me.com> | docs/Maintainer-Guidelines.md | @@ -76,6 +76,10 @@ their branch is filled with nonsensical merges, then `rebase` and squash
the commits. Our main branch history should be useful to other people,
not confusing.
+Here’s a flowchart for managing a PR which is ready to merge:
+
+
+
### Testing
We need to at least check that it builds. Use the [Brew Test Bot](Brew-Test-Bot.md) for this. | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.