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 | emberjs | ember.js | 6aed41af0f3dca539f77c9c9c27f37482a417699.json | Update isVisible observer. | lib/sproutcore-views/lib/views/view.js | @@ -674,7 +674,11 @@ SC.View = SC.Object.extend(
return view ;
},
- _sccv_isVisibleDidChange: function() {
+ /** @private
+ When the view's `isVisible` property changes, toggle the visibility element
+ of the actual DOM element.
+ */
+ _isVisibleDidChange: function() {
this.$().toggle(this.get('isVisible'));
}.observes('isVisible')
}); | false |
Other | Homebrew | brew | d8c2e311ab03eb43dee91240aaea9eb09faa3b14.json | Use odie instead of bare exception
The reason that odie works well here
is that it doesn't print a stacktrace
or get caught and print the help page. | Library/Homebrew/extend/os/linux/parser.rb | @@ -15,9 +15,9 @@ def validate_options
return unless @args.respond_to?(:cask?)
return unless @args.cask?
- # NOTE: We don't raise a UsageError here because
- # we don't want to print the help page.
- raise "Invalid usage: Casks are not supported on Linux"
+ # NOTE: We don't raise an error here because we don't want
+ # to print the help page or a stack trace.
+ odie "Invalid `--cask` usage: Casks do not work on Linux"
end
end
end | true |
Other | Homebrew | brew | d8c2e311ab03eb43dee91240aaea9eb09faa3b14.json | Use odie instead of bare exception
The reason that odie works well here
is that it doesn't print a stacktrace
or get caught and print the help page. | Library/Homebrew/test/cli/parser_spec.rb | @@ -573,7 +573,9 @@
it "throws an error when defined" do
expect { parser.parse(["--cask"]) }
- .to raise_error RuntimeError, "Invalid usage: Casks are not supported on Linux"
+ .to output("Error: Invalid `--cask` usage: Casks do not work on Linux\n").to_stderr
+ .and not_to_output.to_stdout
+ .and raise_exception SystemExit
end
end
@@ -588,12 +590,16 @@
it "throws an error when --cask defined" do
expect { parser.parse(["--cask"]) }
- .to raise_error RuntimeError, "Invalid usage: Casks are not supported on Linux"
+ .to output("Error: Invalid `--cask` usage: Casks do not work on Linux\n").to_stderr
+ .and not_to_output.to_stdout
+ .and raise_exception SystemExit
end
it "throws an error when both defined" do
expect { parser.parse(["--cask", "--formula"]) }
- .to raise_error RuntimeError, "Invalid usage: Casks are not supported on Linux"
+ .to output("Error: Invalid `--cask` usage: Casks do not work on Linux\n").to_stderr
+ .and not_to_output.to_stdout
+ .and raise_exception SystemExit
end
end
end | true |
Other | Homebrew | brew | c7fed619ec479bd8dbc19aeb59114d656d12d1d3.json | Update RBI files for parlour.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/parlour@8.1.0.rbi | @@ -4,10 +4,6 @@
# This is an autogenerated file for types exported from the `parlour` gem.
# Please instead update this file by running `bin/tapioca gem parlour`.
-module Kernel
- extend ::Forwardable
-end
-
module Parlour; end
class Parlour::ConflictResolver | false |
Other | Homebrew | brew | 941b500b9550c4fde356b66650d5171dffba93f7.json | Update RBI files for minitest.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/minitest@5.17.0.rbi | @@ -277,10 +277,6 @@ class Minitest::SummaryReporter < ::Minitest::StatisticsReporter
def sync; end
def sync=(_arg0); end
def to_s; end
-
- private
-
- def binary_string; end
end
class Minitest::Test < ::Minitest::Runnable
@@ -319,6 +315,7 @@ module Minitest::Test::LifecycleHooks
end
Minitest::Test::PASSTHROUGH_EXCEPTIONS = T.let(T.unsafe(nil), Array)
+Minitest::Test::SETUP_METHODS = T.let(T.unsafe(nil), Array)
Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array)
class Minitest::UnexpectedError < ::Minitest::Assertion | false |
Other | Homebrew | brew | d318c5601328b3d2a4fab212895f3e91c07d5685.json | Add integration tests for profiler | .gitignore | @@ -11,6 +11,7 @@
/Library/Homebrew/.npmignore
/Library/Homebrew/bin
/Library/Homebrew/doc
+/Library/Homebrew/prof
/Library/Homebrew/test/.gem
/Library/Homebrew/test/.subversion
/Library/Homebrew/test/coverage | true |
Other | Homebrew | brew | d318c5601328b3d2a4fab212895f3e91c07d5685.json | Add integration tests for profiler | Library/Homebrew/test/dev-cmd/prof_spec.rb | @@ -5,4 +5,24 @@
describe "brew prof" do
it_behaves_like "parseable arguments"
+
+ describe "integration tests", :integration_test do
+ after do
+ FileUtils.rm_rf HOMEBREW_LIBRARY_PATH/"prof"
+ end
+
+ it "works using ruby-prof (the default)" do
+ expect { brew "prof", "help", "HOMEBREW_BROWSER" => "echo" }
+ .to output(/^Example usage:/).to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+
+ it "works using stackprof" do
+ expect { brew "prof", "--stackprof", "help", "HOMEBREW_BROWSER" => "echo" }
+ .to output(/^Example usage:/).to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+ end
end | true |
Other | Homebrew | brew | 55c82749ad8343541d15f91227478035363bff12.json | SystemConfig: show WSL version if available on Linux | Library/Homebrew/extend/os/linux/system_config.rb | @@ -40,10 +40,20 @@ def host_ruby_version
out
end
+ def wsl_version(kernel)
+ return "no" unless /-microsoft/i.match?(kernel)
+
+ return "2 (store)" if Version.new kernel[/Linux ([0-9.]*)-.*/, 1] > Version.new("5.15")
+ return "2" if /-microsoft/.match?(kernel)
+ return "1" if /-Microsoft/.match?(kernel)
+ end
+
def dump_verbose_config(out = $stdout)
+ kernel = Utils.safe_popen_read("uname", "-mors").chomp
dump_generic_verbose_config(out)
- out.puts "Kernel: #{`uname -mors`.chomp}"
+ out.puts "Kernel: #{kernel}"
out.puts "OS: #{OS::Linux.os_version}"
+ out.puts "WSL: #{wsl_version(kernel)}"
out.puts "Host glibc: #{host_glibc_version}"
out.puts "/usr/bin/gcc: #{host_gcc_version}"
out.puts "/usr/bin/ruby: #{host_ruby_version}" if RUBY_PATH != HOST_RUBY_PATH | false |
Other | Homebrew | brew | 42e91e8668434cfea738c3f15cb4645c0fdd41ac.json | docs: add Table of Contents to selected pages | docs/Acceptable-Casks.md | @@ -2,23 +2,26 @@
Some casks should not go in [homebrew/cask](https://github.com/Homebrew/homebrew-cask). But there are additional [Interesting Taps and Forks](Interesting-Taps-and-Forks.md) and anyone can [start their own](How-to-Create-and-Maintain-a-Tap.md)!
+* Table of Contents
+{:toc}
+
## Finding a Home For Your Cask
We maintain separate taps for different types of binaries. Our nomenclature is:
-+ **Stable**: The latest version provided by the developer defined by them as such.
-+ **Beta, Development, Unstable**: Subsequent versions to **stable**, yet incomplete and under development, aiming to eventually become the new **stable**. Also includes alternate versions specifically targeted at developers.
-+ **Nightly**: Constantly up-to-date versions of the current development state.
-+ **Legacy**: Any **stable** version that is not the most recent.
-+ **Regional, Localized**: Any version that isn’t the US English one, when that exists.
-+ **Trial**: Time-limited version that stops working entirely after it expires, requiring payment to lift the limitation.
-+ **Freemium**: Gratis version that works indefinitely but with limitations that can be removed by paying.
-+ **Fork**: An alternate version of an existing project, with a based-on but modified source and binary.
-+ **Unofficial**: An *allegedly* unmodified compiled binary, by a third-party, of a binary that has no existing build by the owner of the source code.
-+ **Vendorless**: A binary distributed via means other than an official website, like a forum posting.
-+ **Walled**: When the download URL is both behind a login/registration form and from a host that differs from the homepage.
-+ **Font**: Data file containing a set of glyphs, characters, or symbols, that changes typed text.
-+ **Driver**: Software to make a hardware peripheral recognisable and usable by the system. If the software is useless without the peripheral, it’s considered a driver.
+* **Stable**: The latest version provided by the developer defined by them as such.
+* **Beta, Development, Unstable**: Subsequent versions to **stable**, yet incomplete and under development, aiming to eventually become the new **stable**. Also includes alternate versions specifically targeted at developers.
+* **Nightly**: Constantly up-to-date versions of the current development state.
+* **Legacy**: Any **stable** version that is not the most recent.
+* **Regional, Localized**: Any version that isn’t the US English one, when that exists.
+* **Trial**: Time-limited version that stops working entirely after it expires, requiring payment to lift the limitation.
+* **Freemium**: Gratis version that works indefinitely but with limitations that can be removed by paying.
+* **Fork**: An alternate version of an existing project, with a based-on but modified source and binary.
+* **Unofficial**: An *allegedly* unmodified compiled binary, by a third-party, of a binary that has no existing build by the owner of the source code.
+* **Vendorless**: A binary distributed via means other than an official website, like a forum posting.
+* **Walled**: When the download URL is both behind a login/registration form and from a host that differs from the homepage.
+* **Font**: Data file containing a set of glyphs, characters, or symbols, that changes typed text.
+* **Driver**: Software to make a hardware peripheral recognisable and usable by the system. If the software is useless without the peripheral, it’s considered a driver.
### Stable versions
@@ -101,28 +104,28 @@ Before submitting a cask to any of our repos, you must read our [documentation o
Common reasons to reject a cask entirely:
-+ We have strong reasons to believe including the cask can put the whole project at risk. Happened only once so far, [with Popcorn Time](https://github.com/Homebrew/homebrew-cask/pull/3954).
-+ Cask is unreasonably difficult to maintain. Examples have included [Audacity](https://github.com/Homebrew/homebrew-cask/pull/27517) and [older Java development casks](https://github.com/Homebrew/homebrew-cask/issues/57387).
-+ App is a trial version, and the only way to acquire the full version is through the Mac App Store.
- + Similarly (and trickier to spot), the app has moved to the Mac App Store but still provides old versions via direct download. We reject these in all official repos so users don’t get stuck using an old version, wrongly thinking they’re using the most up-to-date one (which, amongst other things, might be a security risk).
-+ App is both open-source and CLI-only (i.e. it only uses the `binary` artifact). In that case, and [in the spirit of deduplication](https://github.com/Homebrew/homebrew-cask/issues/15603), submit it first to [homebrew/core](https://github.com/Homebrew/homebrew-core) as a formula that builds from source. If it is rejected, you may then try again as a cask (link to the issue from your pull request so we can see the discussion and reasoning for rejection).
-+ App is open-source and has a GUI but no compiled versions (or only old ones) are provided. It’s better to have them in [homebrew/core](https://github.com/Homebrew/homebrew-core) so users don’t get perpetually outdated versions. See [`gedit`](https://github.com/Homebrew/homebrew-cask/pull/23360) for example.
-+ Cask has been rejected before due to an issue we cannot fix, and the new submission doesn’t fix that. An example would be the [first submission of `soapui`](https://github.com/Homebrew/homebrew-cask/pull/4939), whose installation problems were not fixed in the two [subsequent](https://github.com/Homebrew/homebrew-cask/pull/9969) [submissions](https://github.com/Homebrew/homebrew-cask/pull/10606).
-+ Cask is a duplicate. These submissions mostly occur when the [token reference](https://docs.brew.sh/Cask-Cookbook#token-reference) was not followed.
-+ Cask has a download URL that is both behind a login/registration form and from a host that differs from the homepage, meaning users can’t easily verify its authenticity.
-+ App is unmaintained, i.e. no releases in the last year, or [explicitly discontinued](https://github.com/Homebrew/homebrew-cask/pull/22699).
-+ App is too obscure. Examples:
- + An app from a code repository that is not notable enough (under 30 forks, 30 watchers, 75 stars).
- + [Electronic Identification (eID) software](https://github.com/Homebrew/homebrew-cask/issues/59021).
-+ App has no information on its homepage (example: a GitHub repository without a README).
-+ The author has [specifically asked us not to include it](https://github.com/Homebrew/homebrew-cask/pull/5342).
-+ App requires [SIP to be disabled](https://github.com/Homebrew/homebrew-cask/pull/41890) to be installed and/or used.
-+ App installer is a `pkg` that requires [`allow_untrusted: true`](https://docs.brew.sh/Cask-Cookbook#pkg-allow_untrusted).
-+ App fails with GateKeeper enabled on Homebrew supported macOS versions and platforms (e.g. unsigned apps fail on Macs with Apple silicon/ARM).
+* We have strong reasons to believe including the cask can put the whole project at risk. Happened only once so far, [with Popcorn Time](https://github.com/Homebrew/homebrew-cask/pull/3954).
+* Cask is unreasonably difficult to maintain. Examples have included [Audacity](https://github.com/Homebrew/homebrew-cask/pull/27517) and [older Java development casks](https://github.com/Homebrew/homebrew-cask/issues/57387).
+* App is a trial version, and the only way to acquire the full version is through the Mac App Store.
+ * Similarly (and trickier to spot), the app has moved to the Mac App Store but still provides old versions via direct download. We reject these in all official repos so users don’t get stuck using an old version, wrongly thinking they’re using the most up-to-date one (which, amongst other things, might be a security risk).
+* App is both open-source and CLI-only (i.e. it only uses the `binary` artifact). In that case, and [in the spirit of deduplication](https://github.com/Homebrew/homebrew-cask/issues/15603), submit it first to [homebrew/core](https://github.com/Homebrew/homebrew-core) as a formula that builds from source. If it is rejected, you may then try again as a cask (link to the issue from your pull request so we can see the discussion and reasoning for rejection).
+* App is open-source and has a GUI but no compiled versions (or only old ones) are provided. It’s better to have them in [homebrew/core](https://github.com/Homebrew/homebrew-core) so users don’t get perpetually outdated versions. See [`gedit`](https://github.com/Homebrew/homebrew-cask/pull/23360) for example.
+* Cask has been rejected before due to an issue we cannot fix, and the new submission doesn’t fix that. An example would be the [first submission of `soapui`](https://github.com/Homebrew/homebrew-cask/pull/4939), whose installation problems were not fixed in the two [subsequent](https://github.com/Homebrew/homebrew-cask/pull/9969) [submissions](https://github.com/Homebrew/homebrew-cask/pull/10606).
+* Cask is a duplicate. These submissions mostly occur when the [token reference](https://docs.brew.sh/Cask-Cookbook#token-reference) was not followed.
+* Cask has a download URL that is both behind a login/registration form and from a host that differs from the homepage, meaning users can’t easily verify its authenticity.
+* App is unmaintained, i.e. no releases in the last year, or [explicitly discontinued](https://github.com/Homebrew/homebrew-cask/pull/22699).
+* App is too obscure. Examples:
+ * An app from a code repository that is not notable enough (under 30 forks, 30 watchers, 75 stars).
+ * [Electronic Identification (eID) software](https://github.com/Homebrew/homebrew-cask/issues/59021).
+* App has no information on its homepage (example: a GitHub repository without a README).
+* The author has [specifically asked us not to include it](https://github.com/Homebrew/homebrew-cask/pull/5342).
+* App requires [SIP to be disabled](https://github.com/Homebrew/homebrew-cask/pull/41890) to be installed and/or used.
+* App installer is a `pkg` that requires [`allow_untrusted: true`](https://docs.brew.sh/Cask-Cookbook#pkg-allow_untrusted).
+* App fails with GateKeeper enabled on Homebrew supported macOS versions and platforms (e.g. unsigned apps fail on Macs with Apple silicon/ARM).
Common reasons to reject a cask from the main repo:
-+ Cask was submitted to the wrong repo. When drafting a cask, consult [Finding a Home For Your Cask](#finding-a-home-for-your-cask) to see where it belongs.
+* Cask was submitted to the wrong repo. When drafting a cask, consult [Finding a Home For Your Cask](#finding-a-home-for-your-cask) to see where it belongs.
### No cask is guaranteed to be accepted
| true |
Other | Homebrew | brew | 42e91e8668434cfea738c3f15cb4645c0fdd41ac.json | docs: add Table of Contents to selected pages | docs/Acceptable-Formulae.md | @@ -2,6 +2,9 @@
Some formulae should not go in [homebrew/core](https://github.com/Homebrew/homebrew-core). But there are additional [Interesting Taps and Forks](Interesting-Taps-and-Forks.md) and anyone can [start their own](How-to-Create-and-Maintain-a-Tap.md)!
+* Table of Contents
+{:toc}
+
## Requirements for `homebrew/core`
### Supported platforms | true |
Other | Homebrew | brew | 42e91e8668434cfea738c3f15cb4645c0fdd41ac.json | docs: add Table of Contents to selected pages | docs/Cask-Cookbook.md | @@ -17,6 +17,9 @@ cask "alfred" do
end
```
+* Table of Contents
+{:toc}
+
## The Cask Language Is Declarative
Each cask contains a series of stanzas (or “fields”) which *declare* how the software is to be obtained and installed. In a declarative language, the author does not need to worry about **order**. As long as all the needed fields are present, Homebrew Cask will figure out what needs to be done at install time. | true |
Other | Homebrew | brew | 42e91e8668434cfea738c3f15cb4645c0fdd41ac.json | docs: add Table of Contents to selected pages | docs/Common-Issues.md | @@ -2,6 +2,9 @@
This is a list of commonly encountered problems, known issues, and their solutions.
+* Table of Contents
+{:toc}
+
## Running `brew`
### `brew` complains about absence of "Command Line Tools"
@@ -120,8 +123,8 @@ This is an issue in the connection between your machine and GitHub, rather than
Upgrading macOS can cause errors like the following:
-- `dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.54.dylib`
-- `configure: error: Cannot find libz`
+* `dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.54.dylib`
+* `configure: error: Cannot find libz`
Following a macOS upgrade it may be necessary to reinstall the Xcode Command Line Tools and then `brew upgrade` all installed formulae:
| true |
Other | Homebrew | brew | 42e91e8668434cfea738c3f15cb4645c0fdd41ac.json | docs: add Table of Contents to selected pages | docs/FAQ.md | @@ -1,5 +1,8 @@
# FAQ (Frequently Asked Questions)
+* Table of Contents
+{:toc}
+
## Is there a glossary of terms around?
The Formula Cookbook has a list of [Homebrew terminology](Formula-Cookbook.md#homebrew-terminology). | true |
Other | Homebrew | brew | 42e91e8668434cfea738c3f15cb4645c0fdd41ac.json | docs: add Table of Contents to selected pages | docs/Formula-Cookbook.md | @@ -2,6 +2,9 @@
A *formula* is a package definition written in Ruby. It can be created with `brew create <URL>` where `<URL>` is a zip or tarball, installed with `brew install <formula>`, and debugged with `brew install --debug --verbose <formula>`. Formulae use the [Formula API](https://rubydoc.brew.sh/Formula) which provides various Homebrew-specific helpers.
+* Table of Contents
+{:toc}
+
## Homebrew terminology
| term | description | example | | true |
Other | Homebrew | brew | 42e91e8668434cfea738c3f15cb4645c0fdd41ac.json | docs: add Table of Contents to selected pages | docs/_config.yml | @@ -31,6 +31,9 @@ defaults:
values:
category: governance-archives
+kramdown:
+ toc_levels: 2..3
+
logo: /assets/img/homebrew-256x256.png
twitter: | true |
Other | Homebrew | brew | 09ff92707cd858e2c0c049a7eba7b6078a38dd77.json | Update RBI files for rubocop-ast.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.24.1.rbi | @@ -297,6 +297,10 @@ class RuboCop::AST::ConstNode < ::RuboCop::AST::Node
def short_name; end
end
+class RuboCop::AST::CsendNode < ::RuboCop::AST::SendNode
+ def send_type?; end
+end
+
class RuboCop::AST::DefNode < ::RuboCop::AST::Node
include ::RuboCop::AST::ParameterizedNode
include ::RuboCop::AST::MethodIdentifierPredicates
@@ -821,6 +825,8 @@ RuboCop::AST::Node::BASIC_LITERALS = T.let(T.unsafe(nil), Set)
RuboCop::AST::Node::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Set)
RuboCop::AST::Node::COMPOSITE_LITERALS = T.let(T.unsafe(nil), Set)
RuboCop::AST::Node::CONDITIONALS = T.let(T.unsafe(nil), Set)
+RuboCop::AST::Node::EMPTY_CHILDREN = T.let(T.unsafe(nil), Array)
+RuboCop::AST::Node::EMPTY_PROPERTIES = T.let(T.unsafe(nil), Hash)
RuboCop::AST::Node::EQUALS_ASSIGNMENTS = T.let(T.unsafe(nil), Set)
RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Set)
RuboCop::AST::Node::IMMUTABLE_LITERALS = T.let(T.unsafe(nil), Set)
@@ -1388,6 +1394,7 @@ RuboCop::AST::NodePattern::Sets::SET_AFTER_ACTION_APPEND_AFTER_ACTION_APPEND_ARO
RuboCop::AST::NodePattern::Sets::SET_ALL_CONTEXT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_AND_RETURN_AND_RAISE_AND_THROW_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_ANY_ALL_NORETURN_ETC = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_AP_P_PP_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR = T.let(T.unsafe(nil), Set)
@@ -1419,7 +1426,6 @@ 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_EQL_EQ_BE = 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)
@@ -1452,6 +1458,7 @@ 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_MATCH___MATCH = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_MESSAGES_DETAILS = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_NEW_ = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_NEW_COMPILE = T.let(T.unsafe(nil), Set)
@@ -1461,6 +1468,7 @@ RuboCop::AST::NodePattern::Sets::SET_NOTICE_ALERT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_ONLY_EXCEPT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_PENDING_SKIP = 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_PRESENT_ANY_BLANK_EMPTY = 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_PROC_LAMBDA = T.let(T.unsafe(nil), Set)
@@ -1501,6 +1509,7 @@ RuboCop::AST::NodePattern::Sets::SET_TIME_DATETIME = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TO_H_TO_HASH = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C_TO_R = 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_TRANSLATE_LOCALIZE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TRANSLATE_T = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set)
@@ -1591,6 +1600,8 @@ module RuboCop::AST::ParameterizedNode::RestArguments
def last_argument; end
end
+RuboCop::AST::ParameterizedNode::RestArguments::EMPTY_ARGUMENTS = T.let(T.unsafe(nil), Array)
+
module RuboCop::AST::ParameterizedNode::WrappedArguments
include ::RuboCop::AST::ParameterizedNode
@@ -1741,6 +1752,7 @@ class RuboCop::AST::SendNode < ::RuboCop::AST::Node
include ::RuboCop::AST::MethodDispatchNode
def attribute_accessor?(param0 = T.unsafe(nil)); end
+ def send_type?; end
private
@@ -1808,6 +1820,8 @@ class RuboCop::AST::Token
end
end
+RuboCop::AST::Token::LEFT_PAREN_TYPES = T.let(T.unsafe(nil), Array)
+
module RuboCop::AST::Traversal
extend ::RuboCop::AST::Traversal::CallbackCompiler
| true |
Other | Homebrew | brew | 09ff92707cd858e2c0c049a7eba7b6078a38dd77.json | Update RBI files for rubocop-ast.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -6767,19 +6767,15 @@ class RuboCop::AST::NodePattern::Parser
end
module RuboCop::AST::NodePattern::Sets
- SET_ANY_EMPTY = ::T.let(nil, ::T.untyped)
SET_ARM_INTEL = ::T.let(nil, ::T.untyped)
SET_BASH_COMPLETION_ZSH_COMPLETION_FISH_COMPLETION = ::T.let(nil, ::T.untyped)
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_MAC_LINUX = ::T.let(nil, ::T.untyped)
- SET_MATCH___MATCH = ::T.let(nil, ::T.untyped)
SET_ON_INTEL_ON_ARM = ::T.let(nil, ::T.untyped)
SET_OR_NEWER_OR_OLDER = ::T.let(nil, ::T.untyped)
- SET_PRESENT_ANY_BLANK_EMPTY = ::T.let(nil, ::T.untyped)
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
- SET_TO_TO_NOT_NOT_TO = ::T.let(nil, ::T.untyped)
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
SET____ETC_4 = ::T.let(nil, ::T.untyped)
end
@@ -6981,12 +6977,16 @@ class RuboCop::Cop::Homebrew::MoveToExtendOS
end
module RuboCop::Cop::OnSystemConditionalsHelper
+ def hardware_cpu_search(param0, method:); end
+
def if_arch_node_search(param0, arch:); end
def if_base_os_node_search(param0, base_os:); end
def if_macos_version_node_search(param0, os_version:); end
+ def macos_version_comparison_search(param0, os_version:); end
+
def on_macos_version_method_call(param0=T.unsafe(nil), on_method:); end
def on_system_method_call(param0=T.unsafe(nil)); end | true |
Other | Homebrew | brew | 3bdab156c298572cd540f81e4b2efad1dbcdbdd2.json | add additional test | Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb | @@ -79,6 +79,15 @@
};
EOS
end
+ let(:launchctl_list) do
+ <<~EOS
+ PID Status Label
+ 1111 0 my.fancy.package.service.12345
+ - 0 com.apple.SafariHistoryServiceAgent
+ - 0 com.apple.progressd
+ 555 0 my.fancy.package.service.test
+ EOS
+ end
it "searches installed launchctl items" do
expect(subject).to receive(:find_launchctl_with_wildcard)
@@ -98,6 +107,16 @@
subject.public_send(:"#{artifact_dsl_key}_phase", command: fake_system_command)
end
+
+ it "returns the matching launchctl services" do
+ expect(subject).to receive(:system_command!)
+ .with("/bin/launchctl", args: ["list"])
+ .and_return(instance_double(SystemCommand::Result, stdout: launchctl_list))
+
+ expect(subject.send(:find_launchctl_with_wildcard,
+ "my.fancy.package.service.*")).to eq(["my.fancy.package.service.12345",
+ "my.fancy.package.service.test"])
+ end
end
context "using :pkgutil" do | false |
Other | Homebrew | brew | 3556e756fcb9d1fd88be7416e14b624c25b737f8.json | Check casks for macOS version conditionals | Library/Homebrew/rubocops/cask/on_system_conditionals.rb | @@ -41,6 +41,7 @@ def on_cask(cask_block)
end
audit_arch_conditionals(cask_body)
+ audit_macos_version_conditionals(cask_body)
simplify_sha256_stanzas
end
| false |
Other | Homebrew | brew | b6f9b7d3e05ebf983df6f6a190ca3e594d3fbbb3.json | Remove bitdefender diagnostic check
This shows up in `brew doctor` but hasn't been
reported as a problem by users in 3+ years. | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -364,19 +364,6 @@ def check_for_iconv
end
end
- def check_for_bitdefender
- if !Pathname("/Library/Bitdefender/AVP/EndpointSecurityforMac.app").exist? &&
- !Pathname("/Library/Bitdefender/AVP/BDLDaemon").exist?
- return
- end
-
- <<~EOS
- You have installed Bitdefender. The "Traffic Scan" option interferes with
- Homebrew's ability to download packages. See:
- #{Formatter.url("https://github.com/Homebrew/brew/issues/5558")}
- EOS
- end
-
def check_for_multiple_volumes
return unless HOMEBREW_CELLAR.exist?
| false |
Other | Homebrew | brew | f55d819f39b06271ad602c0dca97f10447c97ccf.json | Update RBI files for rubocop-performance.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.15.2.rbi | @@ -807,6 +807,7 @@ RuboCop::Cop::Performance::StringReplacement::TR = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Performance::Sum < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRubyVersion
def acc_plus_elem?(param0 = T.unsafe(nil), param1, param2); end
def elem_plus_acc?(param0 = T.unsafe(nil), param1, param2); end | true |
Other | Homebrew | brew | f55d819f39b06271ad602c0dca97f10447c97ccf.json | Update RBI files for rubocop-performance.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -6774,6 +6774,7 @@ module RuboCop::AST::NodePattern::Sets
SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped)
SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
SET_MAC_LINUX = ::T.let(nil, ::T.untyped)
+ SET_MATCH___MATCH = ::T.let(nil, ::T.untyped)
SET_ON_INTEL_ON_ARM = ::T.let(nil, ::T.untyped)
SET_OR_NEWER_OR_OLDER = ::T.let(nil, ::T.untyped)
SET_PRESENT_ANY_BLANK_EMPTY = ::T.let(nil, ::T.untyped) | true |
Other | Homebrew | brew | 09a2ccdf24d717650751368e5665107e2af8169f.json | Improve minimum macOS version audit for casks | Library/Homebrew/cask/audit.rb | @@ -567,6 +567,7 @@ def check_livecheck_min_os
return if item.blank?
min_os = item.elements["sparkle:minimumSystemVersion"]&.text
+ min_os = "11" if min_os == "10.16"
return if min_os.blank?
begin
@@ -581,7 +582,8 @@ def check_livecheck_min_os
return if cask_min_os == min_os_string
- add_error "Upstream defined #{min_os_string} as minimal OS version and the cask defined #{cask_min_os}"
+ add_error "Upstream defined #{min_os_string.to_sym.inspect} as minimal OS version " \
+ "and the cask defined #{cask_min_os.to_sym.inspect}"
end
sig { void } | false |
Other | Homebrew | brew | f6a8df1ce19695226155cdf17df659932348daa5.json | Update RBI files for rubocop-rails.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.17.4.rbi | @@ -1787,9 +1787,11 @@ class RuboCop::Cop::Rails::RootPathnameMethods < ::RuboCop::Cop::Base
def build_path_glob_replacement(path, method); end
def build_path_replacement(path, method, args); end
+ def enforce_double_quotes?; end
def evidence(node); end
def include_interpolation?(arguments); end
def join_arguments(arguments); end
+ def string_literals_config; end
end
RuboCop::Cop::Rails::RootPathnameMethods::DIR_METHODS = T.let(T.unsafe(nil), Set)
@@ -2018,6 +2020,7 @@ class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base
def method_send?(node); end
def need_check_localtime?(chain); end
def not_danger_chain?(chain); end
+ def offset_option_provided?(node); end
def offset_provided?(node); end
def remove_redundant_in_time_zone(corrector, node); end
def safe_method(method_name, node); end
@@ -2127,6 +2130,7 @@ class RuboCop::Cop::Rails::UniqueValidationWithoutIndex < ::RuboCop::Cop::Base
def class_node(node); end
def column_names(node); end
def column_names_from_scope(node); end
+ def condition_hash_part?(pairs, keys:); end
def condition_part?(node); end
def find_schema_information(node); end
def find_scope(pairs); end | false |
Other | Homebrew | brew | 915a6e53a45b344f46d9e478bfb32aa702ea46c7.json | Update RBI files for simplecov.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/simplecov@0.22.0.rbi | @@ -153,9 +153,12 @@ module SimpleCov::Configuration
def coverage_criterion(criterion = T.unsafe(nil)); end
def coverage_criterion_enabled?(criterion); end
def coverage_dir(dir = T.unsafe(nil)); end
+ def coverage_for_eval_enabled?; end
+ def coverage_for_eval_supported?; end
def coverage_path; end
def coverage_start_arguments_supported?; end
def enable_coverage(criterion); end
+ def enable_coverage_for_eval; end
def enable_for_subprocesses(value = T.unsafe(nil)); end
def enabled_for_subprocesses?; end
def filters; end
@@ -333,11 +336,7 @@ class SimpleCov::Filter
end
end
-module SimpleCov::Formatter
- class << self
- def from_env(env); end
- end
-end
+module SimpleCov::Formatter; end
class SimpleCov::Formatter::MultiFormatter
class << self | false |
Other | Homebrew | brew | 213679f19c825cea41c439766a7c80d3539a713f.json | Update RBI files for rubocop.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.41.1.rbi | @@ -298,6 +298,7 @@ class RuboCop::Config
def base_dir_for_path_parameters; end
def bundler_lock_file_path; end
def check; end
+ def clusivity_config_for_badge?(badge); end
def delete(*args, &block); end
def deprecation_check; end
def dig(*args, &block); end
@@ -412,6 +413,7 @@ class RuboCop::ConfigLoader
def ignore_parent_exclusion?; end
def ignore_unrecognized_cops; end
def ignore_unrecognized_cops=(_arg0); end
+ def inject_defaults!(project_root); end
def load_file(file, check: T.unsafe(nil)); end
def load_yaml_configuration(absolute_path); end
def loaded_features; end
@@ -767,9 +769,12 @@ class RuboCop::Cop::AnnotationComment
def just_keyword_of_sentence?; end
def keyword_appearance?; end
def keywords; end
+ def regex; end
def split_comment(comment); end
end
+RuboCop::Cop::AnnotationComment::KEYWORDS_REGEX_CACHE = T.let(T.unsafe(nil), Hash)
+
module RuboCop::Cop::ArrayMinSize
private
@@ -816,6 +821,7 @@ class RuboCop::Cop::Badge
def ==(other); end
def cop_name; end
def department; end
+ def department_name; end
def eql?(other); end
def hash; end
def match?(other); end
@@ -875,7 +881,9 @@ class RuboCop::Cop::Base
def callback_argument(range); end
def complete_investigation; end
def correct(range); end
+ def current_corrector; end
def current_offense_locations; end
+ def current_offenses; end
def currently_disabled_lines; end
def custom_severity; end
def default_severity; end
@@ -910,6 +918,8 @@ class RuboCop::Cop::Base
end
end
+RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Base::InvestigationReport < ::Struct
def cop; end
def cop=(_); end
@@ -1269,7 +1279,8 @@ class RuboCop::Cop::Commissioner
def build_callbacks(cops); end
def initialize_callbacks; end
- def invoke(callback, cops, *args); end
+ def invoke(callback, cops); end
+ def invoke_with_argument(callback, cops, arg); end
def reset; end
def restrict_callbacks(callbacks); end
def restricted_map(callbacks); end
@@ -1331,6 +1342,8 @@ module RuboCop::Cop::ConfigurableEnforcedStyle
def unrecognized_style_detected; end
end
+RuboCop::Cop::ConfigurableEnforcedStyle::SYMBOL_TO_STRING_CACHE = T.let(T.unsafe(nil), Hash)
+
module RuboCop::Cop::ConfigurableFormatting
include ::RuboCop::Cop::ConfigurableEnforcedStyle
@@ -1550,10 +1563,10 @@ end
module RuboCop::Cop::FirstElementLineBreak
private
- def check_children_line_break(node, children, start = T.unsafe(nil)); end
- def check_method_line_break(node, children); end
+ def check_children_line_break(node, children, start = T.unsafe(nil), ignore_last: T.unsafe(nil)); end
+ def check_method_line_break(node, children, ignore_last: T.unsafe(nil)); end
def first_by_line(nodes); end
- def last_by_line(nodes); end
+ def last_line(nodes, ignore_last:); end
def method_uses_parens?(node, limit); end
end
@@ -2908,6 +2921,7 @@ class RuboCop::Cop::Layout::FirstArrayElementLineBreak < ::RuboCop::Cop::Base
private
def assignment_on_same_line?(node); end
+ def ignore_last_element?; end
end
RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), String)
@@ -2944,6 +2958,10 @@ class RuboCop::Cop::Layout::FirstHashElementLineBreak < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
def on_hash(node); end
+
+ private
+
+ def ignore_last_element?; end
end
RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), String)
@@ -2955,6 +2973,10 @@ class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base
def on_csend(node); end
def on_send(node); end
def on_super(node); end
+
+ private
+
+ def ignore_last_element?; end
end
RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), String)
@@ -2965,6 +2987,10 @@ class RuboCop::Cop::Layout::FirstMethodParameterLineBreak < ::RuboCop::Cop::Base
def on_def(node); end
def on_defs(node); end
+
+ private
+
+ def ignore_last_element?; end
end
RuboCop::Cop::Layout::FirstMethodParameterLineBreak::MSG = T.let(T.unsafe(nil), String)
@@ -3377,6 +3403,10 @@ class RuboCop::Cop::Layout::MultilineArrayLineBreaks < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
def on_array(node); end
+
+ private
+
+ def ignore_last_element?; end
end
RuboCop::Cop::Layout::MultilineArrayLineBreaks::MSG = T.let(T.unsafe(nil), String)
@@ -3446,6 +3476,7 @@ class RuboCop::Cop::Layout::MultilineHashKeyLineBreaks < ::RuboCop::Cop::Base
private
+ def ignore_last_element?; end
def starts_with_curly_brace?(node); end
end
@@ -3456,6 +3487,10 @@ class RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks < ::RuboCop::Cop::
extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
+
+ private
+
+ def ignore_last_element?; end
end
RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(nil), String)
@@ -3531,6 +3566,10 @@ class RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks < ::RuboCop::Cop:
extend ::RuboCop::Cop::AutoCorrector
def on_def(node); end
+
+ private
+
+ def ignore_last_element?; end
end
RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks::MSG = T.let(T.unsafe(nil), String)
@@ -4613,8 +4652,6 @@ end
RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::DuplicateBranch < ::RuboCop::Cop::Base
- include ::RuboCop::Cop::RescueNode
-
def on_branching_statement(node); end
def on_case(node); end
def on_case_match(node); end
@@ -4688,6 +4725,7 @@ class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base
def found_instance_method(node, name); end
def found_method(node, method_name); end
def found_sclass_method(node, name); end
+ def location(node); end
def lookup_constant(node, const_name); end
def message_for_dup(node, method_name, key); end
def method_key(node, method_name); end
@@ -5283,7 +5321,6 @@ RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Alignment
- include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
def explicit_not_force?(param0); end
@@ -5812,8 +5849,7 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base
def add_safe_navigation_operator(offense_range:, send_node:); end
def autocorrect(corrector, offense_range:, send_node:); end
- def find_brackets(send_node); end
- def method_chain(node); end
+ def brackets?(send_node); end
end
RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String)
@@ -6754,8 +6790,8 @@ end
module RuboCop::Cop::MultilineElementLineBreaks
private
- def all_on_same_line?(nodes); end
- def check_line_breaks(_node, children); end
+ def all_on_same_line?(nodes, ignore_last: T.unsafe(nil)); end
+ def check_line_breaks(_node, children, ignore_last: T.unsafe(nil)); end
end
module RuboCop::Cop::MultilineExpressionIndentation
@@ -7536,6 +7572,8 @@ module RuboCop::Cop::RequireLibrary
def on_new_investigation; end
end
+RuboCop::Cop::RequireLibrary::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::RequireLibraryCorrector
extend ::RuboCop::Cop::RangeHelp
@@ -7546,7 +7584,7 @@ class RuboCop::Cop::RequireLibraryCorrector
end
module RuboCop::Cop::RescueNode
- def on_new_investigation; end
+ def modifier_locations; end
private
@@ -8448,6 +8486,21 @@ RuboCop::Cop::Style::CommentedKeyword::KEYWORD_REGEXES = T.let(T.unsafe(nil), Ar
RuboCop::Cop::Style::CommentedKeyword::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::CommentedKeyword::REGEXP = T.let(T.unsafe(nil), Regexp)
+class RuboCop::Cop::Style::ConcatArrayLiterals < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def on_send(node); end
+
+ private
+
+ def offense_range(node); end
+ def preferred_method(node); end
+end
+
+RuboCop::Cop::Style::ConcatArrayLiterals::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::ConcatArrayLiterals::MSG_FOR_PERCENT_LITERALS = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::ConcatArrayLiterals::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Style::ConditionalAssignmentHelper
include ::RuboCop::Cop::ConfigurableEnforcedStyle
@@ -8658,6 +8711,7 @@ class RuboCop::Cop::Style::Documentation < ::RuboCop::Cop::Base
def constant_definition?(param0 = T.unsafe(nil)); end
def constant_visibility_declaration?(param0 = T.unsafe(nil)); end
+ def include_statement?(param0 = T.unsafe(nil)); end
def on_class(node); end
def on_module(node); end
def outer_module(param0); end
@@ -8670,7 +8724,7 @@ class RuboCop::Cop::Style::Documentation < ::RuboCop::Cop::Base
def constant_allowed?(node); end
def constant_declaration?(node); end
def identifier(node); end
- def macro_only?(body); end
+ def include_statement_only?(body); end
def namespace?(node); end
def nodoc(node); end
def nodoc?(comment, require_all: T.unsafe(nil)); end
@@ -9320,6 +9374,7 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base
def check_ending_if(node); end
def consecutive_conditionals?(parent, node); end
def guard_clause_source(guard_clause); end
+ def heredoc?(argument); end
def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end
def remove_whole_lines(corrector, range); end
def too_long_for_single_line?(node, example); end
@@ -9733,6 +9788,7 @@ RuboCop::Cop::Style::InverseMethods::CLASS_COMPARISON_METHODS = T.let(T.unsafe(n
RuboCop::Cop::Style::InverseMethods::EQUALITY_METHODS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Style::InverseMethods::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::InverseMethods::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array)
+RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Style::IpAddresses < ::RuboCop::Cop::Base
include ::RuboCop::Cop::StringHelp
@@ -11232,12 +11288,23 @@ class RuboCop::Cop::Style::RedundantConstantBase < ::RuboCop::Cop::Base
private
def bad?(node); end
+ def lint_constant_resolution_config; end
+ def lint_constant_resolution_cop_enabled?; end
def module_nesting_ancestors_of(node); end
def used_in_super_class_part?(node, class_node:); end
end
RuboCop::Cop::Style::RedundantConstantBase::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Style::RedundantDoubleSplatHashBraces < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def double_splat_hash_braces?(param0 = T.unsafe(nil)); end
+ def on_hash(node); end
+end
+
+RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Style::RedundantEach < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
@@ -11704,15 +11771,20 @@ class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
+ def if_inside_only_require(param0 = T.unsafe(nil)); end
def on_send(node); end
private
def find_previous_older_sibling(node); end
def in_same_section?(node1, node2); end
+ def not_modifier_form?(node); end
+ def search_node(node); end
+ def sibling_node(node); end
def swap(range1, range2, corrector:); end
end
+RuboCop::Cop::Style::RequireOrder::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base
@@ -12901,6 +12973,7 @@ module RuboCop::Cop::Util
private
def add_parentheses(node, corrector); end
+ def any_descendant?(node, *types); end
def args_begin(node); end
def args_end(node); end
def begins_its_line?(range); end
@@ -12910,6 +12983,7 @@ module RuboCop::Cop::Util
def double_quotes_required?(string); end
def escape_string(string); end
def first_part_of_call_chain(node); end
+ def include_or_equal?(source, target); end
def indent(node, offset: T.unsafe(nil)); end
def interpret_string_escapes(string); end
def line(node_or_range); end
@@ -12924,6 +12998,7 @@ module RuboCop::Cop::Util
class << self
def add_parentheses(node, corrector); end
+ def any_descendant?(node, *types); end
def args_begin(node); end
def args_end(node); end
def begins_its_line?(range); end
@@ -12946,6 +13021,7 @@ module RuboCop::Cop::Util
end
end
+RuboCop::Cop::Util::LINE_BEGINS_REGEX_CACHE = T.let(T.unsafe(nil), Hash)
RuboCop::Cop::Util::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp)
module RuboCop::Cop::Utils; end
@@ -13503,6 +13579,20 @@ module RuboCop::FileFinder
end
end
+class RuboCop::FilePatterns
+ def initialize(patterns); end
+
+ def match?(path); end
+
+ private
+
+ def partition_patterns(patterns); end
+
+ class << self
+ def from(patterns); end
+ end
+end
+
module RuboCop::Formatter; end
class RuboCop::Formatter::AutoGenConfigFormatter < ::RuboCop::Formatter::ProgressFormatter
@@ -14010,23 +14100,6 @@ module RuboCop::NameSimilarity
end
RuboCop::NodePattern = RuboCop::AST::NodePattern
-
-module RuboCop::OptimizedPatterns
- class << self
- def from(patterns); end
- end
-end
-
-class RuboCop::OptimizedPatterns::PatternsSet
- def initialize(patterns); end
-
- def match?(path); end
-
- private
-
- def partition_patterns(patterns); end
-end
-
class RuboCop::OptionArgumentError < ::StandardError; end
class RuboCop::Options
@@ -14112,6 +14185,8 @@ module RuboCop::PathUtil
def match_path?(pattern, path); end
def maybe_hidden_file?(path); end
def relative_path(path, base_dir = T.unsafe(nil)); end
+ def relative_paths_cache; end
+ def relative_paths_cache=(_arg0); end
def smart_path(path); end
end
end | false |
Other | Homebrew | brew | 8c160639b06646631039098e5fbec171b076a99e.json | ISSUE_TEMPLATE/bug: nudge people to discussions.
This probably won't work but gives us a stronger reason to ignore this. | .github/ISSUE_TEMPLATE/bug.yml | @@ -14,7 +14,7 @@ body:
- type: checkboxes
attributes:
label: Verification
- description: Please verify that you've followed these steps.
+ description: Please verify that you've followed these steps. If you cannot truthfully check these boxes, open a discussion at https://github.com/orgs/Homebrew/discussions instead.
options:
- label: My "`brew doctor` output" above says `Your system is ready to brew.` and am still able to reproduce my issue.
required: true | false |
Other | Homebrew | brew | f70b0bf8f2cc2df6b22f98a1d3c22ab92d21f1e1.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -3030,10 +3030,6 @@ class Cask::CaskUnspecifiedError
extend ::T::Private::Methods::SingletonMethodHooks
end
-class Cask::Cmd::AbstractCommand
- include ::Homebrew::Search::Extension
-end
-
class Cask::Config
def appdir(); end
@@ -3327,10 +3323,6 @@ class Dependencies
extend ::T::Private::Methods::SingletonMethodHooks
end
-class Descriptions
- extend ::Homebrew::Search::Extension
-end
-
class DevelopmentTools
extend ::T::Private::Methods::SingletonMethodHooks
end
@@ -4625,10 +4617,6 @@ class Homebrew::Livecheck::Strategy::Sparkle::Item
def self.members(); end
end
-module Homebrew::Search
- include ::Homebrew::Search::Extension
-end
-
class Homebrew::Service
def bin(*args, &block); end
@@ -4653,7 +4641,6 @@ module Homebrew
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
extend ::FileUtils::StreamUtils_
- extend ::Homebrew::Search::Extension
end
module HostEnvironmentSimulatorHelper | false |
Other | Homebrew | brew | 768ebe575002075cd9f2952e5db41c72fbbac88e.json | Fix access to `livecheck` constants in formulae | Library/Homebrew/formula.rb | @@ -65,6 +65,7 @@ class Formula
include Utils::Shell
include Context
include OnSystem::MacOSAndLinux
+ include Homebrew::Livecheck::Constants
extend Forwardable
extend Cachable
extend Predicable
@@ -3278,7 +3279,6 @@ def test(&block)
def livecheck(&block)
return @livecheck unless block
- include Homebrew::Livecheck::Constants
@livecheckable = true
@livecheck.instance_eval(&block)
end | false |
Other | Homebrew | brew | 1209fc046f9669a9b418b7dd759caf4224ab2098.json | formula: show stderr by default when generating completions | Library/Homebrew/formula.rb | @@ -1781,8 +1781,11 @@ def generate_completions_from_executable(*commands,
popen_read_args << shell_parameter if shell_parameter.present?
popen_read_args.flatten!
+ popen_read_options = {}
+ popen_read_options[:err] = :err unless ENV["HOMEBREW_STDERR"]
+
script_path.dirname.mkpath
- script_path.write Utils.safe_popen_read(popen_read_env, *popen_read_args)
+ script_path.write Utils.safe_popen_read(popen_read_env, *popen_read_args, **popen_read_options)
end
end
| false |
Other | Homebrew | brew | f41089fff497a30e15998e8a3e0269511441f763.json | Use module_function in search.rb | Library/Homebrew/search.rb | @@ -9,7 +9,9 @@ module Homebrew
#
# @api private
module Search
- def self.query_regexp(query)
+ module_function
+
+ def query_regexp(query)
if (m = query.match(%r{^/(.*)/$}))
Regexp.new(m[1])
else
@@ -19,7 +21,7 @@ def self.query_regexp(query)
raise "#{query} is not a valid regex."
end
- def self.search_descriptions(string_or_regex, args, search_type: :desc)
+ def search_descriptions(string_or_regex, args, search_type: :desc)
both = !args.formula? && !args.cask?
eval_all = args.eval_all? || Homebrew::EnvConfig.eval_all?
@@ -41,7 +43,7 @@ def self.search_descriptions(string_or_regex, args, search_type: :desc)
end
end
- def self.search_taps(query, silent: false)
+ def search_taps(query, silent: false)
if query.match?(Regexp.union(HOMEBREW_TAP_FORMULA_REGEX, HOMEBREW_TAP_CASK_REGEX))
_, _, query = query.split("/", 3)
end
@@ -86,7 +88,7 @@ def self.search_taps(query, silent: false)
results
end
- def self.search_formulae(string_or_regex)
+ def search_formulae(string_or_regex)
if string_or_regex.is_a?(String) && string_or_regex.match?(HOMEBREW_TAP_FORMULA_REGEX)
return begin
[Formulary.factory(string_or_regex).name]
@@ -122,7 +124,7 @@ def self.search_formulae(string_or_regex)
end.compact
end
- def self.search_casks(string_or_regex)
+ def search_casks(string_or_regex)
if string_or_regex.is_a?(String) && string_or_regex.match?(HOMEBREW_TAP_CASK_REGEX)
return begin
[Cask::CaskLoader.load(string_or_regex).token]
@@ -151,7 +153,7 @@ def self.search_casks(string_or_regex)
end.uniq
end
- def self.search_names(query, string_or_regex, args)
+ def search_names(query, string_or_regex, args)
both = !args.formula? && !args.cask?
remote_results = search_taps(query, silent: true) | false |
Other | Homebrew | brew | f03a400e28f82813e65b02948a61c8b6f74a1d77.json | Extract latest_version string to a constant | Library/Homebrew/formula.rb | @@ -3278,6 +3278,7 @@ def test(&block)
def livecheck(&block)
return @livecheck unless block
+ include Homebrew::Livecheck::Constants
@livecheckable = true
@livecheck.instance_eval(&block)
end | true |
Other | Homebrew | brew | f03a400e28f82813e65b02948a61c8b6f74a1d77.json | Extract latest_version string to a constant | Library/Homebrew/livecheck.rb | @@ -1,6 +1,8 @@
# typed: true
# frozen_string_literal: true
+require "livecheck/constants"
+
# The {Livecheck} class implements the DSL methods used in a formula's, cask's
# or resource's `livecheck` block and stores related instance variables. Most
# of these methods also return the related instance variable when no argument
@@ -142,13 +144,6 @@ def url(val = nil)
end
end
- # Returns a placeholder string that will be replaced with a formula's latest
- # version in livecheck URLs for its resources.
- # @return String
- def latest_version
- "<FORMULA_LATEST_VERSION>"
- end
-
delegate version: :@package_or_resource
delegate arch: :@package_or_resource
private :version, :arch | true |
Other | Homebrew | brew | f03a400e28f82813e65b02948a61c8b6f74a1d77.json | Extract latest_version string to a constant | Library/Homebrew/livecheck/constants.rb | @@ -0,0 +1,14 @@
+# typed: true
+# frozen_string_literal: true
+
+module Homebrew
+ module Livecheck
+ # The {Constants} module provides constants that are intended to be used
+ # in `livecheck` block values (e.g. `url`, `regex`).
+ module Constants
+ # A placeholder string used in resource `livecheck` block URLs that will
+ # be replaced with the latest version from the main formula check.
+ LATEST_VERSION = "<FORMULA_LATEST_VERSION>"
+ end
+ end
+end | true |
Other | Homebrew | brew | f03a400e28f82813e65b02948a61c8b6f74a1d77.json | Extract latest_version string to a constant | Library/Homebrew/livecheck/livecheck.rb | @@ -1,6 +1,7 @@
# typed: true
# frozen_string_literal: true
+require "livecheck/constants"
require "livecheck/error"
require "livecheck/livecheck_version"
require "livecheck/skip_conditions"
@@ -877,7 +878,7 @@ def resource_version(
checked_urls = []
# rubocop:disable Metrics/BlockLength
urls.each_with_index do |original_url, i|
- url = original_url.gsub(/<FORMULA_LATEST_VERSION>/, formula_latest)
+ url = original_url.gsub(Constants::LATEST_VERSION, formula_latest)
# Only preprocess the URL when it's appropriate
url = preprocess_url(url) unless STRATEGY_SYMBOLS_TO_SKIP_PREPROCESS_URL.include?(livecheck_strategy) | true |
Other | Homebrew | brew | 5e9223d0592734e9c2f1a071511a4911dfc63842.json | add explicit version for GitHub API | Library/Homebrew/utils/github/api.rb | @@ -192,6 +192,7 @@ def open_rest(url, data: nil, data_binary_path: nil, request_method: nil, scopes
token = credentials
args += ["--header", "Authorization: token #{token}"] unless credentials_type == :none
+ args += ["--header", "X-GitHub-Api-Version:2022-11-28"]
data_tmpfile = nil
if data | false |
Other | Homebrew | brew | ba664fa1b4c8f13284c8e5517ec278d456c58bf3.json | Move Search#search_casks out of extend/os
This doesn't need to be isolated anymore because
there is a check for the formula and cask args
and formula is passed by default on Linux now. | Library/Homebrew/search.rb | @@ -111,8 +111,33 @@ def search_formulae(string_or_regex)
end.compact
end
- def search_casks(_string_or_regex)
- []
+ def search_casks(string_or_regex)
+ if string_or_regex.is_a?(String) && string_or_regex.match?(HOMEBREW_TAP_CASK_REGEX)
+ return begin
+ [Cask::CaskLoader.load(string_or_regex).token]
+ rescue Cask::CaskUnavailableError
+ []
+ end
+ end
+
+ cask_tokens = Tap.flat_map(&:cask_tokens).map do |c|
+ c.sub(%r{^homebrew/cask.*/}, "")
+ end
+
+ results = cask_tokens.extend(Searchable)
+ .search(string_or_regex)
+
+ results += DidYouMean::SpellChecker.new(dictionary: cask_tokens)
+ .correct(string_or_regex)
+
+ results.sort.map do |name|
+ cask = Cask::CaskLoader.load(name)
+ if cask.installed?
+ pretty_installed(cask.full_name)
+ else
+ cask.full_name
+ end
+ end.uniq
end
def search_names(query, string_or_regex, args) | false |
Other | Homebrew | brew | 77726d19137d344540a4a0df965f64f0aec2bd21.json | docs: Change comma style in Acceptable-Casks
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> | docs/Acceptable-Casks.md | @@ -118,7 +118,7 @@ Common reasons to reject a cask entirely:
+ The author has [specifically asked us not to include it](https://github.com/Homebrew/homebrew-cask/pull/5342).
+ App requires [SIP to be disabled](https://github.com/Homebrew/homebrew-cask/pull/41890) to be installed and/or used.
+ App installer is a `pkg` that requires [`allow_untrusted: true`](https://docs.brew.sh/Cask-Cookbook#pkg-allow_untrusted).
-+ App fails with GateKeeper enabled on Homebrew supported macOS versions and platforms (e.g., unsigned apps fail on Macs with Apple silicon/ARM).
++ App fails with GateKeeper enabled on Homebrew supported macOS versions and platforms (e.g. unsigned apps fail on Macs with Apple silicon/ARM).
Common reasons to reject a cask from the main repo:
| false |
Other | Homebrew | brew | f8797e88b91f8fc712190073360561ff4ba38f71.json | Update RBI files for rspec-expectations.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rspec-expectations@3.12.1.rbi | @@ -230,6 +230,13 @@ class RSpec::Expectations::FailureAggregator
def notify_aggregated_failures; end
end
+RSpec::Expectations::FailureAggregator::AGGREGATED_FAILURE = T.let(T.unsafe(nil), RSpec::Expectations::FailureAggregator::AggregatedFailure)
+
+class RSpec::Expectations::FailureAggregator::AggregatedFailure
+ def inspect; end
+end
+
+RSpec::Expectations::FailureAggregator::AggregatedFailure::MESSAGE = T.let(T.unsafe(nil), String)
RSpec::Expectations::LegacyMacherAdapter = RSpec::Expectations::LegacyMatcherAdapter
class RSpec::Expectations::LegacyMatcherAdapter < ::RSpec::Matchers::MatcherDelegator | false |
Other | Homebrew | brew | 45cb6753b536aa54383836201cdd74fe63937c12.json | docs: Fix wrong condition for an app rejection
Swapped logic of rejection from work to failure and added an example | docs/Acceptable-Casks.md | @@ -118,7 +118,7 @@ Common reasons to reject a cask entirely:
+ The author has [specifically asked us not to include it](https://github.com/Homebrew/homebrew-cask/pull/5342).
+ App requires [SIP to be disabled](https://github.com/Homebrew/homebrew-cask/pull/41890) to be installed and/or used.
+ App installer is a `pkg` that requires [`allow_untrusted: true`](https://docs.brew.sh/Cask-Cookbook#pkg-allow_untrusted).
-+ App works on Homebrew supported macOS versions and platforms with GateKeeper enabled.
++ App fails with GateKeeper enabled on Homebrew supported macOS versions and platforms (e.g., unsigned apps fail on Macs with Apple silicon/ARM).
Common reasons to reject a cask from the main repo:
| false |
Other | Homebrew | brew | 3aac0fef7eaeff3cc50b873c921d80dca0ba6810.json | Simplify cask search
The cask_tokens and cask_names arrays here
were almost identical so we'll just use
cask_tokens for both. | Library/Homebrew/cask/cask.rb | @@ -38,16 +38,6 @@ def self.all
end.compact
end
- def self.full_names
- Tap.flat_map do |tap|
- next tap.cask_tokens.blank?
- next tap.cask_tokens if tap.user == "Homebrew"
-
- name = tap.name
- tap.cask_tokens.map { |tok| "#{name}/#{tok}" }
- end.flatten
- end
-
def tap
return super if block_given? # Object#tap
| true |
Other | Homebrew | brew | 3aac0fef7eaeff3cc50b873c921d80dca0ba6810.json | Simplify cask search
The cask_tokens and cask_names arrays here
were almost identical so we'll just use
cask_tokens for both. | Library/Homebrew/extend/os/mac/search.rb | @@ -37,8 +37,7 @@ def search_casks(string_or_regex)
results = cask_tokens.extend(Searchable)
.search(string_or_regex)
- cask_names = Cask::Cask.full_names
- results += DidYouMean::SpellChecker.new(dictionary: cask_names)
+ results += DidYouMean::SpellChecker.new(dictionary: cask_tokens)
.correct(string_or_regex)
results.sort.map do |name| | true |
Other | Homebrew | brew | 0afc41ceefcf2b69443287f12a45bb7d2c2c35e3.json | Explain edge case in install/cmd
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/install.rb | @@ -295,6 +295,8 @@ def install
return
end
+ # We don't seem to get good search results when the tap is specified
+ # so we might as well return early.
return if name.include?("/")
ohai "Searching for similarly named formulae and casks..." | false |
Other | Homebrew | brew | cd21875929bcd1b545842bd042aba9882b44fed0.json | Update RBI files for rubocop.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.40.0.rbi | @@ -6,6 +6,18 @@
module RuboCop; end
+class RuboCop::ArgumentsEnv
+ class << self
+ def read_as_arguments; end
+ end
+end
+
+class RuboCop::ArgumentsFile
+ class << self
+ def read_as_arguments; end
+ end
+end
+
class RuboCop::CLI
def initialize; end
@@ -194,13 +206,17 @@ class RuboCop::CachedData
end
class RuboCop::CommentConfig
+ extend ::Forwardable
+
def initialize(processed_source); end
def comment_only_line?(line_number); end
+ def config(*args, &block); end
def cop_disabled_line_ranges; end
def cop_enabled_at_line?(cop, line_number); end
def extra_enabled_comments; end
def processed_source; end
+ def registry(*args, &block); end
private
@@ -214,10 +230,45 @@ class RuboCop::CommentConfig
def extra_enabled_comments_with_names(extras:, names:); end
def handle_enable_all(directive, names, extras); end
def handle_switch(directive, names, extras); end
+ def inject_disabled_cops_directives(analyses); end
def non_comment_token_line_numbers; end
def qualified_cop_name(cop_name); end
end
+RuboCop::CommentConfig::CONFIG_DISABLED_LINE_RANGE_MIN = T.let(T.unsafe(nil), Float)
+
+class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment
+ def initialize(cop_name); end
+
+ def line_number; end
+ def loc; end
+ def text; end
+end
+
+class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Expression < ::Struct
+ def line; end
+ def line=(_); end
+
+ class << self
+ def [](*_arg0); end
+ def inspect; end
+ def members; end
+ def new(*_arg0); end
+ end
+end
+
+class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Loc < ::Struct
+ def expression; end
+ def expression=(_); end
+
+ class << self
+ def [](*_arg0); end
+ def inspect; end
+ def members; end
+ def new(*_arg0); end
+ end
+end
+
class RuboCop::CommentConfig::CopAnalysis < ::Struct
def line_ranges; end
def line_ranges=(_); end
@@ -673,6 +724,7 @@ module RuboCop::Cop::AllowedMethods
def allowed_method?(name); end
def allowed_methods; end
+ def cop_config_allowed_methods; end
def cop_config_deprecated_values; end
def ignored_method?(name); end
end
@@ -683,6 +735,7 @@ module RuboCop::Cop::AllowedPattern
def allowed_line?(line); end
def allowed_patterns; end
def cop_config_deprecated_methods_values; end
+ def cop_config_patterns_values; end
def ignored_line?(line); end
def matches_allowed_pattern?(line); end
def matches_ignored_pattern?(line); end
@@ -1063,6 +1116,7 @@ end
RuboCop::Cop::CodeLength::MSG = T.let(T.unsafe(nil), String)
module RuboCop::Cop::CommentsHelp
+ def comments_contain_disables?(node, cop_name); end
def comments_in_range(node); end
def contains_comments?(node); end
def source_range_with_comment(node); end
@@ -1128,6 +1182,8 @@ class RuboCop::Cop::Commissioner
def on_forward_arg(node); end
def on_forward_args(node); end
def on_forwarded_args(node); end
+ def on_forwarded_kwrestarg(node); end
+ def on_forwarded_restarg(node); end
def on_gvar(node); end
def on_gvasgn(node); end
def on_hash(node); end
@@ -1550,6 +1606,7 @@ module RuboCop::Cop::FrozenStringLiteral
def frozen_string_literals_disabled?; end
def frozen_string_literals_enabled?; end
def leading_comment_lines; end
+ def leading_magic_comments; end
def uninterpolated_string?(node); end
class << self
@@ -1830,9 +1887,11 @@ module RuboCop::Cop::HashShorthandSyntax
private
def breakdown_value_types_of_hash(hash_node); end
+ def def_node_that_require_parentheses(node); end
def each_omittable_value_pair(hash_value_type_breakdown, &block); end
def each_omitted_value_pair(hash_value_type_breakdown, &block); end
def enforced_shorthand_syntax; end
+ def find_ancestor_send_node(node); end
def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end
def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end
def ignore_hash_shorthand_syntax?(pair_node); end
@@ -1909,6 +1968,7 @@ class RuboCop::Cop::HashTransformMethod::Captures < ::Struct
def transforming_body_expr=(_); end
def unchanged_body_expr; end
def unchanged_body_expr=(_); end
+ def use_transformed_argname?; end
class << self
def [](*_arg0); end
@@ -2795,6 +2855,7 @@ class RuboCop::Cop::Layout::FirstArgumentIndentation < ::RuboCop::Cop::Base
def eligible_method_call?(param0 = T.unsafe(nil)); end
def on_csend(node); end
def on_send(node); end
+ def on_super(node); end
private
@@ -3187,21 +3248,28 @@ RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_dstr(node); end
private
+ def autocorrect(corrector, offense_range, insert_pos, spaces); end
def continuation?(line); end
def enforced_style_leading?; end
- def investigate_leading_style(first_line, end_of_first_line); end
- def investigate_trailing_style(second_line, end_of_first_line); end
+ def investigate_leading_style(first_line, second_line, end_of_first_line); end
+ def investigate_trailing_style(first_line, second_line, end_of_first_line); end
def leading_offense_range(end_of_first_line, matches); end
def message(_range); end
def raw_lines(node); end
def trailing_offense_range(end_of_first_line, matches); end
end
+RuboCop::Cop::Layout::LineContinuationLeadingSpace::LEADING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp)
+RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_1_ENDING = T.let(T.unsafe(nil), Regexp)
+RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_2_BEGINNING = T.let(T.unsafe(nil), Regexp)
+RuboCop::Cop::Layout::LineContinuationLeadingSpace::TRAILING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp)
+
class RuboCop::Cop::Layout::LineContinuationSpacing < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
@@ -3983,19 +4051,20 @@ class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base
private
def adjacent_braces(left_brace, right_brace); end
- def aligned_braces?(left_brace, right_brace); end
+ def aligned_braces?(inner, right_brace, column); end
def braces_with_contents_inside(node, inner); end
def check_inside(node, left_brace, right_brace); end
def check_left_brace(inner, left_brace, args_delimiter); end
- def check_right_brace(inner, left_brace, right_brace, single_line); end
+ def check_right_brace(node, inner, left_brace, right_brace, single_line); end
+ def inner_last_space_count(inner); end
def multiline_block?(left_brace, right_brace); end
def no_space(begin_pos, end_pos, msg); end
def no_space_inside_left_brace(left_brace, args_delimiter); end
def offense(begin_pos, end_pos, msg, style_param = T.unsafe(nil)); end
def pipe?(args_delimiter); end
def space(begin_pos, end_pos, msg); end
def space_inside_left_brace(left_brace, args_delimiter); end
- def space_inside_right_brace(right_brace); end
+ def space_inside_right_brace(inner, right_brace, column); end
def style_for_empty_braces; end
end
@@ -4012,10 +4081,13 @@ class RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces < ::RuboCop::Cop::Base
def ambiguous_or_unexpected_style_detected(style, is_match); end
def autocorrect(corrector, range); end
def check(token1, token2); end
+ def check_whitespace_only_hash(node); end
+ def enforce_no_space_style_for_empty_braces?; end
def expect_space?(token1, token2); 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
+ def range_inside_hash(node); end
def range_of_space_to_the_left(range); end
def range_of_space_to_the_right(range); end
def space_range(token_range); end
@@ -4060,7 +4132,9 @@ class RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters < ::RuboCop::Cop
private
+ def add_offenses_for_blank_spaces(node); end
def add_offenses_for_unnecessary_spaces(node); end
+ def body_range(node); end
def regex_matches(node, &blk); end
end
@@ -4320,6 +4394,7 @@ RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::AssignmentInCondition < ::RuboCop::Cop::Base
include ::RuboCop::Cop::SafeAssignment
+ extend ::RuboCop::Cop::AutoCorrector
def on_if(node); end
def on_until(node); end
@@ -4579,6 +4654,21 @@ end
RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Lint::DuplicateMagicComment < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::FrozenStringLiteral
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def on_new_investigation; end
+
+ private
+
+ def magic_comment_lines; end
+ def register_offense(range); end
+end
+
+RuboCop::Cop::Lint::DuplicateMagicComment::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
@@ -4597,14 +4687,17 @@ class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base
def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end
def found_instance_method(node, name); end
def found_method(node, method_name); end
+ def found_sclass_method(node, name); end
def lookup_constant(node, const_name); end
- def message_for_dup(node, method_name); end
+ def message_for_dup(node, method_name, key); end
+ def method_key(node, method_name); end
def on_attr(node, attr_name, args); end
def possible_dsl?(node); end
def qualified_name(enclosing, namespace, mod_name); end
def source_location(node); end
end
+RuboCop::Cop::Lint::DuplicateMethods::DEF_TYPES = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
@@ -4618,6 +4711,8 @@ class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop:
private
def interpolation_locs(node); end
+ def skip_expression?(expr); end
+ def start_with_escaped_zero_number?(current_child, next_child); end
def within_interpolation?(node, child); end
end
@@ -4677,7 +4772,6 @@ class RuboCop::Cop::Lint::EmptyBlock < ::RuboCop::Cop::Base
def allow_comment?(node); end
def allow_empty_lambdas?; end
def comment_disables_cop?(comment); end
- def lambda_or_proc?(node); end
end
RuboCop::Cop::Lint::EmptyBlock::MSG = T.let(T.unsafe(nil), String)
@@ -4703,12 +4797,17 @@ class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base
private
+ def all_branches_body_missing?(node); end
def autocorrect(corrector, node); end
def branch_range(node); end
def correct_other_branches(corrector, node); end
def deletion_range(range); end
+ def else_branch?(node); end
+ def empty_elsif_branch?(node); end
+ def empty_if_branch?(node); end
def remove_comments(corrector, node); end
def remove_empty_branch(corrector, node); end
+ def require_other_branches_correction?(node); end
end
RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String)
@@ -5078,6 +5177,7 @@ class RuboCop::Cop::Lint::MissingCopEnableDirective < ::RuboCop::Cop::Base
private
+ def acceptable_range?(cop, line_range); end
def department_enabled?(cop, comment); end
def each_missing_enable; end
def max_range; end
@@ -5126,6 +5226,9 @@ RuboCop::Cop::Lint::MultipleComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil),
RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::AllowedMethods
+ include ::RuboCop::Cop::AllowedPattern
+
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
@@ -5134,6 +5237,7 @@ class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base
private
+ def allowed_method_name?(node); end
def scoping_method_call?(child); end
end
@@ -5304,7 +5408,6 @@ class RuboCop::Cop::Lint::OrderedMagicComments < ::RuboCop::Cop::Base
def autocorrect(corrector, encoding_line, frozen_string_literal_line); end
def magic_comment_lines; end
- def magic_comments; end
end
RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String)
@@ -5340,6 +5443,7 @@ class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base
private
def chained_calls?(node); end
+ def first_argument_block_type?(first_arg); end
def first_argument_starts_with_left_parenthesis?(node); end
def space_range(expr, space_length); end
def spaces_before_left_parenthesis(node); end
@@ -5445,11 +5549,13 @@ class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base
def each_line_range(cop, line_ranges); end
def each_redundant_disable(&block); end
def ends_its_line?(range); end
+ def expected_final_disable?(cop, line_range); end
def find_redundant_all(range, next_range); end
def find_redundant_cop(cop, range); end
def find_redundant_department(cop, range); end
def followed_ranges?(range, next_range); end
def ignore_offense?(line_range); end
+ def leave_free_comment?(comment, range); end
def matching_range(haystack, needle); end
def message(cop_names); end
def previous_line_blank?(range); end
@@ -5489,6 +5595,10 @@ class RuboCop::Cop::Lint::RedundantDirGlobSort < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::TargetRubyVersion
def on_send(node); end
+
+ private
+
+ def multiple_argument?(glob_method); end
end
RuboCop::Cop::Lint::RedundantDirGlobSort::GLOB_METHODS = T.let(T.unsafe(nil), Array)
@@ -5498,14 +5608,18 @@ RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil)
class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- extend ::RuboCop::Cop::TargetRubyVersion
def on_send(node); end
- def unnecessary_require_statement?(param0 = T.unsafe(nil)); end
+ def redundant_require_statement?(param0 = T.unsafe(nil)); end
+
+ private
+
+ def redundant_feature?(feature_name); end
end
RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base
include ::RuboCop::Cop::AllowedMethods
@@ -5698,10 +5812,12 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base
def add_safe_navigation_operator(offense_range:, send_node:); end
def autocorrect(corrector, offense_range:, send_node:); end
+ def find_brackets(send_node); end
def method_chain(node); end
end
RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base
include ::RuboCop::Cop::AllowedMethods
@@ -5817,7 +5933,6 @@ class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base
def evaluate_exceptions(group); end
def find_shadowing_rescue(rescues); end
def offense_range(rescues); end
- def rescued_exceptions(rescue_group); end
def rescued_groups_for(rescues); end
def sorted?(rescued_groups); end
def system_call_err?(error); end
@@ -5830,6 +5945,7 @@ class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base
def find_conditional_node_from_ascendant(node); end
def ractor_block?(param0 = T.unsafe(nil)); end
def same_conditions_node_different_branch?(variable, outer_local_variable); end
+ def variable_node(variable); end
class << self
def joining_forces; end
@@ -6106,6 +6222,7 @@ class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base
def message(variable); end
class << self
+ def autocorrect_incompatible_with; end
def joining_forces; end
end
end
@@ -6276,18 +6393,18 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base
private
def check_begin(node); end
- def check_defined(node); end
def check_expression(expr); end
def check_literal(node); end
def check_nonmutating(node); end
def check_self(node); end
def check_var(node); end
+ def check_void_expression(node); end
def check_void_op(node); end
def in_void_context?(node); end
end
RuboCop::Cop::Lint::Void::BINARY_OPERATORS = T.let(T.unsafe(nil), Array)
-RuboCop::Cop::Lint::Void::DEFINED_MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Lint::Void::NONMUTATING_MSG = T.let(T.unsafe(nil), String)
@@ -6688,7 +6805,8 @@ class RuboCop::Cop::MultilineLiteralBraceCorrector
private
def content_if_comment_present(corrector, node); end
- def correct_next_line_brace(corrector); end
+ def correct_heredoc_argument_method_chain(corrector, end_range); end
+ def correct_next_line_brace(corrector, end_range); end
def correct_same_line_brace(corrector); end
def corrector; end
def last_element_range_with_trailing_comma(node); end
@@ -6697,6 +6815,7 @@ class RuboCop::Cop::MultilineLiteralBraceCorrector
def processed_source; end
def remove_trailing_content_of_comment(corrector, range); end
def select_content_to_be_inserted_after_last_element(corrector, node); end
+ def use_heredoc_argument_method_chain?(parent); end
class << self
def correct(corrector, node, processed_source); end
@@ -7324,6 +7443,7 @@ end
module RuboCop::Cop::RangeHelp
private
+ def add_range(range1, range2); end
def column_offset_between(base_range, range); end
def contents_range(node); end
def directions(side); end
@@ -7333,6 +7453,8 @@ module RuboCop::Cop::RangeHelp
def move_pos_str(src, pos, step, condition, needle); end
def range_between(start_pos, end_pos); end
def range_by_whole_lines(range, include_final_newline: T.unsafe(nil), buffer: T.unsafe(nil)); end
+ def range_with_comments(node); end
+ def range_with_comments_and_lines(node); end
def range_with_surrounding_comma(range, side = T.unsafe(nil)); end
def range_with_surrounding_space(range_positional = T.unsafe(nil), range: T.unsafe(nil), side: T.unsafe(nil), newlines: T.unsafe(nil), whitespace: T.unsafe(nil), continuations: T.unsafe(nil), buffer: T.unsafe(nil)); end
def source_range(source_buffer, line_number, column, length = T.unsafe(nil)); end
@@ -7355,16 +7477,19 @@ class RuboCop::Cop::Registry
def ==(other); end
def contains_cop_matching?(names); end
def cops; end
+ def cops_for_department(department); end
def department?(name); end
def department_missing?(badge, name); end
def departments; end
+ def disabled(config); end
def dismiss(cop); end
def each(&block); end
- def enabled(config, only = T.unsafe(nil), only_safe: T.unsafe(nil)); end
- def enabled?(cop, config, only_safe); end
+ def enabled(config); end
+ def enabled?(cop, config); end
def enabled_pending_cop?(cop_cfg, config); end
def enlist(cop); end
def find_by_cop_name(cop_name); end
+ def find_cops_by_directive(directive); end
def freeze; end
def length; end
def names; end
@@ -7593,8 +7718,10 @@ module RuboCop::Cop::StatementModifier
def code_after(node); end
def comment_disables_cop?(comment); end
def first_line_comment(node); end
+ def if_body_source(if_body); end
def length_in_modifier_form(node); end
def max_line_length; end
+ def method_source(if_body); end
def modifier_fits_on_single_line?(node); end
def non_eligible_body?(body); end
def non_eligible_condition?(condition); end
@@ -7632,6 +7759,8 @@ module RuboCop::Cop::Style; end
class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -7641,12 +7770,20 @@ class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base
def access_modifier_is_inlined?(node); end
def access_modifier_is_not_inlined?(node); end
def allow_modifiers_on_symbols?(node); end
+ def autocorrect(corrector, node); end
+ def find_argument_less_modifier_node(node); end
+ def find_corresponding_def_node(node); end
def group_style?; end
def inline_style?; end
+ def insert_def(corrector, node, source); end
+ def insert_inline_modifier(corrector, node, modifier_name); end
def message(range); end
def offense?(node); end
+ def remove_node(corrector, node); end
+ def select_grouped_def_nodes(node); end
end
+RuboCop::Cop::Style::AccessModifierDeclarations::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
@@ -7773,6 +7910,26 @@ end
RuboCop::Cop::Style::ArrayCoercion::CHECK_MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Style::ArrayIntersect < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRubyVersion
+
+ def active_support_bad_intersection_check?(param0 = T.unsafe(nil)); end
+ def on_send(node); end
+ def regular_bad_intersection_check?(param0 = T.unsafe(nil)); end
+
+ private
+
+ def bad_intersection_check?(node); end
+ def message(receiver, argument, method_name); end
+ def straight?(method_name); end
+end
+
+RuboCop::Cop::Style::ArrayIntersect::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::ArrayIntersect::NEGATED_METHODS = T.let(T.unsafe(nil), Array)
+RuboCop::Cop::Style::ArrayIntersect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+RuboCop::Cop::Style::ArrayIntersect::STRAIGHT_METHODS = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Style::ArrayJoin < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
@@ -7983,11 +8140,15 @@ class RuboCop::Cop::Style::CaseEquality < ::RuboCop::Cop::Base
def case_equality?(param0 = T.unsafe(nil)); end
def on_send(node); end
+ def self_class?(param0 = T.unsafe(nil)); end
private
- def const?(node); end
+ def begin_replacement(lhs, rhs); end
+ def const_replacement(lhs, rhs); end
+ def offending_receiver?(node); end
def replacement(lhs, rhs); end
+ def send_replacement(lhs, rhs); end
end
RuboCop::Cop::Style::CaseEquality::MSG = T.let(T.unsafe(nil), String)
@@ -8160,10 +8321,12 @@ class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base
def good_method_name(node); end
def offense_range(node); end
def range(begin_pos_node, end_pos_node); end
+ def to_enum_method?(node); end
end
RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::CollectionCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base
include ::RuboCop::Cop::MethodPreference
@@ -8568,8 +8731,14 @@ 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(param0 = T.unsafe(nil)); end
+ def each_range(param0 = T.unsafe(nil)); end
+ def each_range_with_zero_origin?(param0 = T.unsafe(nil)); end
+ def each_range_without_block_argument?(param0 = T.unsafe(nil)); end
def on_block(node); end
+
+ private
+
+ def offending?(node); end
end
RuboCop::Cop::Style::EachForSimpleLoop::MSG = T.let(T.unsafe(nil), String)
@@ -8887,6 +9056,10 @@ class RuboCop::Cop::Style::ExplicitBlockArgument < ::RuboCop::Cop::Base
def extract_block_name(def_node); end
def insert_argument(node, corrector, block_name); end
def yielding_arguments?(block_args, yield_args); end
+
+ class << self
+ def autocorrect_incompatible_with; end
+ end
end
RuboCop::Cop::Style::ExplicitBlockArgument::MSG = T.let(T.unsafe(nil), String)
@@ -9124,9 +9297,11 @@ RuboCop::Cop::Style::GlobalVars::BUILT_IN_VARS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::RangeHelp
include ::RuboCop::Cop::MinBodyLength
include ::RuboCop::Cop::LineLengthHelp
include ::RuboCop::Cop::StatementModifier
+ extend ::RuboCop::Cop::AutoCorrector
def on_def(node); end
def on_defs(node); end
@@ -9137,10 +9312,16 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base
def accepted_form?(node, ending: T.unsafe(nil)); end
def accepted_if?(node, ending); end
def allowed_consecutive_conditionals?; end
+ def and_or_guard_clause?(guard_clause); end
+ def autocorrect(corrector, node, condition, replacement, guard); end
+ def autocorrect_heredoc_argument(corrector, node, heredoc_branch, leave_branch, guard); end
+ def branch_to_remove(node, guard); end
+ def check_ending_body(body); end
def check_ending_if(node); end
def consecutive_conditionals?(parent, node); end
def guard_clause_source(guard_clause); end
- def register_offense(node, scope_exiting_keyword, conditional_keyword); end
+ def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end
+ def remove_whole_lines(corrector, range); end
def too_long_for_single_line?(node, example); end
def trivial?(node); end
end
@@ -9194,7 +9375,9 @@ class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
def kv_each(param0 = T.unsafe(nil)); end
+ def kv_each_with_block_pass(param0 = T.unsafe(nil)); end
def on_block(node); end
+ def on_block_pass(node); end
def on_numblock(node); end
private
@@ -9205,8 +9388,10 @@ class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base
def correct_args(node, corrector); end
def correct_implicit(node, corrector, method_name); end
def correct_key_value_each(node, corrector); end
+ def format_message(method_name); end
def kv_range(outer_node); end
- def register_kv_offense(node); end
+ def register_kv_offense(target, method); end
+ def register_kv_with_block_pass_offense(node, target, method); end
def used?(arg); end
end
@@ -9428,6 +9613,7 @@ class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base
def assume_boolean_value?(condition); end
def message(node, keyword); end
+ def multiple_elsif?(node); end
def offense_range_with_keyword(node, condition); end
def opposite_condition?(node); end
def replacement_condition(node, condition); end
@@ -9748,10 +9934,6 @@ class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base
def args_begin(node); end
def args_end(node); end
def args_parenthesized?(node); end
-
- class << self
- def autocorrect_incompatible_with; end
- end
end
module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
@@ -9763,6 +9945,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
def allowed_string_interpolation_method_call?(node); end
def ambiguous_literal?(node); end
def assigned_before?(node, target); end
+ def assignment_in_condition?(node); end
def autocorrect(corrector, node); end
def call_as_argument_or_chain?(node); end
def call_in_literals?(node); end
@@ -10189,6 +10372,7 @@ class RuboCop::Cop::Style::NegatedIfElseCondition < ::RuboCop::Cop::Base
def if_range(node); end
def negated_condition?(node); end
def swap_branches(corrector, node); end
+ def unwrap_begin_nodes(node); end
class << self
def autocorrect_incompatible_with; end
@@ -10527,6 +10711,7 @@ RuboCop::Cop::Style::NumericPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A
class RuboCop::Cop::Style::ObjectThen < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRubyVersion
def on_block(node); end
def on_numblock(node); end
@@ -10576,6 +10761,19 @@ end
RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Style::OperatorMethodCall < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def on_send(node); end
+
+ private
+
+ def wrap_in_parentheses_if_chained(corrector, node); end
+end
+
+RuboCop::Cop::Style::OperatorMethodCall::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::OperatorMethodCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Style::OptionHash < ::RuboCop::Cop::Base
def on_args(node); end
def option_hash(param0 = T.unsafe(nil)); end
@@ -10784,11 +10982,13 @@ class RuboCop::Cop::Style::PerlBackrefs < ::RuboCop::Cop::Base
private
+ def constant_prefix(node); end
def derived_from_braceless_interpolation?(node); end
def format_message(node:, preferred_expression:); end
def on_back_ref_or_gvar_or_nth_ref(node); end
def original_expression_of(node); end
def preferred_expression_to(node); end
+ def preferred_expression_to_node_with_constant_prefix(node); end
end
RuboCop::Cop::Style::PerlBackrefs::MESSAGE_FORMAT = T.let(T.unsafe(nil), String)
@@ -10991,6 +11191,7 @@ class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base
def require_braces?(node); end
def require_parentheses?(node); end
def same_method?(if_branch, else_branch); end
+ def single_argument_method?(node); end
def synonymous_condition_and_branch?(node); end
def use_arithmetic_operation?(node); end
def use_hash_key_access?(node); end
@@ -11023,6 +11224,38 @@ end
RuboCop::Cop::Style::RedundantConditional::COMPARISON_OPERATOR_MATCHER = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::RedundantConditional::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Style::RedundantConstantBase < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def on_cbase(node); end
+
+ private
+
+ def bad?(node); end
+ def module_nesting_ancestors_of(node); end
+ def used_in_super_class_part?(node, class_node:); end
+end
+
+RuboCop::Cop::Style::RedundantConstantBase::MSG = T.let(T.unsafe(nil), String)
+
+class RuboCop::Cop::Style::RedundantEach < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def on_send(node); end
+
+ private
+
+ def message(node); end
+ def range(node); end
+ def redundant_each_method(node); end
+ def remove_redundant_each(corrector, range, redundant_node); end
+end
+
+RuboCop::Cop::Style::RedundantEach::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::RedundantEach::MSG_WITH_INDEX = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::RedundantEach::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::RedundantEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Style::RedundantException < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
@@ -11142,6 +11375,7 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Parentheses
extend ::RuboCop::Cop::AutoCorrector
+ def allowed_pin_operator?(param0 = 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
@@ -11218,6 +11452,7 @@ class RuboCop::Cop::Style::RedundantRegexpCharacterClass < ::RuboCop::Cop::Base
private
def backslash_b?(elem); end
+ def backslash_zero?(elem); end
def each_redundant_character_class(node); end
def each_single_element_character_class(node); end
def multiple_codepoins?(expression); end
@@ -11238,7 +11473,8 @@ class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base
private
- def allowed_escape?(node, char, within_character_class); end
+ def allowed_escape?(node, char, index, within_character_class); end
+ def char_class_begins_or_ends_with_escaped_hyphen?(node, index); end
def delimiter?(node, char); end
def each_escape(node); end
def escape_range_at_index(node, index); end
@@ -11255,6 +11491,7 @@ class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base
def on_def(node); end
def on_defs(node); end
+ def on_send(node); end
private
@@ -11277,6 +11514,7 @@ end
RuboCop::Cop::Style::RedundantReturn::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::RedundantReturn::MULTI_RETURN_MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::RedundantReturn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
@@ -11401,6 +11639,35 @@ end
RuboCop::Cop::Style::RedundantSortBy::MSG_BLOCK = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::RedundantSortBy::MSG_NUMBLOCK = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Style::RedundantStringEscape < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::RangeHelp
+ include ::RuboCop::Cop::MatchRange
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def on_str(node); end
+
+ private
+
+ def allowed_escape?(node, range); end
+ def array_literal?(node, prefix); end
+ def begin_loc_present?(node); end
+ def delimiter?(node, char); end
+ def disabling_interpolation?(range); end
+ def heredoc?(node); end
+ def heredoc_with_disabled_interpolation?(node); end
+ def interpolation_not_enabled?(node); end
+ def literal_in_interpolated_or_multiline_string?(node); end
+ def message(range); end
+ def percent_array_literal?(node); end
+ def percent_q_literal?(node); end
+ def percent_w_literal?(node); end
+ def percent_w_upper_literal?(node); end
+ def single_quoted?(node); end
+ def str_contents_range(node); end
+end
+
+RuboCop::Cop::Style::RedundantStringEscape::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
include ::RuboCop::Cop::RangeHelp
@@ -11433,6 +11700,21 @@ end
RuboCop::Cop::Style::RegexpLiteral::MSG_USE_PERCENT_R = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::RegexpLiteral::MSG_USE_SLASHES = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def on_send(node); end
+
+ private
+
+ def find_previous_older_sibling(node); end
+ def in_same_section?(node1, node2); end
+ def swap(range1, range2, corrector:); end
+end
+
+RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Alignment
include ::RuboCop::Cop::RangeHelp
@@ -11500,12 +11782,11 @@ class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
extend ::RuboCop::Cop::TargetRubyVersion
- def check_node(node); 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
+ def ternary_safe_navigation_candidate(param0 = T.unsafe(nil)); end
private
@@ -11514,8 +11795,10 @@ class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base
def autocorrect(corrector, node); end
def begin_range(node, method_call); end
def chain_length(method_chain, method); end
+ def check_node(node); end
def comments(node); end
def end_range(node, method_call); end
+ def extract_body(node); end
def extract_common_parts(method_chain, checked_variable); end
def extract_parts(node); end
def extract_parts_from_and(node); end
@@ -11529,6 +11812,7 @@ class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base
def relevant_comment_ranges(node); end
def unsafe_method?(send_node); end
def unsafe_method_used?(method_chain, method); end
+ def use_var_only_in_unless_modifier?(node, variable); end
end
RuboCop::Cop::Style::SafeNavigation::LOGIC_JUMP_KEYWORDS = T.let(T.unsafe(nil), Array)
@@ -11573,10 +11857,11 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base
def find_regexp(node, block); end
def match_predicate_without_receiver?(node); end
def receiver_allowed?(node); end
- def register_offense(node, block_node, regexp); end
+ def register_offense(node, block_node, regexp, opposite); end
end
RuboCop::Cop::Style::SelectByRegexp::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::SelectByRegexp::OPPOSITE_REPLACEMENTS = T.let(T.unsafe(nil), Hash)
RuboCop::Cop::Style::SelectByRegexp::REGEXP_METHODS = T.let(T.unsafe(nil), Set)
RuboCop::Cop::Style::SelectByRegexp::REPLACEMENTS = T.let(T.unsafe(nil), Hash)
RuboCop::Cop::Style::SelectByRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
@@ -11822,12 +12107,17 @@ RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_NO_REQUIRE = T.let(T.unsafe(ni
RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_REQUIRE = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::StaticClass < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::RangeHelp
include ::RuboCop::Cop::VisibilityHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_class(class_node); end
private
+ def autocorrect(corrector, class_node); end
+ def autocorrect_def(corrector, node); end
+ def autocorrect_sclass(corrector, node); end
def class_convertible_to_module?(class_node); end
def class_elements(class_node); end
def extend_call?(node); end
@@ -12465,13 +12755,13 @@ module RuboCop::Cop::SurroundingSpace
def empty_offense(node, range, message, command); end
def empty_offenses(node, left, right, message); end
def extra_space?(token, side); end
- def no_space_between?(left_bracket_token, right_bracket_token); end
+ def no_character_between?(left_bracket_token, right_bracket_token); end
def no_space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end
def offending_empty_no_space?(config, left_token, right_token); end
def offending_empty_space?(config, left_token, right_token); end
def on_new_investigation; end
- def reposition(src, pos, step); end
- def side_space_range(range:, side:); end
+ def reposition(src, pos, step, include_newlines: T.unsafe(nil)); end
+ def side_space_range(range:, side:, include_newlines: T.unsafe(nil)); end
def space_between?(left_bracket_token, right_bracket_token); end
def space_offense(node, token, side, message, command); end
def space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end
@@ -12935,6 +13225,7 @@ end
RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array)
RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array)
RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol)
+RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash)
RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array)
RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array)
RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Symbol)
@@ -13047,15 +13338,21 @@ module RuboCop::Cop::VisibilityHelp
extend ::RuboCop::AST::NodePattern::Macros
def visibility_block?(param0 = T.unsafe(nil)); end
+ def visibility_inline_on_def?(param0 = T.unsafe(nil)); end
+ def visibility_inline_on_method_name?(param0 = T.unsafe(nil), method_name:); end
private
def find_visibility_end(node); end
def find_visibility_start(node); end
def node_visibility(node); end
+ def node_visibility_from_visibility_block(node); end
+ def node_visibility_from_visibility_inline(node); end
+ def node_visibility_from_visibility_inline_on_def(node); end
+ def node_visibility_from_visibility_inline_on_method_name(node); end
end
-RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Array)
+RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Set)
class RuboCop::DirectiveComment
def initialize(comment, cop_registry = T.unsafe(nil)); end
@@ -13124,7 +13421,11 @@ module RuboCop::Ext; end
module RuboCop::Ext::ProcessedSource
def comment_config; end
+ def config; end
+ def config=(_arg0); end
def disabled_line_ranges; end
+ def registry; end
+ def registry=(_arg0); end
end
module RuboCop::Ext::Range
@@ -13256,11 +13557,14 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo
private
+ def auto_gen_enforced_style?; end
def command; end
def cop_config_params(default_cfg, cfg); end
def default_config(cop_name); end
def excludes(offending_files, cop_name, parent); end
+ def filtered_config(cfg); end
def merge_mode_for_exclude?(cfg); end
+ def no_exclude_limit?; end
def output_cop(cop_name, offense_count); end
def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end
def output_cop_config(output_buffer, cfg, cop_name); end
@@ -13491,7 +13795,7 @@ class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseForm
def finished(_inspected_files); end
def offense_counts; end
def ordered_offense_counts(offense_counts); end
- def report_summary(offense_counts); end
+ def report_summary(offense_counts, offending_files_count); end
def started(target_files); end
def total_offense_count(offense_counts); end
end
@@ -13515,8 +13819,8 @@ end
RuboCop::Formatter::PacmanFormatter::FALLBACK_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer)
RuboCop::Formatter::PacmanFormatter::GHOST = T.let(T.unsafe(nil), String)
-RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::Presenter)
-RuboCop::Formatter::PacmanFormatter::PACMAN = 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::NullPresenter)
class RuboCop::Formatter::ProgressFormatter < ::RuboCop::Formatter::ClangStyleFormatter
include ::RuboCop::Formatter::TextUtil
@@ -13706,6 +14010,23 @@ module RuboCop::NameSimilarity
end
RuboCop::NodePattern = RuboCop::AST::NodePattern
+
+module RuboCop::OptimizedPatterns
+ class << self
+ def from(patterns); end
+ end
+end
+
+class RuboCop::OptimizedPatterns::PatternsSet
+ def initialize(patterns); end
+
+ def match?(path); end
+
+ private
+
+ def partition_patterns(patterns); end
+end
+
class RuboCop::OptionArgumentError < ::StandardError; end
class RuboCop::Options
@@ -13725,8 +14046,6 @@ class RuboCop::Options
def add_output_options(opts); end
def add_server_options(opts); end
def add_severity_option(opts); end
- def args_from_env; end
- def args_from_file; end
def define_options; end
def handle_deprecated_option(old_option, new_option); end
def long_opt_symbol(args); end
@@ -13797,6 +14116,8 @@ module RuboCop::PathUtil
end
end
+RuboCop::PathUtil::HIDDEN_FILE_PATTERN = T.let(T.unsafe(nil), String)
+
module RuboCop::Platform
class << self
def windows?; end
@@ -14086,6 +14407,7 @@ module RuboCop::Version
def document_version; end
def extension_versions(env); end
def feature_version(feature); end
+ def server_mode; end
def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end
end
end | true |
Other | Homebrew | brew | cd21875929bcd1b545842bd042aba9882b44fed0.json | Update RBI files for rubocop.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -3287,9 +3287,13 @@ module CopHelper
def autocorrect_source_file(source); end
+ def configuration(); end
+
def inspect_source(source, file=T.unsafe(nil)); end
def parse_source(source, file=T.unsafe(nil)); end
+
+ def registry(); end
end
module CopHelper
@@ -6776,6 +6780,7 @@ class RuboCop::AST::NodePattern::Parser
end
module RuboCop::AST::NodePattern::Sets
+ SET_ANY_EMPTY = ::T.let(nil, ::T.untyped)
SET_ARM_INTEL = ::T.let(nil, ::T.untyped)
SET_BASH_COMPLETION_ZSH_COMPLETION_FISH_COMPLETION = ::T.let(nil, ::T.untyped)
SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped)
@@ -6784,6 +6789,7 @@ module RuboCop::AST::NodePattern::Sets
SET_MAC_LINUX = ::T.let(nil, ::T.untyped)
SET_ON_INTEL_ON_ARM = ::T.let(nil, ::T.untyped)
SET_OR_NEWER_OR_OLDER = ::T.let(nil, ::T.untyped)
+ SET_PRESENT_ANY_BLANK_EMPTY = ::T.let(nil, ::T.untyped)
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
SET_TO_TO_NOT_NOT_TO = ::T.let(nil, ::T.untyped)
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped) | true |
Other | Homebrew | brew | 79267e1e7634208a085ac0f7dc8292af2a4b6bda.json | rubocop_rspec: fix incorrect failures. | Library/.rubocop_rspec.yml | @@ -37,3 +37,10 @@ RSpec/MultipleMemoizedHelpers:
# Annoying to have these autoremoved.
RSpec/Focus:
AutoCorrect: false
+
+# Gets confused on these tests for a `skip` DSL
+RSpec/PendingWithoutReason:
+ Exclude:
+ - "**/dependency_expansion_spec.rb"
+ - "**/livecheck/skip_conditions_spec.rb"
+ - "**/livecheck_spec.rb" | false |
Other | Homebrew | brew | 77e374b3056f84886548e0f85bcb5763dafe7860.json | Update RBI files for rubocop-rspec.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.16.0.rbi | @@ -83,6 +83,7 @@ class RuboCop::Cop::RSpec::Be < ::RuboCop::Cop::RSpec::Base
end
RuboCop::Cop::RSpec::Be::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::RSpec::Be::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::RSpec::BeEq < ::RuboCop::Cop::RSpec::Base
extend ::RuboCop::Cop::AutoCorrector
@@ -131,7 +132,7 @@ RuboCop::Cop::RSpec::BeforeAfterAll::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::RSpec::BeforeAfterAll::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
module RuboCop::Cop::RSpec::Capybara; end
-class RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation < ::RuboCop::Cop::RSpec::Base
+class RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
def as_is_matcher(param0 = T.unsafe(nil)); end
@@ -172,7 +173,7 @@ end
RuboCop::Cop::RSpec::Capybara::FeatureMethods::MAP = T.let(T.unsafe(nil), Hash)
RuboCop::Cop::RSpec::Capybara::FeatureMethods::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::RSpec::Capybara::NegationMatcher < ::RuboCop::Cop::RSpec::Base
+class RuboCop::Cop::RSpec::Capybara::NegationMatcher < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
extend ::RuboCop::Cop::AutoCorrector
@@ -195,7 +196,7 @@ RuboCop::Cop::RSpec::Capybara::NegationMatcher::NEGATIVE_MATCHERS = T.let(T.unsa
RuboCop::Cop::RSpec::Capybara::NegationMatcher::POSITIVE_MATCHERS = T.let(T.unsafe(nil), Set)
RuboCop::Cop::RSpec::Capybara::NegationMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set)
-class RuboCop::Cop::RSpec::Capybara::SpecificActions < ::RuboCop::Cop::RSpec::Base
+class RuboCop::Cop::RSpec::Capybara::SpecificActions < ::RuboCop::Cop::Base
def click_on_selector(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -213,7 +214,7 @@ RuboCop::Cop::RSpec::Capybara::SpecificActions::MSG = T.let(T.unsafe(nil), Strin
RuboCop::Cop::RSpec::Capybara::SpecificActions::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
RuboCop::Cop::RSpec::Capybara::SpecificActions::SPECIFIC_ACTION = T.let(T.unsafe(nil), Hash)
-class RuboCop::Cop::RSpec::Capybara::SpecificFinders < ::RuboCop::Cop::RSpec::Base
+class RuboCop::Cop::RSpec::Capybara::SpecificFinders < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
@@ -235,9 +236,7 @@ end
RuboCop::Cop::RSpec::Capybara::SpecificFinders::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::RSpec::Capybara::SpecificFinders::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-class RuboCop::Cop::RSpec::Capybara::SpecificMatcher < ::RuboCop::Cop::RSpec::Base
- include ::RuboCop::Cop::RSpec::CapybaraHelp
-
+class RuboCop::Cop::RSpec::Capybara::SpecificMatcher < ::RuboCop::Cop::Base
def first_argument(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -252,7 +251,7 @@ RuboCop::Cop::RSpec::Capybara::SpecificMatcher::MSG = T.let(T.unsafe(nil), Strin
RuboCop::Cop::RSpec::Capybara::SpecificMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
RuboCop::Cop::RSpec::Capybara::SpecificMatcher::SPECIFIC_MATCHER = T.let(T.unsafe(nil), Hash)
-class RuboCop::Cop::RSpec::Capybara::VisibilityMatcher < ::RuboCop::Cop::RSpec::Base
+class RuboCop::Cop::RSpec::Capybara::VisibilityMatcher < ::RuboCop::Cop::Base
def on_send(node); end
def visible_false?(param0 = T.unsafe(nil)); end
def visible_true?(param0 = T.unsafe(nil)); end
@@ -484,6 +483,22 @@ end
RuboCop::Cop::RSpec::Dialect::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::RSpec::DuplicatedMetadata < ::RuboCop::Cop::RSpec::Base
+ include ::RuboCop::Cop::RSpec::Metadata
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def on_metadata(symbols, _pairs); end
+
+ private
+
+ def autocorrect(corrector, node); end
+ def duplicated?(node); end
+ def on_metadata_symbol(node); end
+end
+
+RuboCop::Cop::RSpec::DuplicatedMetadata::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::RSpec::EmptyExampleGroup < ::RuboCop::Cop::RSpec::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
@@ -521,11 +536,14 @@ class RuboCop::Cop::RSpec::EmptyLineAfterExample < ::RuboCop::Cop::RSpec::Base
include ::RuboCop::Cop::RSpec::EmptyLineSeparation
extend ::RuboCop::Cop::AutoCorrector
+ def on_block(node); end
+
+ private
+
def allow_consecutive_one_liners?; end
def allowed_one_liner?(node); end
def consecutive_one_liner?(node); end
def next_one_line_example?(node); end
- def on_block(node); end
end
RuboCop::Cop::RSpec::EmptyLineAfterExample::MSG = T.let(T.unsafe(nil), String)
@@ -676,6 +694,7 @@ end
RuboCop::Cop::RSpec::ExpectActual::COMPLEX_LITERALS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::RSpec::ExpectActual::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::RSpec::ExpectActual::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
RuboCop::Cop::RSpec::ExpectActual::SIMPLE_LITERALS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::RSpec::ExpectActual::SUPPORTED_MATCHERS = T.let(T.unsafe(nil), Array)
@@ -738,7 +757,7 @@ RuboCop::Cop::RSpec::ExplicitHelper::BUILT_IN_MATCHERS = T.let(T.unsafe(nil), Ar
RuboCop::Cop::RSpec::ExplicitHelper::MSG_EXPLICIT = T.let(T.unsafe(nil), String)
module RuboCop::Cop::RSpec::FactoryBot; end
-class RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically < ::RuboCop::Cop::RSpec::Base
+class RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
def association?(param0 = T.unsafe(nil)); end
@@ -762,19 +781,19 @@ end
RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::RSpec::FactoryBot::ConsistentParenthesesStyle < ::RuboCop::Cop::RSpec::Base
+class RuboCop::Cop::RSpec::FactoryBot::ConsistentParenthesesStyle < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
include ::RuboCop::RSpec::FactoryBot::Language
extend ::RuboCop::Cop::AutoCorrector
- def ambiguous_without_parentheses?(node); end
def factory_call(param0 = T.unsafe(nil)); end
def on_send(node); end
- def process_with_parentheses(node); end
- def process_without_parentheses(node); end
private
+ def ambiguous_without_parentheses?(node); end
+ def process_with_parentheses(node); end
+ def process_without_parentheses(node); end
def remove_parentheses(corrector, node); end
class << self
@@ -787,7 +806,7 @@ RuboCop::Cop::RSpec::FactoryBot::ConsistentParenthesesStyle::MSG_OMIT_PARENS = T
RuboCop::Cop::RSpec::FactoryBot::ConsistentParenthesesStyle::MSG_REQUIRE_PARENS = T.let(T.unsafe(nil), String)
RuboCop::Cop::RSpec::FactoryBot::ConsistentParenthesesStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set)
-class RuboCop::Cop::RSpec::FactoryBot::CreateList < ::RuboCop::Cop::RSpec::Base
+class RuboCop::Cop::RSpec::FactoryBot::CreateList < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
include ::RuboCop::RSpec::FactoryBot::Language
extend ::RuboCop::Cop::AutoCorrector
@@ -845,11 +864,12 @@ class RuboCop::Cop::RSpec::FactoryBot::CreateList::TimesCorrector
private
+ def factory_call_block_source; end
def generate_n_times_block(node); end
def node; end
end
-class RuboCop::Cop::RSpec::FactoryBot::FactoryClassName < ::RuboCop::Cop::RSpec::Base
+class RuboCop::Cop::RSpec::FactoryBot::FactoryClassName < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
def class_name(param0 = T.unsafe(nil)); end
@@ -864,6 +884,25 @@ RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::ALLOWED_CONSTANTS = T.let(T.u
RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+class RuboCop::Cop::RSpec::FactoryBot::FactoryNameStyle < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ include ::RuboCop::RSpec::FactoryBot::Language
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def factory_call(param0 = T.unsafe(nil)); end
+ def on_send(node); end
+
+ private
+
+ def offense_for_string_style?(name); end
+ def offense_for_symbol_style?(name); end
+ def register_offense(name, prefer); end
+end
+
+RuboCop::Cop::RSpec::FactoryBot::FactoryNameStyle::FACTORY_CALLS = T.let(T.unsafe(nil), Set)
+RuboCop::Cop::RSpec::FactoryBot::FactoryNameStyle::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::RSpec::FactoryBot::FactoryNameStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set)
+
class RuboCop::Cop::RSpec::FactoryBot::SyntaxMethods < ::RuboCop::Cop::RSpec::Base
include ::RuboCop::Cop::RSpec::InsideExampleGroup
include ::RuboCop::Cop::RangeHelp
@@ -1010,6 +1049,7 @@ end
RuboCop::Cop::RSpec::ImplicitExpect::ENFORCED_REPLACEMENTS = T.let(T.unsafe(nil), Hash)
RuboCop::Cop::RSpec::ImplicitExpect::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::RSpec::ImplicitExpect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::RSpec::ImplicitSubject < ::RuboCop::Cop::RSpec::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
@@ -1132,12 +1172,12 @@ class RuboCop::Cop::RSpec::LeadingSubject < ::RuboCop::Cop::RSpec::Base
include ::RuboCop::Cop::RSpec::InsideExampleGroup
extend ::RuboCop::Cop::AutoCorrector
- def check_previous_nodes(node); end
def on_block(node); end
private
def autocorrect(corrector, node, sibling); end
+ def check_previous_nodes(node); end
def offending?(node); end
def offending_node(node); end
def parent(node); end
@@ -1230,8 +1270,21 @@ end
RuboCop::Cop::RSpec::MessageSpies::MSG_HAVE_RECEIVED = T.let(T.unsafe(nil), String)
RuboCop::Cop::RSpec::MessageSpies::MSG_RECEIVE = T.let(T.unsafe(nil), String)
+RuboCop::Cop::RSpec::MessageSpies::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
RuboCop::Cop::RSpec::MessageSpies::SUPPORTED_STYLES = T.let(T.unsafe(nil), Array)
+module RuboCop::Cop::RSpec::Metadata
+ include ::RuboCop::RSpec::Language
+ extend ::RuboCop::AST::NodePattern::Macros
+
+ def metadata_in_block(param0, param1); end
+ def on_block(node); end
+ def on_metadata(_symbols, _pairs); end
+ def on_numblock(node); end
+ def rspec_configure(param0 = T.unsafe(nil)); end
+ def rspec_metadata(param0 = T.unsafe(nil)); end
+end
+
class RuboCop::Cop::RSpec::MissingExampleGroupArgument < ::RuboCop::Cop::RSpec::Base
def on_block(node); end
end
@@ -1405,6 +1458,24 @@ end
RuboCop::Cop::RSpec::Pending::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::RSpec::PendingWithoutReason < ::RuboCop::Cop::RSpec::Base
+ def on_send(node); end
+ def pending_by_example_method?(param0 = T.unsafe(nil)); end
+ def pending_by_metadata_without_reason?(param0 = T.unsafe(nil)); end
+ def skipped_by_example_group_method?(param0 = T.unsafe(nil)); end
+ def skipped_by_example_method?(param0 = T.unsafe(nil)); end
+ def skipped_by_metadata_without_reason?(param0 = T.unsafe(nil)); end
+
+ private
+
+ def pending_by_pending_step_without_reason?(node); end
+ def pending_without_reason?(node); end
+ def skipped_by_skip_step_without_reason?(node); end
+ def skipped_without_reason?(node); end
+end
+
+RuboCop::Cop::RSpec::PendingWithoutReason::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::RSpec::PredicateMatcher < ::RuboCop::Cop::RSpec::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
include ::RuboCop::Cop::RSpec::InflectedHelper
@@ -1420,6 +1491,7 @@ class RuboCop::Cop::RSpec::PredicateMatcher < ::RuboCop::Cop::RSpec::Base
def block_loc(send_node); end
end
+RuboCop::Cop::RSpec::PredicateMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
module RuboCop::Cop::RSpec::Rails; end
class RuboCop::Cop::RSpec::Rails::AvoidSetupHook < ::RuboCop::Cop::RSpec::Base
@@ -1431,14 +1503,16 @@ end
RuboCop::Cop::RSpec::Rails::AvoidSetupHook::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::RSpec::Rails::HaveHttpStatus < ::RuboCop::Cop::RSpec::Base
+class RuboCop::Cop::RSpec::Rails::HaveHttpStatus < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
def match_status(param0 = T.unsafe(nil)); end
def on_send(node); end
end
RuboCop::Cop::RSpec::Rails::HaveHttpStatus::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::RSpec::Rails::HaveHttpStatus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set)
+RuboCop::Cop::RSpec::Rails::HaveHttpStatus::RUNNERS = T.let(T.unsafe(nil), Set)
class RuboCop::Cop::RSpec::Rails::HttpStatus < ::RuboCop::Cop::RSpec::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
@@ -1679,8 +1753,11 @@ end
RuboCop::Cop::RSpec::ScatteredLet::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::ScatteredSetup < ::RuboCop::Cop::RSpec::Base
- def lines_msg(numbers); end
def on_block(node); end
+
+ private
+
+ def lines_msg(numbers); end
def repeated_hooks(node); end
end
@@ -1755,19 +1832,15 @@ module RuboCop::Cop::RSpec::SkipOrPending
end
class RuboCop::Cop::RSpec::SortMetadata < ::RuboCop::Cop::RSpec::Base
+ include ::RuboCop::Cop::RSpec::Metadata
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- def metadata_in_block(param0, param1); end
- def on_block(node); end
- def on_numblock(node); end
- def rspec_configure(param0 = T.unsafe(nil)); end
- def rspec_metadata(param0 = T.unsafe(nil)); end
+ def on_metadata(symbols, pairs); end
private
def crime_scene(symbols, pairs); end
- def investigate(symbols, pairs); end
def replacement(symbols, pairs); end
def sort_pairs(pairs); end
def sort_symbols(symbols); end
@@ -1794,6 +1867,7 @@ class RuboCop::Cop::RSpec::StubbedMock < ::RuboCop::Cop::RSpec::Base
end
RuboCop::Cop::RSpec::StubbedMock::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::RSpec::StubbedMock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::RSpec::SubjectDeclaration < ::RuboCop::Cop::RSpec::Base
def offensive_subject_declaration?(param0 = T.unsafe(nil)); end
@@ -1840,10 +1914,13 @@ module RuboCop::Cop::RSpec::TopLevelGroup
end
class RuboCop::Cop::RSpec::UnspecifiedException < ::RuboCop::Cop::RSpec::Base
- def block_with_args?(node); end
- def empty_exception_matcher?(node); end
def empty_raise_error_or_exception(param0 = T.unsafe(nil)); end
def on_send(node); end
+
+ private
+
+ def block_with_args?(node); end
+ def empty_exception_matcher?(node); end
end
RuboCop::Cop::RSpec::UnspecifiedException::MSG = T.let(T.unsafe(nil), String)
@@ -2174,7 +2251,7 @@ end
module RuboCop::RSpec::Language::Runners
class << self
- def all(element); end
+ def all(element = T.unsafe(nil)); end
end
end
| true |
Other | Homebrew | brew | 77e374b3056f84886548e0f85bcb5763dafe7860.json | Update RBI files for rubocop-rspec.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -6785,6 +6785,7 @@ module RuboCop::AST::NodePattern::Sets
SET_ON_INTEL_ON_ARM = ::T.let(nil, ::T.untyped)
SET_OR_NEWER_OR_OLDER = ::T.let(nil, ::T.untyped)
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
+ SET_TO_TO_NOT_NOT_TO = ::T.let(nil, ::T.untyped)
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
SET____ETC_4 = ::T.let(nil, ::T.untyped)
end | true |
Other | Homebrew | brew | daa87fa10f1c6fda9c4b48509f72fac19b44f878.json | Add specific examples to install cmd
- provide specific install instructions
when a cask/formula doesn't exist
and we search for similar ones
- print and exit early if a named formula that
was removed recently has the same name
- exit early if the tap is specified because
we don't get good search results | Library/Homebrew/cmd/install.rb | @@ -288,16 +288,47 @@ def install
end
opoo e
+
+ reason = MissingFormula.reason(name, silent: true)
+ if !args.cask? && reason
+ $stderr.puts reason
+ return
+ end
+
+ return if name.include?("/")
+
ohai "Searching for similarly named formulae and casks..."
# Don't treat formula/cask name as a regex
query = string_or_regex = name
- if search_names(query, string_or_regex, args)
- puts <<~EOL
+ all_formulae, all_casks = search_names(query, string_or_regex)
+
+ print_formulae = args.formula?
+ print_casks = args.cask?
+ print_formulae = print_casks = true if !print_formulae && !print_casks
+ print_formulae &&= all_formulae.any?
+ print_casks &&= all_casks.any?
- To install one of them, run:
- brew install 'package_name'
- EOL
+ if print_formulae
+ ohai "Formulae", Formatter.columns(all_formulae)
+ first_formula = all_formulae.first.to_s
+ puts <<~EOS
+
+ To install #{first_formula}, run:
+ brew install #{first_formula}
+ EOS
end
+ puts if print_formulae && print_casks
+ if print_casks
+ ohai "Casks", Formatter.columns(all_casks)
+ first_cask = all_casks.first.to_s
+ puts <<~EOS
+
+ To install #{first_cask}, run:
+ brew install --cask #{first_cask}
+ EOS
+ end
+
+ odie "No formulae or casks found for #{name}." if !print_formulae && !print_casks
end
end | true |
Other | Homebrew | brew | daa87fa10f1c6fda9c4b48509f72fac19b44f878.json | Add specific examples to install cmd
- provide specific install instructions
when a cask/formula doesn't exist
and we search for similar ones
- print and exit early if a named formula that
was removed recently has the same name
- exit early if the tap is specified because
we don't get good search results | Library/Homebrew/cmd/search.rb | @@ -86,7 +86,8 @@ def search
elsif args.pull_request?
search_pull_requests(query, args)
else
- search_names(query, string_or_regex, args)
+ formulae, casks = search_names(query, string_or_regex)
+ print_results(formulae, casks, query, args)
end
puts "Use `brew desc` to list packages with a short description." if args.verbose?
@@ -128,4 +129,48 @@ def search_pull_requests(query, args)
GitHub.print_pull_requests_matching(query, only)
end
+
+ def print_results(all_formulae, all_casks, query, args)
+ print_formulae = args.formula?
+ print_casks = args.cask?
+ print_formulae = print_casks = true if !print_formulae && !print_casks
+ print_formulae &&= all_formulae.any?
+ print_casks &&= all_casks.any?
+
+ count = 0
+ if all_formulae
+ if $stdout.tty?
+ ohai "Formulae", Formatter.columns(all_formulae)
+ else
+ puts all_formulae
+ end
+ count += all_formulae.count
+ end
+ puts if print_formulae && print_casks
+ if print_casks
+ if $stdout.tty?
+ ohai "Casks", Formatter.columns(all_casks)
+ else
+ puts all_casks
+ end
+ count += all_casks.count
+ end
+
+ print_missing_formula_help(query, count.positive?) if all_casks.exclude?(query)
+
+ odie "No formulae or casks found for #{query.inspect}." if count.zero?
+ end
+
+ def print_missing_formula_help(query, found_matches)
+ return unless $stdout.tty?
+
+ reason = MissingFormula.reason(query, silent: true)
+ return if reason.nil?
+
+ if found_matches
+ puts
+ puts "If you meant #{query.inspect} specifically:"
+ end
+ puts reason
+ end
end | true |
Other | Homebrew | brew | daa87fa10f1c6fda9c4b48509f72fac19b44f878.json | Add specific examples to install cmd
- provide specific install instructions
when a cask/formula doesn't exist
and we search for similar ones
- print and exit early if a named formula that
was removed recently has the same name
- exit early if the tap is specified because
we don't get good search results | Library/Homebrew/search.rb | @@ -115,7 +115,7 @@ def search_casks(_string_or_regex)
[]
end
- def search_names(query, string_or_regex, args)
+ def search_names(query, string_or_regex)
remote_results = search_taps(query, silent: true)
local_formulae = search_formulae(string_or_regex)
@@ -126,48 +126,7 @@ def search_names(query, string_or_regex, args)
remote_casks = remote_results[:casks]
all_casks = local_casks + remote_casks
- print_formulae = args.formula?
- print_casks = args.cask?
- print_formulae = print_casks = true if !print_formulae && !print_casks
- print_formulae &&= all_formulae.any?
- print_casks &&= all_casks.any?
-
- count = 0
- if print_formulae
- if $stdout.tty?
- ohai "Formulae", Formatter.columns(all_formulae)
- else
- puts all_formulae
- end
- count += all_formulae.count
- end
- puts if print_formulae && print_casks
- if print_casks
- if $stdout.tty?
- ohai "Casks", Formatter.columns(all_casks)
- else
- puts all_casks
- end
- count += all_casks.count
- end
-
- print_missing_formula_help(query, count.positive?) if local_casks.exclude?(query)
-
- odie "No formulae or casks found for #{query.inspect}." if count.zero?
- !count.zero?
- end
-
- def print_missing_formula_help(query, found_matches)
- return unless $stdout.tty?
-
- reason = MissingFormula.reason(query, silent: true)
- return if reason.nil?
-
- if found_matches
- puts
- puts "If you meant #{query.inspect} specifically:"
- end
- puts reason
+ [all_formulae, all_casks]
end
end
end | true |
Other | Homebrew | brew | 96a93b342ef15a3f86b0f5680996688bf429ccd9.json | Update RBI files for rspec-mocks.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rspec-mocks@3.12.1.rbi | @@ -752,8 +752,8 @@ class RSpec::Mocks::Matchers::HaveReceived
def exactly(*args); end
def failure_message; end
def failure_message_when_negated; end
+ def matcher_name; end
def matches?(subject, &block); end
- def name; end
def once(*args); end
def ordered(*args); end
def setup_allowance(_subject, &_block); end
@@ -803,8 +803,8 @@ class RSpec::Mocks::Matchers::Receive
def description; end
def does_not_match?(subject, &block); end
def exactly(*args, &block); end
+ def matcher_name; end
def matches?(subject, &block); end
- def name; end
def never(*args, &block); end
def once(*args, &block); end
def ordered(*args, &block); end
@@ -849,8 +849,8 @@ class RSpec::Mocks::Matchers::ReceiveMessageChain
def and_yield(*args, &block); end
def description; end
def does_not_match?(*_args); end
+ def matcher_name; end
def matches?(subject, &block); end
- def name; end
def setup_allowance(subject, &block); end
def setup_any_instance_allowance(subject, &block); end
def setup_any_instance_expectation(subject, &block); end
@@ -871,8 +871,8 @@ class RSpec::Mocks::Matchers::ReceiveMessages
def description; end
def does_not_match?(_subject); end
+ def matcher_name; end
def matches?(subject); end
- def name; end
def setup_allowance(subject); end
def setup_any_instance_allowance(subject); end
def setup_any_instance_expectation(subject); end
@@ -1031,6 +1031,7 @@ class RSpec::Mocks::MethodDouble
def usable_rspec_prepended_module; end
end
+RSpec::Mocks::MethodDouble::FROZEN_ERROR_MSG = T.let(T.unsafe(nil), Regexp)
class RSpec::Mocks::MethodDouble::RSpecPrependedModule < ::Module; end
class RSpec::Mocks::MethodReference | false |
Other | Homebrew | brew | e8e6ee30b48a7f9df0bda5adc959fb0eaaaae13a.json | add initial tests | Library/Homebrew/cask/artifact/abstract_uninstall.rb | @@ -95,7 +95,7 @@ def uninstall_launchctl(*services, command: nil, **_)
# if launchctl item contains a wildcard, find matching process(es)
services.each do |service|
- all_services << service
+ all_services << service unless service.include?("*")
next unless service.include?("*")
all_services += find_launchctl_with_wildcard(service) | true |
Other | Homebrew | brew | e8e6ee30b48a7f9df0bda5adc959fb0eaaaae13a.json | add initial tests | Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb | @@ -61,6 +61,19 @@
end
end
+ context "using launchctl with regex" do
+ let(:cask) { Cask::CaskLoader.load(cask_path("with-#{artifact_dsl_key}-launchctl-wildcard")) }
+ let(:launchctl_list_cmd) { %w[/bin/launchctl list] }
+
+ it "searches running launchctl items" do
+ allow(fake_system_command).to receive(:run)
+ .with("/bin/launchctl", args: ["list"], print_stderr: false, sudo: false)
+ .and_return(instance_double(SystemCommand::Result))
+
+ subject.public_send(:"#{artifact_dsl_key}_phase", command: fake_system_command)
+ end
+ end
+
context "using :pkgutil" do
let(:cask) { Cask::CaskLoader.load(cask_path("with-#{artifact_dsl_key}-pkgutil")) }
@@ -117,9 +130,9 @@
allow(User.current).to receive(:gui?).and_return false
allow(subject).to receive(:running?).with(bundle_id).and_return(true)
- expect {
+ expect do
subject.public_send(:"#{artifact_dsl_key}_phase", command: fake_system_command)
- }.to output(/Not logged into a GUI; skipping quitting application ID 'my.fancy.package.app'\./).to_stderr
+ end.to output(/Not logged into a GUI; skipping quitting application ID 'my.fancy.package.app'\./).to_stderr
end
it "quits a running application" do
@@ -130,9 +143,9 @@
.and_return(instance_double("SystemCommand::Result", success?: true))
expect(subject).to receive(:running?).with(bundle_id).ordered.and_return(false)
- expect {
+ expect do
subject.public_send(:"#{artifact_dsl_key}_phase", command: fake_system_command)
- }.to output(/Application 'my.fancy.package.app' quit successfully\./).to_stdout
+ end.to output(/Application 'my.fancy.package.app' quit successfully\./).to_stdout
end
it "tries to quit the application for 10 seconds" do
@@ -143,9 +156,9 @@
.and_return(instance_double("SystemCommand::Result", success?: false))
time = Benchmark.measure do
- expect {
+ expect do
subject.public_send(:"#{artifact_dsl_key}_phase", command: fake_system_command)
- }.to output(/Application 'my.fancy.package.app' did not quit\./).to_stderr
+ end.to output(/Application 'my.fancy.package.app' did not quit\./).to_stderr
end
expect(time.real).to be_within(3).of(10) | true |
Other | Homebrew | brew | e8e6ee30b48a7f9df0bda5adc959fb0eaaaae13a.json | add initial tests | Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-launchctl-wildcard.rb | @@ -0,0 +1,11 @@
+cask "with-uninstall-launchctl-wildcard" do
+ version "1.2.3"
+ sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
+
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip"
+ homepage "https://brew.sh/fancy"
+
+ app "Fancy.app"
+
+ uninstall launchctl: "my.fancy.package.service.*"
+end | true |
Other | Homebrew | brew | e8e6ee30b48a7f9df0bda5adc959fb0eaaaae13a.json | add initial tests | Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-launchctl-wildcard.rb | @@ -0,0 +1,11 @@
+cask "with-zap-launchctl-wildcard" do
+ version "1.2.3"
+ sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
+
+ url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip"
+ homepage "https://brew.sh/fancy"
+
+ app "Fancy.app"
+
+ zap launchctl: "my.fancy.package.service.*"
+end | true |
Other | Homebrew | brew | a481729ade5f3c2be9980a3b4259bdc61d37e275.json | Show casks in install not found output
- Move `search_names` and `print_missing_formula_help` out of `cmd/search.rb` to `search.rb`
- Change to using those functions in `cmd/install.rb` when a formula or cask doesn't exist | Library/Homebrew/cmd/install.rb | @@ -278,48 +278,26 @@ def install
# formula was found, but there's a problem with its implementation).
$stderr.puts e.backtrace if Homebrew::EnvConfig.developer?
ofail e.message
- rescue FormulaOrCaskUnavailableError => e
- if e.name == "updog"
+ rescue FormulaOrCaskUnavailableError, Cask::CaskUnavailableError => e
+ # formula name or cask token
+ name = e.try(:name) || e.token
+
+ if name == "updog"
ofail "What's updog?"
return
end
opoo e
- ohai "Searching for similarly named formulae..."
- formulae_search_results = search_formulae(e.name)
- case formulae_search_results.length
- when 0
- ofail "No similarly named formulae found."
- when 1
- puts "This similarly named formula was found:"
- puts formulae_search_results
- puts "To install it, run:\n brew install #{formulae_search_results.first}"
- else
- puts "These similarly named formulae were found:"
- puts Formatter.columns(formulae_search_results)
- puts "To install one of them, run (for example):\n brew install #{formulae_search_results.first}"
- end
+ ohai "Searching for similarly named formulae and casks..."
- if (reason = MissingFormula.reason(e.name))
- $stderr.puts reason
- return
- end
+ # Don't treat formula/cask name as a regex
+ query = string_or_regex = name
+ if search_names(query, string_or_regex, args)
+ puts <<~EOL
- # Do not search taps if the formula name is qualified
- return if e.name.include?("/")
-
- taps_search_results = search_taps(e.name)[:formulae]
- case taps_search_results.length
- when 0
- ofail "No formulae found in taps."
- when 1
- puts "This formula was found in a tap:"
- puts taps_search_results
- puts "To install it, run:\n brew install #{taps_search_results.first}"
- else
- puts "These formulae were found in taps:"
- puts Formatter.columns(taps_search_results)
- puts "To install one of them, run (for example):\n brew install #{taps_search_results.first}"
+ To install one of them, run:
+ brew install 'package_name'
+ EOL
end
end
end | true |
Other | Homebrew | brew | a481729ade5f3c2be9980a3b4259bdc61d37e275.json | Show casks in install not found output
- Move `search_names` and `print_missing_formula_help` out of `cmd/search.rb` to `search.rb`
- Change to using those functions in `cmd/install.rb` when a formula or cask doesn't exist | Library/Homebrew/cmd/search.rb | @@ -128,57 +128,4 @@ def search_pull_requests(query, args)
GitHub.print_pull_requests_matching(query, only)
end
-
- def search_names(query, string_or_regex, args)
- remote_results = search_taps(query, silent: true)
-
- local_formulae = search_formulae(string_or_regex)
- remote_formulae = remote_results[:formulae]
- all_formulae = local_formulae + remote_formulae
-
- local_casks = search_casks(string_or_regex)
- remote_casks = remote_results[:casks]
- all_casks = local_casks + remote_casks
-
- print_formulae = args.formula?
- print_casks = args.cask?
- print_formulae = print_casks = true if !print_formulae && !print_casks
- print_formulae &&= all_formulae.any?
- print_casks &&= all_casks.any?
-
- if print_formulae
- if $stdout.tty?
- ohai "Formulae", Formatter.columns(all_formulae)
- else
- puts all_formulae
- end
- end
- puts if print_formulae && print_casks
- if print_casks
- if $stdout.tty?
- ohai "Casks", Formatter.columns(all_casks)
- else
- puts all_casks
- end
- end
-
- count = all_formulae.count + all_casks.count
-
- print_missing_formula_help(query, count.positive?) if local_casks.exclude?(query)
-
- odie "No formulae or casks found for #{query.inspect}." if count.zero?
- end
-
- def print_missing_formula_help(query, found_matches)
- return unless $stdout.tty?
-
- reason = MissingFormula.reason(query, silent: true)
- return if reason.nil?
-
- if found_matches
- puts
- puts "If you meant #{query.inspect} specifically:"
- end
- puts reason
- end
end | true |
Other | Homebrew | brew | a481729ade5f3c2be9980a3b4259bdc61d37e275.json | Show casks in install not found output
- Move `search_names` and `print_missing_formula_help` out of `cmd/search.rb` to `search.rb`
- Change to using those functions in `cmd/install.rb` when a formula or cask doesn't exist | Library/Homebrew/search.rb | @@ -114,6 +114,61 @@ def search_formulae(string_or_regex)
def search_casks(_string_or_regex)
[]
end
+
+ def search_names(query, string_or_regex, args)
+ remote_results = search_taps(query, silent: true)
+
+ local_formulae = search_formulae(string_or_regex)
+ remote_formulae = remote_results[:formulae]
+ all_formulae = local_formulae + remote_formulae
+
+ local_casks = search_casks(string_or_regex)
+ remote_casks = remote_results[:casks]
+ all_casks = local_casks + remote_casks
+
+ print_formulae = args.formula?
+ print_casks = args.cask?
+ print_formulae = print_casks = true if !print_formulae && !print_casks
+ print_formulae &&= all_formulae.any?
+ print_casks &&= all_casks.any?
+
+ count = 0
+ if print_formulae
+ if $stdout.tty?
+ ohai "Formulae", Formatter.columns(all_formulae)
+ else
+ puts all_formulae
+ end
+ count += all_formulae.count
+ end
+ puts if print_formulae && print_casks
+ if print_casks
+ if $stdout.tty?
+ ohai "Casks", Formatter.columns(all_casks)
+ else
+ puts all_casks
+ end
+ count += all_casks.count
+ end
+
+ print_missing_formula_help(query, count.positive?) if local_casks.exclude?(query)
+
+ odie "No formulae or casks found for #{query.inspect}." if count.zero?
+ !count.zero?
+ end
+
+ def print_missing_formula_help(query, found_matches)
+ return unless $stdout.tty?
+
+ reason = MissingFormula.reason(query, silent: true)
+ return if reason.nil?
+
+ if found_matches
+ puts
+ puts "If you meant #{query.inspect} specifically:"
+ end
+ puts reason
+ end
end
end
| true |
Other | Homebrew | brew | 07ff122c8d131ba56a677ecddb121ef4eeec75c6.json | Ignore os cop in tap Formula/Cask folders | Library/.rubocop.yml | @@ -55,16 +55,14 @@ FormulaAudit:
FormulaAuditStrict:
Enabled: true
-Homebrew/MoveToExtendOS:
- Exclude:
- - "Homebrew/{extend,test,requirements}/**/*"
- - "Taps/**/*"
- - "Homebrew/os.rb"
-
# enable all Homebrew custom cops
Homebrew:
Enabled: true
+# only used internally
+Homebrew/MoveToExtendOS:
+ Enabled: false
+
# makes DSL usage ugly.
Layout/SpaceBeforeBrackets:
Exclude: | true |
Other | Homebrew | brew | 07ff122c8d131ba56a677ecddb121ef4eeec75c6.json | Ignore os cop in tap Formula/Cask folders | Library/Homebrew/.rubocop.yml | @@ -2,6 +2,12 @@ inherit_from:
- ../.rubocop_rspec.yml
- .rubocop_todo.yml
+Homebrew/MoveToExtendOS:
+ Enabled: true
+ Exclude:
+ - "{extend,test,requirements}/**/*"
+ - "os.rb"
+
# make rspec formatting more flexible
Layout/MultilineMethodCallIndentation:
Exclude: | true |
Other | Homebrew | brew | f623a44061fbce885ab290eb37631fcf73a8ee93.json | Update RBI files for json_schemer.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/json_schemer@0.2.24.rbi | @@ -82,6 +82,7 @@ class JSONSchemer::Schema::Base
def child(schema); end
def custom_format?(format); end
def error(instance, type, details = T.unsafe(nil)); end
+ def escape_json_pointer_token(token); end
def format?; end
def formats; end
def id_keyword; end
@@ -141,6 +142,8 @@ class JSONSchemer::Schema::Base::Instance < ::Struct
end
end
+JSONSchemer::Schema::Base::JSON_POINTER_TOKEN_ESCAPE_CHARS = T.let(T.unsafe(nil), Hash)
+JSONSchemer::Schema::Base::JSON_POINTER_TOKEN_ESCAPE_REGEXP = T.let(T.unsafe(nil), Regexp)
JSONSchemer::Schema::Base::NET_HTTP_REF_RESOLVER = T.let(T.unsafe(nil), Proc)
JSONSchemer::Schema::Base::RUBY_REGEX_ANCHORS_TO_ECMA_262 = T.let(T.unsafe(nil), Hash)
| false |
Other | Homebrew | brew | 5c7d53476eed5ad93287292e3b7c588d21dbb31d.json | formula: add support for generating click shell completions | Library/Homebrew/formula.rb | @@ -1689,7 +1689,7 @@ def extract_macho_slice_from(file, arch = Hardware::CPU.arch)
# @param base_name [String] the base name of the generated completion script. Defaults to the formula name.
# @param shells [Array<Symbol>] the shells to generate completion scripts for. Defaults to `[:bash, :zsh, :fish]`.
# @param shell_parameter_format [String, Symbol] specify how `shells` should each be passed
- # to the `executable`. Takes either a String representing a prefix, or one of [:flag, :arg, :none].
+ # to the `executable`. Takes either a String representing a prefix, or one of [:flag, :arg, :none, :click].
# Defaults to plainly passing the shell.
#
# @example Using default values for optional arguments
@@ -1729,6 +1729,13 @@ def extract_macho_slice_from(file, arch = Hardware::CPU.arch)
#
# (bash_completion/"foo").write Utils.safe_popen_read({ "SHELL" => "bash" }, bin/"foo", "completions")
#
+ # @example Using predefined shell_parameter_format :click
+ # generate_completions_from_executable(bin/"foo", shell_parameter_format: :click, shells: [:zsh])
+ # translates to
+ #
+ # (zsh_completion/"_foo").write Utils.safe_popen_read({ "SHELL" => "zsh", "_FOO_COMPLETE" => "zsh_source" },
+ # bin/"foo")
+ #
# @example Using custom shell_parameter_format
# generate_completions_from_executable(bin/"foo", "completions", shell_parameter_format: "--selected-shell=",
# shells: [:bash])
@@ -1751,6 +1758,7 @@ def generate_completions_from_executable(*commands,
}
shells.each do |shell|
+ popen_read_env = { "SHELL" => shell.to_s }
script_path = completion_script_path_map[shell]
shell_parameter = if shell_parameter_format.nil?
shell.to_s
@@ -1760,6 +1768,10 @@ def generate_completions_from_executable(*commands,
"--shell=#{shell}"
elsif shell_parameter_format == :none
nil
+ elsif shell_parameter_format == :click
+ prog_name = File.basename(commands.first.to_s).upcase.tr("-", "_")
+ popen_read_env["_#{prog_name}_COMPLETE"] = "#{shell}_source"
+ nil
else
"#{shell_parameter_format}#{shell}"
end
@@ -1770,7 +1782,7 @@ def generate_completions_from_executable(*commands,
popen_read_args.flatten!
script_path.dirname.mkpath
- script_path.write Utils.safe_popen_read({ "SHELL" => shell.to_s }, *popen_read_args)
+ script_path.write Utils.safe_popen_read(popen_read_env, *popen_read_args)
end
end
| false |
Other | Homebrew | brew | 04f61a940e34f01f9aecaec55092ed2f9827afa9.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -4595,6 +4595,18 @@ class Homebrew::FormulaCreator
extend ::T::Private::Methods::SingletonMethodHooks
end
+class Homebrew::Livecheck::Strategy::ExtractPlist::Item
+ def short_version(*args, &block); end
+
+ def version(*args, &block); end
+end
+
+class Homebrew::Livecheck::Strategy::ExtractPlist::Item
+ def self.[](*arg); end
+
+ def self.members(); end
+end
+
class Homebrew::Livecheck::Strategy::Sparkle::Item
def nice_version(*args, &block); end
@@ -4637,6 +4649,7 @@ module Homebrew
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
extend ::FileUtils::StreamUtils_
+ extend ::Homebrew::Search::Extension
end
module HostEnvironmentSimulatorHelper
@@ -5450,10 +5463,12 @@ class Object
ARGF = ::T.let(nil, ::T.untyped)
ARGV = ::T.let(nil, ::T.untyped)
BUG_REPORTS_URL = ::T.let(nil, ::T.untyped)
+ COMMAND_DESC_WIDTH = ::T.let(nil, ::T.untyped)
CROSS_COMPILING = ::T.let(nil, ::T.untyped)
DEPRECATED_OFFICIAL_TAPS = ::T.let(nil, ::T.untyped)
ENV = ::T.let(nil, ::T.untyped)
FORMULA_COMPONENT_PRECEDENCE_LIST = ::T.let(nil, ::T.untyped)
+ HIDDEN_DESC_PLACEHOLDER = ::T.let(nil, ::T.untyped)
HOMEBREW_BOTTLES_EXTNAME_REGEX = ::T.let(nil, ::T.untyped)
HOMEBREW_BOTTLE_DEFAULT_DOMAIN = ::T.let(nil, ::T.untyped)
HOMEBREW_BREWED_CURL_PATH = ::T.let(nil, ::T.untyped)
@@ -5506,6 +5521,8 @@ class Object
LINUXBREW_CORE_MIGRATION_LIST = ::T.let(nil, ::T.untyped)
OFFICIAL_CASK_TAPS = ::T.let(nil, ::T.untyped)
OFFICIAL_CMD_TAPS = ::T.let(nil, ::T.untyped)
+ OPTION_DESC_WIDTH = ::T.let(nil, ::T.untyped)
+ ORIGINAL_PATHS = ::T.let(nil, ::T.untyped)
OS_VERSION = ::T.let(nil, ::T.untyped)
PATCH_A_CONTENTS = ::T.let(nil, ::T.untyped)
PATCH_A_SHA256 = ::T.let(nil, ::T.untyped)
@@ -5528,13 +5545,17 @@ class Object
RUBY_RELEASE_DATE = ::T.let(nil, ::T.untyped)
RUBY_REVISION = ::T.let(nil, ::T.untyped)
RUBY_VERSION = ::T.let(nil, ::T.untyped)
+ SOURCE_PATH = ::T.let(nil, ::T.untyped)
STDERR = ::T.let(nil, ::T.untyped)
STDIN = ::T.let(nil, ::T.untyped)
STDOUT = ::T.let(nil, ::T.untyped)
+ TARGET_DOC_PATH = ::T.let(nil, ::T.untyped)
+ TARGET_MAN_PATH = ::T.let(nil, ::T.untyped)
TESTBALL_PATCHES_SHA256 = ::T.let(nil, ::T.untyped)
TESTBALL_PATCHES_URL = ::T.let(nil, ::T.untyped)
TESTBALL_SHA256 = ::T.let(nil, ::T.untyped)
TESTBALL_URL = ::T.let(nil, ::T.untyped)
+ TEST_DIRECTORIES = ::T.let(nil, ::T.untyped)
TEST_FIXTURE_DIR = ::T.let(nil, ::T.untyped)
TEST_SHA1 = ::T.let(nil, ::T.untyped)
TEST_SHA256 = ::T.let(nil, ::T.untyped)
@@ -6010,6 +6031,22 @@ class RSpec::Expectations::MultipleExpectationsNotMetError
include ::RSpec::Core::MultipleExceptionError::InterfaceTag
end
+module RSpec::Matchers
+ def a_json_string(*expected, &block_arg); end
+
+ def a_string_containing(*args, &block); end
+
+ def array_including_cons(*expected, &block_arg); end
+
+ def be_a_failure(*args, &block); end
+
+ def have_failed(*args, &block); end
+
+ def not_raise_error(*args, &block); end
+
+ def not_to_output(*args, &block); end
+end
+
module Racc
Racc_No_Extensions = ::T.let(nil, ::T.untyped)
end
@@ -6044,6 +6081,10 @@ module Readline
def self.completion_quote_character(); end
end
+class ReporterHub
+ def empty?(*args, &block); end
+end
+
class Requirements
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks | false |
Other | Homebrew | brew | 43070d73a1913691e401cece5d604b2fbc037c45.json | Maintainers docs: adjust line breaks | docs/Homebrew-brew-Maintainer-Guide.md | @@ -1,7 +1,6 @@
# Homebrew/brew Maintainer Guide
-This document describes a few components of the `Homebrew/brew` repository that are useful for maintainers to
-be aware of, but don't necessarily need to appear in documentation for most users and contributors.
+This document describes a few components of the `Homebrew/brew` repository that are useful for maintainers to be aware of, but don't necessarily need to appear in documentation for most users and contributors.
## Reviewing PRs
@@ -10,110 +9,63 @@ Using `gh pr checkout NUMBER` is a super easy way to check out a PR branch using
When reviewing a PR, use "comment", "approve", or "request changes" when submitting based on the following guidelines:
- Comment: if the PR isn't quite ready to be merged
-- Approve: if you feel that the PR is in a good state to be merged, even if there are
- non-blocking changes you'd like to be made
-- Request changes: if you feel strongly that the PR is likely to cause a problem for users or
- have another reason to oppose the PR.
+- Approve: if you feel that the PR is in a good state to be merged, even if there are non-blocking changes you'd like to be made
+- Request changes: if you feel strongly that the PR is likely to cause a problem for users or have another reason to oppose the PR.
## Merging PRs
-Merging is done using the standard Merge button in the `Homebrew/brew` repository to preserve
-history and GPG commit signing. The Squash and Merge and Rebase and Merge buttons are disabled.
+Merging is done using the standard Merge button in the `Homebrew/brew` repository to preserve history and GPG commit signing. The Squash and Merge and Rebase and Merge buttons are disabled.
PRs must meet the following conditions to be merged:
-- Have at least one maintainer (or [@BrewTestBot](https://github.com/BrewTestBot)) approval.
- See the ["Automatic approvals" section below](#automatic-approvals).
- for more details about how [@BrewTestBot](https://github.com/BrewTestBot) approves PRs.
-- Have passing CI. This is a _mandatory_ step. PRs with failing CI should _never_ be merged.
- See the ["CI" section below](#ci) for more information about `Homebrew/brew` CI.
+- Have at least one maintainer (or [@BrewTestBot](https://github.com/BrewTestBot)) approval. See the ["Automatic approvals" section below](#automatic-approvals). for more details about how [@BrewTestBot](https://github.com/BrewTestBot) approves PRs.
+- Have passing CI. This is a _mandatory_ step. PRs with failing CI should _never_ be merged. See the ["CI" section below](#ci) for more information about `Homebrew/brew` CI.
-If possible, PRs should also have GPG-signed commits (see the private `ops` repository for
-instructions on setting this up).
+If possible, PRs should also have GPG-signed commits (see the private `ops` repository for instructions on setting this up).
## Automatic approvals
-To ensure that non-urgent PRs have the opportunity to be seen and reviewed by any other maintainers who wish
-to take a look, all PRs require an approval before they can be merged. However, not every PR is
-reviewed by another maintainer, and some PRs are urgent enough that they need to be merged without
-an approval by another maintainer.
+To ensure that non-urgent PRs have the opportunity to be seen and reviewed by any other maintainers who wish to take a look, all PRs require an approval before they can be merged. However, not every PR is reviewed by another maintainer, and some PRs are urgent enough that they need to be merged without an approval by another maintainer.
-As a compromise between always needing a review and allowing maintainers to merge PRs they deem ready,
-the `Triage` CI job will ensure that PRs cannot be merged until they've been open for 24 hours
-(only counting hours that occur Monday to Friday). After the triage period has expired, the
-CI job will show up as "passed" and [@BrewTestBot](https://github.com/BrewTestBot) will approve the PR,
-allowing it to be merged. This gives all maintainers a reasonable opportunity to review every PR,
-but won't block any PR for lack of reviews.
+As a compromise between always needing a review and allowing maintainers to merge PRs they deem ready, the `Triage` CI job will ensure that PRs cannot be merged until they've been open for 24 hours (only counting hours that occur Monday to Friday). After the triage period has expired, the CI job will show up as "passed" and [@BrewTestBot](https://github.com/BrewTestBot) will approve the PR, allowing it to be merged. This gives all maintainers a reasonable opportunity to review every PR, but won't block any PR for lack of reviews.
-If the PR is urgent enough that it is necessary to bypass that 24 hour window, the `critical` label
-should be applied to the PR. When this label is applied, the `Triage` CI job will immediately be
-successful and [@BrewTestBot](https://github.com/BrewTestBot) will approve the PR.
+If the PR is urgent enough that it is necessary to bypass that 24 hour window, the `critical` label should be applied to the PR. When this label is applied, the `Triage` CI job will immediately be successful and [@BrewTestBot](https://github.com/BrewTestBot) will approve the PR.
## CI
-Every PR in `Homebrew/brew` runs a series of CI tests to try to prevent bugs from being introduced.
-**A PR _must_ have passing CI before it can be merged**.
+Every PR in `Homebrew/brew` runs a series of CI tests to try to prevent bugs from being introduced. **A PR _must_ have passing CI before it can be merged**.
There are many checks that run on every PR. The following is a quick list of the various checks and what they represent:
-- `Vendor Gems / vendor-gems`: This is skipped except for dependabot PRs. It updates the RBI files to match
- any new/changed dependencies. See [Type Checking With Sorbet](Typechecking.md) for more information about RBI files
- and typechecking.
-- `Triage / review`: This verifies that the PR has been open for long enough.
- See the ["Automatic approvals" section above](#automatic-approvals) for more information about automatic approvals.
-- `codecov/patch` and `codecov/project`: These show the Codecov report for the PR.
- See the ["`brew tests` and Codecov" section below](#brew-tests-and-codecov) for more info about Codecov.
-- `CI / vendored gems (Linux)`: This checks whether there was a change to the vendored gems on Linux that needs to be
- committed to the PR branch.
+- `Vendor Gems / vendor-gems`: This is skipped except for dependabot PRs. It updates the RBI files to match any new/changed dependencies. See [Type Checking With Sorbet](Typechecking.md) for more information about RBI files and typechecking.
+- `Triage / review`: This verifies that the PR has been open for long enough. See the ["Automatic approvals" section above](#automatic-approvals) for more information about automatic approvals.
+- `codecov/patch` and `codecov/project`: These show the Codecov report for the PR. See the ["`brew tests` and Codecov" section below](#brew-tests-and-codecov) for more info about Codecov.
+- `CI / vendored gems (Linux)`: This checks whether there was a change to the vendored gems on Linux that needs to be committed to the PR branch.
- `CI / test default formula (Linux)`: This runs `brew test-bot` on Linux to ensure it still works as expected.
-- `CI / syntax`: This is run first to check whether the PR passes `brew style` and `brew typecheck`. If this job fails the
- following jobs will not run.
-- `CI / tap syntax (Linux)`: This runs `brew style` and `brew audit` on all official taps
- (note that although this has Linux in its name, it does check `Homebrew/homebrew-core` and all cask repos).
+- `CI / syntax`: This is run first to check whether the PR passes `brew style` and `brew typecheck`. If this job fails the following jobs will not run.
+- `CI / tap syntax (Linux)`: This runs `brew style` and `brew audit` on all official taps (note that although this has Linux in its name, it does check `Homebrew/homebrew-core` and all cask repos).
- `CI / docker`: This builds and deploys a new Homebrew Docker image.
-- `CI / test everything (macOS)`: This runs several checks on macOS including `brew tests`, `brew update-tests`,
- `brew test-bot --only-formulae --test-default-formula`, `brew readall` and `brew doctor`.
-- `CI / tests (no-compatibility mode)`, `CI / tests (generic OS)` and `CI / tests (Linux)`: These run
- `brew tests` with various options on Linux.
+- `CI / test everything (macOS)`: This runs several checks on macOS including `brew tests`, `brew update-tests`, `brew test-bot --only-formulae --test-default-formula`, `brew readall` and `brew doctor`.
+- `CI / tests (no-compatibility mode)`, `CI / tests (generic OS)` and `CI / tests (Linux)`: These run `brew tests` with various options on Linux.
_Note that this list is non-exhaustive and can change over time._
### `brew tests` and Codecov
-A coverage report is generated by Codecov for every PR, and its results are shown as CI jobs.
-These reports are publicly viewable on [Homebrew/brew's Codecov page](https://app.codecov.io/gh/Homebrew/brew).
-Additionally, annotations will appear in the PR's "Files changed" tab where lines of code have been
-added that aren't being hit by `brew tests`. If the Codecov job fails, that's a sign that some
-more tests should be added to test the functionality being added in the PR.
+A coverage report is generated by Codecov for every PR, and its results are shown as CI jobs. These reports are publicly viewable on [Homebrew/brew's Codecov page](https://app.codecov.io/gh/Homebrew/brew). Additionally, annotations will appear in the PR's "Files changed" tab where lines of code have been added that aren't being hit by `brew tests`. If the Codecov job fails, that's a sign that some more tests should be added to test the functionality being added in the PR.
-Codecov should be used as a guide to indicate when more tests are probably needed, but it's unrealistic for
-every line of code to have a test associated with it, especially when testing would require a slow
-integration test. For this reason, it's okay to merge PRs that fail the Codecov check if necessary,
-but this should be avoided if possible.
+Codecov should be used as a guide to indicate when more tests are probably needed, but it's unrealistic for every line of code to have a test associated with it, especially when testing would require a slow integration test. For this reason, it's okay to merge PRs that fail the Codecov check if necessary, but this should be avoided if possible.
### `brew tests` and BuildPulse
-BuildPulse monitors CI jobs for every push to `Homebrew/brew` to detect flaky tests and track them over time. The
-reports are available to Homebrew maintainers on [buildpulse.io](https://buildpulse.io/installations) and daily
-summaries are published to [`#buildpulse-health`](https://machomebrew.slack.com/archives/C0268BSJBJ8) in Slack.
+BuildPulse monitors CI jobs for every push to `Homebrew/brew` to detect flaky tests and track them over time. The reports are available to Homebrew maintainers on [buildpulse.io](https://buildpulse.io/installations) and daily summaries are published to [`#buildpulse-health`](https://machomebrew.slack.com/archives/C0268BSJBJ8) in Slack.
-BuildPulse can be used as a guide to identify which flaky tests are causing the most disruption to the CI suite. To make
-the biggest improvements to the reliability of the build, we can focus on the most disruptive flaky tests first (i.e.
-the tests causing the most intermittent failures).
+BuildPulse can be used as a guide to identify which flaky tests are causing the most disruption to the CI suite. To make the biggest improvements to the reliability of the build, we can focus on the most disruptive flaky tests first (i.e. the tests causing the most intermittent failures).
-To help find the root cause for a particular flaky test, buildpulse.io provides links to the most recent CI job and
-commit where the test failed and then passed with no change to the underlying code. You may want to check out the code
-at that commit to attempt to reproduce the failure locally. You can also see the list of recent failures on
-[buildpulse.io](https://buildpulse.io) to determine if the test always fails the same way.
+To help find the root cause for a particular flaky test, buildpulse.io provides links to the most recent CI job and commit where the test failed and then passed with no change to the underlying code. You may want to check out the code at that commit to attempt to reproduce the failure locally. You can also see the list of recent failures on [buildpulse.io](https://buildpulse.io) to determine if the test always fails the same way.
## Manpages and shell completions
-Homebrew's manpages and shell completions are generated automatically by the `brew generate-man-completions` command.
-Contributors are welcome to run this command and commit the changes in a PR, but they don't have to. If they don't,
-a follow-up PR to make the necessary changes will be opened automatically by [@BrewTestBot](https://github.com/BrewTestBot)
-once the original PR is merged. These follow-up PRs can be merged immediately if the changes seem correct.
+Homebrew's manpages and shell completions are generated automatically by the `brew generate-man-completions` command. Contributors are welcome to run this command and commit the changes in a PR, but they don't have to. If they don't, a follow-up PR to make the necessary changes will be opened automatically by [@BrewTestBot](https://github.com/BrewTestBot) once the original PR is merged. These follow-up PRs can be merged immediately if the changes seem correct.
-An update can be requested manually by triggering the workflow from the
-[Update maintainers, manpage and completions](https://github.com/Homebrew/brew/actions/workflows/update-man-completions.yml)
-section under the "Actions" tab. Click on the "Run workflow" dropdown and then the "Run workflow" button.
-A PR will be opened shortly if there are any changes.
+An update can be requested manually by triggering the workflow from the [Update maintainers, manpage and completions](https://github.com/Homebrew/brew/actions/workflows/update-man-completions.yml) section under the "Actions" tab. Click on the "Run workflow" dropdown and then the "Run workflow" button. A PR will be opened shortly if there are any changes. | true |
Other | Homebrew | brew | 43070d73a1913691e401cece5d604b2fbc037c45.json | Maintainers docs: adjust line breaks | docs/Homebrew-homebrew-cask-Maintainer-Guide.md | @@ -1,50 +1,36 @@
# Homebrew/homebrew-cask Maintainer Guide
-This guide is intended to help maintainers effectively maintain the cask repositories.
-It is meant to be used in conjunction with the more generic [Maintainer Guidelines](Maintainer-Guidelines.md).
+This guide is intended to help maintainers effectively maintain the cask repositories. It is meant to be used in conjunction with the more generic [Maintainer Guidelines](Maintainer-Guidelines.md).
This guide applies to all four of the cask repositories:
- [Homebrew/homebrew-cask](https://github.com/Homebrew/homebrew-cask): The main cask repository
- [Homebrew/homebrew-cask-drivers](https://github.com/Homebrew/homebrew-cask-drivers): Casks of drivers
- [Homebrew/homebrew-cask-fonts](https://github.com/Homebrew/homebrew-cask-fonts): Casks of fonts
-- [Homebrew/homebrew-cask-versions](https://github.com/Homebrew/homebrew-cask-versions): Alternate versions of Casks
+- [Homebrew/homebrew-cask-versions](https://github.com/Homebrew/homebrew-cask-versions): Alternate versions of casks
## Common Situations
Here is a list of the most common situations that arise in cask PRs and how to handle them:
- The `version` and `sha256` both change (keeping the same format): Merge.
-- Only the `sha256` changes: Merge unless the version needs to be updated as well.
- It’s not uncommon for upstream vendors to update versions in-place.
- However, be wary for times when e.g. upstream could have been hacked.
-- `livecheck` is updated: Use your best judgement and try to make sure that the changes
- follow the [`livecheck` guidelines](Brew-Livecheck.md).
-- Only the `version` changes or the `version` format changes: Use your best judgement and
- merge if it seems correct (this is relatively rare).
+- Only the `sha256` changes: Merge unless the version needs to be updated as well. It’s not uncommon for upstream vendors to update versions in-place. However, be wary for times when e.g. upstream could have been hacked.
+- `livecheck` is updated: Use your best judgement and try to make sure that the changes follow the [`livecheck` guidelines](Brew-Livecheck.md).
+- Only the `version` changes or the `version` format changes: Use your best judgement and merge if it seems correct (this is relatively rare).
- Other changes (including adding new casks): Use the [Cask Cookbook](Cask-Cookbook.md) to determine what's correct.
If in doubt, ask another cask maintainer on GitHub or Slack.
-Note that unlike formulae, casks do not consider the `sha256` stanza to be a meaningful security measure
-as maintainers cannot realistically check them for authenticity. Casks download from upstream; if a malicious
-actor compromised a URL, they could potentially compromise a version and make it look like an update.
+Note that unlike formulae, casks do not consider the `sha256` stanza to be a meaningful security measure as maintainers cannot realistically check them for authenticity. Casks download from upstream; if a malicious actor compromised a URL, they could potentially compromise a version and make it look like an update.
## Merging
-In general, using GitHub's Squash and Merge button is the best way to merge a PR. This can be used when
-the PR modifies only one cask, regardless of the number of commits or whether the commit message
-format is correct. When merging using this method, the commit message can be modified if needed.
-Usually, version bump commit messages follow the form `Update CASK from OLD_VERSION to NEW_VERSION`.
+In general, using GitHub's Squash and Merge button is the best way to merge a PR. This can be used when the PR modifies only one cask, regardless of the number of commits or whether the commit message format is correct. When merging using this method, the commit message can be modified if needed. Usually, version bump commit messages follow the form `Update CASK from OLD_VERSION to NEW_VERSION`.
-If the PR modifies multiple casks, use the Rebase and Merge button to merge the PR. This will use the
-commit messages from the PR, so make sure that they are appropriate before merging. If needed,
-checkout the PR, squash/reword the commits and force-push back to the PR branch to ensure the proper commit format.
+If the PR modifies multiple casks, use the Rebase and Merge button to merge the PR. This will use the commit messages from the PR, so make sure that they are appropriate before merging. If needed, checkout the PR, squash/reword the commits and force-push back to the PR branch to ensure the proper commit format.
Finally, make sure to thank the contributor for submitting a PR!
## Other Tips
-A maintainer can easily rebase a PR onto the latest `master` branch by adding a `/rebase` comment.
-`BrewTestBot` will automatically rebase the PR and add a reaction to
-the comment once the rebase is in progress and complete.
+A maintainer can easily rebase a PR onto the latest `master` branch by adding a `/rebase` comment. `BrewTestBot` will automatically rebase the PR and add a reaction to the comment once the rebase is in progress and complete. | true |
Other | Homebrew | brew | 43070d73a1913691e401cece5d604b2fbc037c45.json | Maintainers docs: adjust line breaks | docs/Homebrew-homebrew-core-Maintainer-Guide.md | @@ -7,50 +7,33 @@ A detailed checklist can be found [below](#detailed-merge-checklist). This is al
- Ensure the name seems reasonable.
- Add aliases.
- Ensure it uses `keg_only :provided_by_macos` if it already comes with macOS.
-- Ensure it is not a library that can be installed with
- [gem](https://en.wikipedia.org/wiki/RubyGems),
- [cpan](https://en.wikipedia.org/wiki/Cpan) or
- [pip](https://pip.pypa.io/en/stable/).
-- Ensure that any dependencies are accurate and minimal. We don't need to
- support every possible optional feature for the software.
+- Ensure it is not a library that can be installed with [gem](https://en.wikipedia.org/wiki/RubyGems), [cpan](https://en.wikipedia.org/wiki/Cpan) or [pip](https://pip.pypa.io/en/stable/).
+- Ensure that any dependencies are accurate and minimal. We don't need to support every possible optional feature for the software.
- When bottles aren't required or affected, use the GitHub squash & merge workflow for a single-formula PR or rebase & merge workflow for a multiple-formulae PR. See the ["How to merge without bottles" section below](#how-to-merge-without-bottles) for more details.
- Use `brew pr-publish` or `brew pr-pull` otherwise, which adds messages to auto-close pull requests and pull bottles built by the Brew Test Bot.
- Thank people for contributing.
-Checking dependencies is important, because they will probably stick around
-forever. Nobody really checks if they are necessary or not.
+Checking dependencies is important, because they will probably stick around forever. Nobody really checks if they are necessary or not.
-Depend on as little stuff as possible. Disable X11 functionality if possible.
-For example, we build Wireshark, but not the heavy GUI.
+Depend on as little stuff as possible. Disable X11 functionality if possible. For example, we build Wireshark, but not the heavy GUI.
-Homebrew is about Unix software. Stuff that builds to an `.app` should
-be in Homebrew Cask instead.
+Homebrew is about Unix software. Stuff that builds to an `.app` should be in Homebrew Cask instead.
## Merging, rebasing, cherry-picking
-For most PRs that make formula modifications, you can simply approve the PR and an automatic
-merge (with bottles) will be performed by [@BrewTestBot](https://github.com/BrewTestBot).
-See [Brew Test Bot For Core Contributors](Brew-Test-Bot-For-Core-Contributors.md) for more information.
+For most PRs that make formula modifications, you can simply approve the PR and an automatic merge (with bottles) will be performed by [@BrewTestBot](https://github.com/BrewTestBot). See [Brew Test Bot For Core Contributors](Brew-Test-Bot-For-Core-Contributors.md) for more information.
-Certain PRs may not be merged automatically by [@BrewTestBot](https://github.com/BrewTestBot),
-even after they've been approved. This includes PRs with the `new formula`, `automerge-skip`,
-and `linux-only` labels. To trigger a merge for these PRs, run `brew pr-publish`.
+Certain PRs may not be merged automatically by [@BrewTestBot](https://github.com/BrewTestBot), even after they've been approved. This includes PRs with the `new formula`, `automerge-skip`, and `linux-only` labels. To trigger a merge for these PRs, run `brew pr-publish`.
-PRs modifying formulae that don't need bottles or making changes that don't
-require new bottles to be pulled should use GitHub's squash & merge or rebase & merge workflows.
-See the [table below](#how-to-merge-without-bottles) for more details.
+PRs modifying formulae that don't need bottles or making changes that don't require new bottles to be pulled should use GitHub's squash & merge or rebase & merge workflows. See the [table below](#how-to-merge-without-bottles) for more details.
Otherwise, you should use `brew pr-pull` (or `rebase`/`cherry-pick` contributions).
-Don’t `rebase` until you finally `push`. Once `master` is pushed, you can’t
-`rebase`: **you’re a maintainer now!**
+Don’t `rebase` until you finally `push`. Once `master` is pushed, you can’t `rebase`: **you’re a maintainer now!**
Cherry-picking changes the date of the commit, which kind of sucks.
-Don’t `merge` unclean branches. So if someone is still learning `git` and
-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.
+Don’t `merge` unclean branches. So if someone is still learning `git` and 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:
@@ -69,45 +52,25 @@ Here are guidelines about when to use squash & merge versus rebase & merge. Thes
## Naming
-The name is the strictest item, because avoiding a later name change is
-desirable.
+The name is the strictest item, because avoiding a later name change is desirable.
-Choose a name that’s the most common name for the project.
-For example, we initially chose `objective-caml` but we should have chosen `ocaml`.
-Choose what people say to each other when talking about the project.
+Choose a name that’s the most common name for the project. For example, we initially chose `objective-caml` but we should have chosen `ocaml`. Choose what people say to each other when talking about the project.
-Formulae that are also packaged by other package managers (e.g. Debian, Ubuntu) should be
-named consistently (subject to minor differences due to Homebrew formula naming conventions).
+Formulae that are also packaged by other package managers (e.g. Debian, Ubuntu) should be named consistently (subject to minor differences due to Homebrew formula naming conventions).
-Add other names as aliases as symlinks in `Aliases` in the tap root. Ensure the
-name referenced on the homepage is one of these, as it may be different and have
-underscores and hyphens and so on.
+Add other names as aliases as symlinks in `Aliases` in the tap root. Ensure the name referenced on the homepage is one of these, as it may be different and have underscores and hyphens and so on.
We now accept versioned formulae as long as they [meet the requirements](Versions.md).
## Testing
We need to at least check that it builds. Use the [Brew Test Bot](Brew-Test-Bot.md) for this.
-Verify the formula works if possible. If you can’t tell (e.g. if it’s a
-library) trust the original contributor, it worked for them, so chances are it
-is fine. If you aren’t an expert in the tool in question, you can’t really
-gauge if the formula installed the program correctly. At some point an expert
-will come along, cry blue murder that it doesn’t work, and fix it. This is how
-open source works. Ideally, request a `test do` block to test that
-functionality is consistently available.
-
-If the formula uses a repository, then the `url` parameter should have a
-tag or revision. `url`s have versions and are stable (not yet
-implemented!).
-
-Don't merge any formula updates with failing `brew test`s. If a `test do` block
-is failing it needs to be fixed. This may involve replacing more involved tests
-with those that are more reliable. This is fine: false positives are better than
-false negatives as we don't want to teach maintainers to merge red PRs. If the
-test failure is believed to be due to a bug in `Homebrew/brew` or the CI system,
-that bug must be fixed, or worked around in the formula to yield a passing test,
-before the PR can be merged.
+Verify the formula works if possible. If you can’t tell (e.g. if it’s a library) trust the original contributor, it worked for them, so chances are it is fine. If you aren’t an expert in the tool in question, you can’t really gauge if the formula installed the program correctly. At some point an expert will come along, cry blue murder that it doesn’t work, and fix it. This is how open source works. Ideally, request a `test do` block to test that functionality is consistently available.
+
+If the formula uses a repository, then the `url` parameter should have a tag or revision. `url`s have versions and are stable (not yet implemented!).
+
+Don't merge any formula updates with failing `brew test`s. If a `test do` block is failing it needs to be fixed. This may involve replacing more involved tests with those that are more reliable. This is fine: false positives are better than false negatives as we don't want to teach maintainers to merge red PRs. If the test failure is believed to be due to a bug in `Homebrew/brew` or the CI system, that bug must be fixed, or worked around in the formula to yield a passing test, before the PR can be merged.
## Duplicates
@@ -124,15 +87,11 @@ Formulae that:
should not be removed from Homebrew. The exception to this rule are [versioned formulae](Versions.md) for which there are higher standards of usage and a maximum number of versions for a given formula.
-For more information about deprecating, disabling and removing formulae, see the
-[Deprecating, Disabling, and Removing Formulae page](Deprecating-Disabling-and-Removing-Formulae.md).
+For more information about deprecating, disabling and removing formulae, see the [Deprecating, Disabling, and Removing Formulae page](Deprecating-Disabling-and-Removing-Formulae.md).
## Detailed merge checklist
-The following checklist is intended to help maintainers decide on
-whether to merge, request changes or close a PR. It also brings more
-transparency for contributors in addition to the
-[Acceptable Formulae](Acceptable-Formulae.md) requirements.
+The following checklist is intended to help maintainers decide on whether to merge, request changes or close a PR. It also brings more transparency for contributors in addition to the [Acceptable Formulae](Acceptable-Formulae.md) requirements.
- previously opened active PRs, as we would like to be fair to contributors who came first
- patches/`inreplace` that have been applied to upstream and can be removed | true |
Other | Homebrew | brew | 43070d73a1913691e401cece5d604b2fbc037c45.json | Maintainers docs: adjust line breaks | docs/Maintainer-Guidelines.md | @@ -1,35 +1,19 @@
# Maintainer Guidelines
-**This guide is for maintainers.** These special people have **write
-access** to Homebrew’s repository and help merge the contributions of
-others. You may find what is written here interesting, but it’s
-definitely not a beginner’s guide.
+**This guide is for maintainers.** These special people have **write access** to Homebrew’s repository and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not a beginner’s guide.
Maybe you were looking for the [Formula Cookbook](Formula-Cookbook.md) or [Cask Cookbook](Cask-Cookbook.md)?
## Overview
-All Homebrew maintainers are encouraged to contribute to all parts of the project,
-but there are four main teams that maintainers tend to be a part of:
-
-- `brew` maintainers: this team maintains the [`Homebrew/brew`](https://github.com/Homebrew/brew) repository.
- See the [Homebrew/brew Maintainer Guide](Homebrew-brew-Maintainer-Guide.md) for more details about being a `brew` maintainer.
-- Core maintainers: this team maintains the [`Homebrew/homebrew-core`](https://github.com/Homebrew/homebrew-core)
- repository. See the [Homebrew/homebrew-core Maintainer Guide](Homebrew-homebrew-core-Maintainer-Guide.md)
- for more details about being a core maintainer.
-- Linux maintainers: this team maintains the [`Homebrew/homebrew-core`](https://github.com/Homebrew/homebrew-core)
- repository on Linux.
-- Cask maintainers: this team maintains the [`Homebrew/homebrew-cask`](https://github.com/Homebrew/homebrew-cask),
- [`Homebrew/homebrew-cask-drivers`](https://github.com/Homebrew/homebrew-cask-drivers),
- [`Homebrew/homebrew-cask-fonts`](https://github.com/Homebrew/homebrew-cask-fonts) and
- [`Homebrew/homebrew-cask-versions`](https://github.com/Homebrew/homebrew-cask-versions) repositories.
- See the [Homebrew/homebrew-cask Maintainer Guide](Homebrew-homebrew-cask-Maintainer-Guide.md)
- for more details about being a cask maintainer.
-
-These documents are meant to serve as guiding principles. As a maintainer, you can make a call to either
-request changes from a contributor or help them out based on their comfort and previous contributions.
-Remember, as a team we [Prioritise Maintainers Over Users](Maintainers-Avoiding-Burnout.md) to avoid
-burnout. If you wish to change or discuss any of the guidelines: open a PR to suggest a change.
+All Homebrew maintainers are encouraged to contribute to all parts of the project, but there are four main teams that maintainers tend to be a part of:
+
+- `brew` maintainers: this team maintains the [`Homebrew/brew`](https://github.com/Homebrew/brew) repository. See the [Homebrew/brew Maintainer Guide](Homebrew-brew-Maintainer-Guide.md) for more details about being a `brew` maintainer.
+- Core maintainers: this team maintains the [`Homebrew/homebrew-core`](https://github.com/Homebrew/homebrew-core) repository. See the [Homebrew/homebrew-core Maintainer Guide](Homebrew-homebrew-core-Maintainer-Guide.md) for more details about being a core maintainer.
+- Linux maintainers: this team maintains the [`Homebrew/homebrew-core`](https://github.com/Homebrew/homebrew-core) repository on Linux.
+- Cask maintainers: this team maintains the [`Homebrew/homebrew-cask`](https://github.com/Homebrew/homebrew-cask), [`Homebrew/homebrew-cask-drivers`](https://github.com/Homebrew/homebrew-cask-drivers), [`Homebrew/homebrew-cask-fonts`](https://github.com/Homebrew/homebrew-cask-fonts) and [`Homebrew/homebrew-cask-versions`](https://github.com/Homebrew/homebrew-cask-versions) repositories. See the [Homebrew/homebrew-cask Maintainer Guide](Homebrew-homebrew-cask-Maintainer-Guide.md) for more details about being a cask maintainer.
+
+These documents are meant to serve as guiding principles. As a maintainer, you can make a call to either request changes from a contributor or help them out based on their comfort and previous contributions. Remember, as a team we [Prioritise Maintainers Over Users](Maintainers-Avoiding-Burnout.md) to avoid burnout. If you wish to change or discuss any of the guidelines: open a PR to suggest a change.
## Mission
@@ -43,21 +27,13 @@ Homebrew aims to be the missing package manager for macOS (and Linux). Its prima
### Add comments
-It may be enough to refer to an issue ticket, but make sure changes are clear so that
-if you came to them unaware of the surrounding issues they would make sense
-to you. Many times on other projects I’ve seen code removed because the
-new guy didn’t know why it was there. Regressions suck.
+It may be enough to refer to an issue ticket, but make sure changes are clear so that if you came to them unaware of the surrounding issues they would make sense to you. Many times on other projects I’ve seen code removed because the new guy didn’t know why it was there. Regressions suck.
### Don’t allow bloated diffs
-Amend a cherry-pick to remove commits that are only changes in
-whitespace. They are not acceptable because our history is important and
-`git blame` should be useful.
+Amend a cherry-pick to remove commits that are only changes in whitespace. They are not acceptable because our history is important and `git blame` should be useful.
-Whitespace corrections (to Ruby standard etc.) are allowed (in fact this
-is a good opportunity to do it) provided the line itself has some kind
-of modification that is not whitespace in it. But be careful about
-making changes to inline patches—make sure they still apply.
+Whitespace corrections (to Ruby standard etc.) are allowed (in fact this is a good opportunity to do it) provided the line itself has some kind of modification that is not whitespace in it. But be careful about making changes to inline patches—make sure they still apply.
### Closing issues/PRs
| true |
Other | Homebrew | brew | 43070d73a1913691e401cece5d604b2fbc037c45.json | Maintainers docs: adjust line breaks | docs/Releases.md | @@ -1,48 +1,19 @@
# Releases
-Since Homebrew 1.0.0 most Homebrew users (those who haven't run a `dev-cmd` or
-set `HOMEBREW_DEVELOPER=1` which is ~99.9% based on analytics data) require tags
-on the [Homebrew/brew repository](https://github.com/homebrew/brew)
-in order to get new versions of Homebrew. There are a few steps in making a new
-Homebrew release:
+Since Homebrew 1.0.0 most Homebrew users (those who haven't run a `dev-cmd` or set `HOMEBREW_DEVELOPER=1` which is ~99.9% based on analytics data) require tags on the [Homebrew/brew repository](https://github.com/homebrew/brew) in order to get new versions of Homebrew. There are a few steps in making a new Homebrew release:
-1. Check the [Homebrew/brew pull requests](https://github.com/homebrew/brew/pulls),
- [issues](https://github.com/homebrew/brew/issues),
- [Homebrew/homebrew-core issues](https://github.com/homebrew/homebrew-core/issues) and
- [Homebrew/discussions (forum)](https://github.com/homebrew/discussions/discussions) to see if there is
- anything pressing that needs to be fixed or merged before the next release.
- If so, fix and merge these changes.
-2. Ensure that no code changes have happened for at least a couple of hours (ideally 4 hours),
- at least one Homebrew/homebrew-core pull request CI job has completed successfully,
- checked the state of the Homebrew/brew `master` CI job (i.e. main jobs green or green after rerunning),
- and that you are confident there are no major regressions on the current `master`,
- branch.
-3. Run `brew release` to create a new draft release. For major or minor version bumps,
- pass `--major` or `--minor`, respectively.
+1. Check the [Homebrew/brew pull requests](https://github.com/homebrew/brew/pulls), [issues](https://github.com/homebrew/brew/issues), [Homebrew/homebrew-core issues](https://github.com/homebrew/homebrew-core/issues) and [Homebrew/discussions (forum)](https://github.com/homebrew/discussions/discussions) to see if there is anything pressing that needs to be fixed or merged before the next release. If so, fix and merge these changes.
+2. Ensure that no code changes have happened for at least a couple of hours (ideally 4 hours), at least one Homebrew/homebrew-core pull request CI job has completed successfully, checked the state of the Homebrew/brew `master` CI job (i.e. main jobs green or green after rerunning), and that you are confident there are no major regressions on the current `master`, branch.
+3. Run `brew release` to create a new draft release. For major or minor version bumps, pass `--major` or `--minor`, respectively.
4. Publish the draft release on [GitHub](https://github.com/Homebrew/brew/releases).
If this is a major or minor release (e.g. X.0.0 or X.Y.0) then there are a few more steps:
-1. Before creating the tag you should delete any `odisabled` code, make any
- `odeprecated` code `odisabled`, uncomment any `# odeprecated` code and add
- any new `odeprecations` that are desired. Also delete any command argument
- definitions that pass `replacement: ...`.
-2. Write up a release notes blog post to <https://brew.sh>
- e.g. [brew.sh#319](https://github.com/Homebrew/brew.sh/pull/319).
- This should use the output from `brew release [--major|--minor]` as input but
- have the wording adjusted to be more human readable and explain not just what has changed but why.
-3. When the release has shipped and the blog post has been merged, tweet the
- blog post as the [@MacHomebrew Twitter account](https://twitter.com/MacHomebrew)
- or tweet it yourself and retweet it with the @MacHomebrew Twitter account
- (credentials are in 1Password).
+1. Before creating the tag you should delete any `odisabled` code, make any `odeprecated` code `odisabled`, uncomment any `# odeprecated` code and add any new `odeprecations` that are desired. Also delete any command argument definitions that pass `replacement: ...`.
+2. Write up a release notes blog post to <https://brew.sh> e.g. [brew.sh#319](https://github.com/Homebrew/brew.sh/pull/319). This should use the output from `brew release [--major|--minor]` as input but have the wording adjusted to be more human readable and explain not just what has changed but why.
+3. When the release has shipped and the blog post has been merged, tweet the blog post as the [@MacHomebrew Twitter account](https://twitter.com/MacHomebrew) or tweet it yourself and retweet it with the @MacHomebrew Twitter account (credentials are in 1Password).
4. Consider whether to submit it to other sources e.g. Hacker News, Reddit.
- - Pros: gets a wider reach and user feedback
- - Cons: negative comments are common and people take this as a chance to
- complain about Homebrew (regardless of their usage)
+ - Pros: gets a wider reach and user feedback
+ - Cons: negative comments are common and people take this as a chance to complain about Homebrew (regardless of their usage)
-Please do not manually create a release based on older commits on the `master` branch.
-It's very hard to judge whether these have been sufficiently tested by users or if they will
-cause negative side-effects with the current state of Homebrew/homebrew-core.
-If a new branch is needed ASAP but there are things on `master` that cannot be released yet
-(e.g. new deprecations and you want to make a patch release) then revert the relevant PRs,
-follow the process above and then revert the reverted PRs to reapply them on `master`.
+Please do not manually create a release based on older commits on the `master` branch. It's very hard to judge whether these have been sufficiently tested by users or if they will cause negative side-effects with the current state of Homebrew/homebrew-core. If a new branch is needed ASAP but there are things on `master` that cannot be released yet (e.g. new deprecations and you want to make a patch release) then revert the relevant PRs, follow the process above and then revert the reverted PRs to reapply them on `master`. | true |
Other | Homebrew | brew | 674f8dbd56001a03e83f174337b20463eb4b412e.json | Update RBI files for racc.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/racc@1.6.1.rbi | @@ -4,7 +4,10 @@
# This is an autogenerated file for types exported from the `racc` gem.
# Please instead update this file by running `bin/tapioca gem racc`.
+::APPLE_GEM_HOME = T.let(T.unsafe(nil), String)
::RUBY19 = T.let(T.unsafe(nil), TrueClass)
+::RUBY_FRAMEWORK = T.let(T.unsafe(nil), TrueClass)
+::RUBY_FRAMEWORK_VERSION = T.let(T.unsafe(nil), String)
class Object < ::BasicObject
include ::ActiveSupport::ToJsonWithActiveSupportEncoder
@@ -159,7 +162,7 @@ class Racc::Grammar::DefinitionEnv
private
def _defmetasyntax(type, id, action, &block); end
- def _regist(target_name); end
+ def _register(target_name); end
def _wrap(target_name, sym, block); end
end
| false |
Other | Homebrew | brew | d14e5e089918a701e707de56567d4fc64d4e5daf.json | Update RBI files for rack.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rack@3.0.2.rbi | @@ -1087,6 +1087,7 @@ class Rack::Response
def headers; end
def length; end
def length=(_arg0); end
+ def no_entity_body?; end
def redirect(target, status = T.unsafe(nil)); end
def set_header(key, value); end
def status; end | false |
Other | Homebrew | brew | 35500130c4ccf7886848cb5073ae9d63e91d253a.json | Update parser tests
- Remove named_args linux specs now that that
logic has been moved to the parser | Library/Homebrew/cli/args.rb | @@ -135,7 +135,7 @@ def spec(default = :stable)
end
def respond_to_missing?(method_name, *)
- !frozen? || @table.key?(method_name)
+ @table.key?(method_name)
end
def method_missing(method_name, *args) | true |
Other | Homebrew | brew | 35500130c4ccf7886848cb5073ae9d63e91d253a.json | Update parser tests
- Remove named_args linux specs now that that
logic has been moved to the parser | Library/Homebrew/test/cli/named_args_spec.rb | @@ -118,12 +118,6 @@ def setup_unredable_cask(name)
expect { described_class.new("foo").to_formulae_and_casks }.to raise_error(FormulaOrCaskUnavailableError)
end
- it "raises an error when formula is absent and cask is available on linux", :needs_linux do
- stub_cask_loader foo_cask
-
- expect { described_class.new("foo").to_formulae_and_casks }.to raise_error(FormulaUnavailableError)
- end
-
it "returns formula when formula is present and cask is unreadable", :needs_macos do
stub_formula_loader foo
setup_unredable_cask "foo"
@@ -311,12 +305,6 @@ def setup_unredable_cask(name)
expect(described_class.new("foo", "baz").to_paths(only: :cask)).to eq [cask_path, Cask::CaskLoader.path("baz")]
end
-
- it "returns only formulae by default on linux", :needs_linux do
- expect(Formulary).to receive(:path).with("foo").and_return(formula_path)
-
- expect(described_class.new("foo", "baz").to_paths).to eq [formula_path, Formulary.path("baz")]
- end
end
describe "#to_taps" do | true |
Other | Homebrew | brew | 35500130c4ccf7886848cb5073ae9d63e91d253a.json | Update parser tests
- Remove named_args linux specs now that that
logic has been moved to the parser | Library/Homebrew/test/cli/parser_spec.rb | @@ -570,12 +570,24 @@
end
end
- it "throws an error by default" do
+ it "throws an error when defined" do
expect { parser.parse(["--cask"]) }.to raise_error UsageError, /Casks are not supported on Linux/
end
+ end
+
+ describe "--formula on linux", :needs_linux do
+ it "doesn't set --formula when not defined" do
+ parser = described_class.new
+ args = parser.parse([])
+ expect(args.respond_to?(:formula?)).to be(false)
+ end
- it "only warns developers", :needs_macos do
- expect { parser.parse(["--cask"]) }.not_to raise_error
+ it "sets --formula to true when defined" do
+ parser = described_class.new do
+ switch "--formula"
+ end
+ args = parser.parse([])
+ expect(args.formula?).to be(true)
end
end
end | true |
Other | Homebrew | brew | 836efe621fc842ee5b7ff1a42f9b8bcba5020a86.json | cask/artifiact/abstract_uninstall: allow wildcard entries for launchctl | Library/Homebrew/cask/artifact/abstract_uninstall.rb | @@ -95,14 +95,10 @@ def uninstall_launchctl(*services, command: nil, **_)
# if launchctl item contains a wildcard, find matching process(es)
services.each do |service|
- all_services.push(service)
- next unless /\*/.match?(service)
+ all_services << service
+ next unless service.include?("*")
- find_launchctl_with_wildcard(service)
- .map { |_, _, id| id }
- .each do |match|
- all_services.push(match)
- end
+ all_services += find_launchctl_with_wildcard(service)
end
all_services.each do |service|
@@ -284,13 +280,13 @@ def uninstall_login_item(*login_items, command: nil, upgrade: false, **_)
end
def find_launchctl_with_wildcard(search)
+ regex = Regexp.escape(search).gsub("\\*", ".*")
system_command!("/bin/launchctl", args: ["list"])
.stdout.lines.drop(1)
- .map { |line| line.chomp.split("\t") }
- .map { |pid, state, id| [pid.to_i, state.to_i, id] }
- .select do |(pid, _, id)|
- pid.nonzero? && /\A#{Regexp.escape(search).gsub("\\*", ".*")}\Z/.match?(id)
- end
+ .map do |line|
+ pid, _state, id = line.chomp.split("\t")
+ id if pid.to_i.nonzero? && id.match?(regex)
+ end.compact
end
# :kext should be unloaded before attempting to delete the relevant file | false |
Other | Homebrew | brew | 867a39f3e56382621bf025d87cf8d4007a8040d4.json | Update RBI files for rubocop-ast.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.24.0.rbi | @@ -659,6 +659,8 @@ class RuboCop::AST::Node < ::Parser::AST::Node
def forward_arg_type?; end
def forward_args_type?; end
def forwarded_args_type?; end
+ def forwarded_kwrestarg_type?; end
+ def forwarded_restarg_type?; end
def global_const?(param0 = T.unsafe(nil), param1); end
def guard_clause?; end
def gvar_type?; end
@@ -1491,6 +1493,7 @@ 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_STDOUT_STDERR = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = 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)
@@ -1854,6 +1857,8 @@ module RuboCop::AST::Traversal
def on_forward_arg(node); end
def on_forward_args(node); end
def on_forwarded_args(node); end
+ def on_forwarded_kwrestarg(node); end
+ def on_forwarded_restarg(node); end
def on_gvar(node); end
def on_gvasgn(node); end
def on_hash(node); end | true |
Other | Homebrew | brew | 867a39f3e56382621bf025d87cf8d4007a8040d4.json | Update RBI files for rubocop-ast.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -6723,10 +6723,6 @@ class RuboCop::AST::Node
def cask_block?(param0=T.unsafe(nil)); end
- def forwarded_kwrestarg_type?(); end
-
- def forwarded_restarg_type?(); end
-
def key_node(param0=T.unsafe(nil)); end
def method_node(param0=T.unsafe(nil)); end
@@ -6747,18 +6743,11 @@ module RuboCop::AST::NodePattern::Sets
SET_MAC_LINUX = ::T.let(nil, ::T.untyped)
SET_ON_INTEL_ON_ARM = ::T.let(nil, ::T.untyped)
SET_OR_NEWER_OR_OLDER = ::T.let(nil, ::T.untyped)
- SET_STDOUT_STDERR = ::T.let(nil, ::T.untyped)
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
SET____ETC_4 = ::T.let(nil, ::T.untyped)
end
-module RuboCop::AST::Traversal
- def on_forwarded_kwrestarg(node); end
-
- def on_forwarded_restarg(node); end
-end
-
class RuboCop::Cask::AST::Stanza
def app?(); end
| true |
Other | Homebrew | brew | d4ab8497211d737dd18c0ebbbc8af22f82a17d27.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -6744,6 +6744,7 @@ 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_MAC_LINUX = ::T.let(nil, ::T.untyped)
SET_ON_INTEL_ON_ARM = ::T.let(nil, ::T.untyped)
SET_OR_NEWER_OR_OLDER = ::T.let(nil, ::T.untyped)
SET_STDOUT_STDERR = ::T.let(nil, ::T.untyped)
@@ -6950,6 +6951,10 @@ class RuboCop::Cop::FormulaCop
def required_dependency_name?(param0, param1); end
end
+class RuboCop::Cop::Homebrew::MoveToExtendOS
+ def os_check?(param0=T.unsafe(nil)); end
+end
+
module RuboCop::Cop::OnSystemConditionalsHelper
def if_arch_node_search(param0, arch:); end
| false |
Other | Homebrew | brew | 7bc427405a475e8aabb4fbd31367f375a88ed6ab.json | governance: update membership procedures | docs/Homebrew-Leadership-Responsibilities.md | @@ -29,11 +29,12 @@
- Book a group dinner (which Homebrew pays for) and check for any dietary requirements
- Ask someone to bring a conference/table microphone for people to be able to remotely participate in AGM
- February after the AGM:
- - Add the minutes of the AGM to <https://github.com/Homebrew/brew/tree/master/docs/governance>
- - Create [issue in Homebrew/brew](https://github.com/Homebrew/brew/issues?q=is%3Aissue+in%3Atitle+membership+) to ask members who did not vote in the election whether they wish to remain or step down as members
+ - Add the minutes of the AGM to Homebrew/brew's [governance archives](https://github.com/Homebrew/brew/tree/master/docs/governance)
+ - Create an [issue in Homebrew/brew](https://github.com/Homebrew/brew/issues?q=is%3Aissue+in%3Atitle+membership+) to survey members who did not vote in the election whether they wish to remain or step down as members
- Members that are not maintainers should be a least one of:
- An current or previously active maintainer, PLC/TSC member or Project Leader
- A long-standing member of the Homebrew community (e.g. been submitting good bug reports for over two years)
+ - After the survey issue is closed, list the current year's members in a new file within the [governance archives](https://github.com/Homebrew/brew/tree/master/docs/governance)
- October: arrange in-person AGM
- Offer to pay for Homebrew maintainers who are at least one of:
- active Homebrew maintainers (i.e. not just contributors) | true |
Other | Homebrew | brew | 7bc427405a475e8aabb4fbd31367f375a88ed6ab.json | governance: update membership procedures | docs/New-Maintainer-Checklist.md | @@ -85,4 +85,4 @@ When admitted as members:
- Invite them to the [**@Homebrew/members** team](https://github.com/orgs/Homebrew/teams/members), to give them access to the private governance repository.
- Invite them as a single-channel guest to the #members channel on the [`machomebrew` private maintainers Slack](https://machomebrew.slack.com/admin/invites) (and ensure they've read the [communication guidelines](Maintainer-Guidelines.md#communication)) and ask them to use their real name there (rather than a pseudonym they may use on e.g. GitHub).
-- Add them to the membership list in the [homebrew-governance repository](https://github.com/Homebrew/homebrew-governance).
+- Add them to the current year's membership list in the [governance archives](https://github.com/Homebrew/brew/tree/master/docs/governance). | true |
Other | Homebrew | brew | be73fc19dd19819fca0ede70f28b3964b348e4e5.json | Update RBI files for parser.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/parser@3.1.3.0.rbi | @@ -59,6 +59,8 @@ class Parser::AST::Processor < ::AST::Processor
def on_find_pattern(node); end
def on_for(node); end
def on_forward_arg(node); end
+ def on_forwarded_kwrestarg(node); end
+ def on_forwarded_restarg(node); end
def on_gvar(node); end
def on_gvasgn(node); end
def on_hash(node); end
@@ -235,6 +237,8 @@ class Parser::Builders::Default
def forward_arg(dots_t); end
def forward_only_args(begin_t, dots_t, end_t); end
def forwarded_args(dots_t); end
+ def forwarded_kwrestarg(dstar_t); end
+ def forwarded_restarg(star_t); end
def gvar(token); end
def hash_pattern(lbrace_t, kwargs, rbrace_t); end
def ident(token); end
@@ -520,6 +524,7 @@ class Parser::Lexer
def static_env=(_arg0); end
def tokens; end
def tokens=(_arg0); end
+ def version; end
protected
@@ -528,6 +533,7 @@ class Parser::Lexer
def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end
def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end
def emit_do(do_block = T.unsafe(nil)); end
+ def emit_invalid_escapes?; end
def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end
def encode_escape(ord); end
def eof_codepoint?(point); end
@@ -1610,9 +1616,13 @@ class Parser::StaticEnvironment
def declare(name); end
def declare_anonymous_blockarg; end
+ def declare_anonymous_kwrestarg; end
+ def declare_anonymous_restarg; end
def declare_forward_args; end
def declared?(name); end
def declared_anonymous_blockarg?; end
+ def declared_anonymous_kwrestarg?; end
+ def declared_anonymous_restarg?; end
def declared_forward_args?; end
def empty?; end
def extend_dynamic; end
@@ -1622,6 +1632,8 @@ class Parser::StaticEnvironment
end
Parser::StaticEnvironment::ANONYMOUS_BLOCKARG = T.let(T.unsafe(nil), Symbol)
+Parser::StaticEnvironment::ANONYMOUS_KWRESTARG = T.let(T.unsafe(nil), Symbol)
+Parser::StaticEnvironment::ANONYMOUS_RESTARG = T.let(T.unsafe(nil), Symbol)
Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol)
class Parser::SyntaxError < ::StandardError | true |
Other | Homebrew | brew | be73fc19dd19819fca0ede70f28b3964b348e4e5.json | Update RBI files for parser.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -6723,6 +6723,10 @@ class RuboCop::AST::Node
def cask_block?(param0=T.unsafe(nil)); end
+ def forwarded_kwrestarg_type?(); end
+
+ def forwarded_restarg_type?(); end
+
def key_node(param0=T.unsafe(nil)); end
def method_node(param0=T.unsafe(nil)); end
@@ -6748,6 +6752,12 @@ module RuboCop::AST::NodePattern::Sets
SET____ETC_4 = ::T.let(nil, ::T.untyped)
end
+module RuboCop::AST::Traversal
+ def on_forwarded_kwrestarg(node); end
+
+ def on_forwarded_restarg(node); end
+end
+
class RuboCop::Cask::AST::Stanza
def app?(); end
| true |
Other | Homebrew | brew | 23ef33c3b1e25384c999135383fdd7f199fc693b.json | Update RBI files for bootsnap.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/bootsnap@1.15.0.rbi | @@ -18,15 +18,15 @@ module Bootsnap
def logger; end
def logger=(logger); end
def rb_get_path(fname); end
- def setup(cache_dir:, development_mode: T.unsafe(nil), load_path_cache: T.unsafe(nil), ignore_directories: T.unsafe(nil), compile_cache_iseq: T.unsafe(nil), compile_cache_yaml: T.unsafe(nil), compile_cache_json: T.unsafe(nil)); end
+ def setup(cache_dir:, development_mode: T.unsafe(nil), load_path_cache: T.unsafe(nil), ignore_directories: T.unsafe(nil), readonly: T.unsafe(nil), compile_cache_iseq: T.unsafe(nil), compile_cache_yaml: T.unsafe(nil), compile_cache_json: T.unsafe(nil)); end
def unload_cache!; end
end
end
module Bootsnap::CompileCache
class << self
def permission_error(path); end
- def setup(cache_dir:, iseq:, yaml:, json:); end
+ def setup(cache_dir:, iseq:, yaml:, json:, readonly: T.unsafe(nil)); end
def supported?; end
end
end
@@ -54,7 +54,7 @@ module Bootsnap::LoadPathCache
def enabled?; end
def load_path_cache; end
def loaded_features_index; end
- def setup(cache_path:, development_mode:, ignore_directories:); end
+ def setup(cache_path:, development_mode:, ignore_directories:, readonly: T.unsafe(nil)); end
def supported?; end
def unload!; end
end
@@ -193,7 +193,7 @@ Bootsnap::LoadPathCache::PathScanner::REQUIRABLE_EXTENSIONS = T.let(T.unsafe(nil
Bootsnap::LoadPathCache::SLASH = T.let(T.unsafe(nil), String)
class Bootsnap::LoadPathCache::Store
- def initialize(store_path); end
+ def initialize(store_path, readonly: T.unsafe(nil)); end
def fetch(key); end
def get(key); end | false |
Other | Homebrew | brew | 49bacd681eb77958da75897ec7bef1ac7f480653.json | diagnostic: remove some checks.
- Some of these are currently failing globally on GitHub Actions.
- Some(/all?) of these predate our use of the macOS sandbox,
environment filtering, PATH filtering and pushing users much harder to
use bottles instead of building from source
- I haven't seen a case for a long time where any of these actually
debugged a user issue. If/when this happens: we can add a given check
back.
- This should allow us to dramatically reduce the amount of cleanup
that `brew test-bot` needs to do on GitHub Actions. | Library/Homebrew/diagnostic.rb | @@ -181,32 +181,6 @@ def check_for_installed_developer_tools
EOS
end
- # Anaconda installs multiple system & brew dupes, including OpenSSL, Python,
- # sqlite, libpng, Qt, etc. Regularly breaks compile on Vim, MacVim and others.
- # Is flagged as part of the *-config script checks below, but people seem
- # to ignore those as warnings rather than extremely likely breakage.
- def check_for_anaconda
- return unless which("anaconda")
- return unless which("python")
-
- anaconda_directory = which("anaconda").realpath.dirname
- python_binary = Utils.popen_read(which("python"), "-c", "import sys; sys.stdout.write(sys.executable)")
- python_directory = Pathname.new(python_binary).realpath.dirname
-
- # Only warn if Python lives with Anaconda, since is most problematic case.
- return unless python_directory == anaconda_directory
-
- <<~EOS
- Anaconda is known to frequently break Homebrew builds, including Vim and
- MacVim, due to bundling many duplicates of system and Homebrew-provided
- tools.
-
- If you encounter a build failure please temporarily remove Anaconda
- from your $PATH and attempt the build again prior to reporting the
- failure to us. Thanks!
- EOS
- end
-
def __check_stray_files(dir, pattern, allow_list, message)
return unless File.directory?(dir)
@@ -477,54 +451,6 @@ def check_user_path_3
EOS
end
- def check_for_config_scripts
- return unless HOMEBREW_CELLAR.exist?
-
- real_cellar = HOMEBREW_CELLAR.realpath
-
- scripts = []
-
- allowlist = %W[
- /bin /sbin
- /usr/bin /usr/sbin
- /usr/X11/bin /usr/X11R6/bin /opt/X11/bin
- #{HOMEBREW_PREFIX}/bin #{HOMEBREW_PREFIX}/sbin
- /Applications/Server.app/Contents/ServerRoot/usr/bin
- /Applications/Server.app/Contents/ServerRoot/usr/sbin
- ]
- if OS.mac? && Hardware::CPU.physical_cpu_arm64?
- allowlist += %W[
- #{HOMEBREW_MACOS_ARM_DEFAULT_PREFIX}/bin
- #{HOMEBREW_MACOS_ARM_DEFAULT_PREFIX}/sbin
- #{HOMEBREW_DEFAULT_PREFIX}/bin
- #{HOMEBREW_DEFAULT_PREFIX}/sbin
- ]
- end
- allowlist.map!(&:downcase)
-
- paths.each do |p|
- next if allowlist.include?(p.downcase) || !File.directory?(p)
-
- realpath = Pathname.new(p).realpath.to_s
- next if realpath.start_with?(real_cellar.to_s, HOMEBREW_CELLAR.to_s)
-
- scripts += Dir.chdir(p) { Dir["*-config"] }.map { |c| File.join(p, c) }
- end
-
- return if scripts.empty?
-
- inject_file_list scripts, <<~EOS
- "config" scripts exist outside your system or Homebrew directories.
- `./configure` scripts often look for *-config scripts to determine if
- software packages are installed, and which additional flags to use when
- compiling and linking.
-
- Having additional scripts in your path can confuse software installed via
- Homebrew if the config script overrides a system or Homebrew-provided
- script of the same name. We found the following "config" scripts:
- EOS
- end
-
def check_for_symlinked_cellar
return unless HOMEBREW_CELLAR.exist?
return unless HOMEBREW_CELLAR.symlink? | true |
Other | Homebrew | brew | 49bacd681eb77958da75897ec7bef1ac7f480653.json | diagnostic: remove some checks.
- Some of these are currently failing globally on GitHub Actions.
- Some(/all?) of these predate our use of the macOS sandbox,
environment filtering, PATH filtering and pushing users much harder to
use bottles instead of building from source
- I haven't seen a case for a long time where any of these actually
debugged a user issue. If/when this happens: we can add a given check
back.
- This should allow us to dramatically reduce the amount of cleanup
that `brew test-bot` needs to do on GitHub Actions. | Library/Homebrew/test/diagnostic_checks_spec.rb | @@ -11,21 +11,6 @@
expect(checks.inject_file_list(%w[/a /b], "foo:\n")).to eq("foo:\n /a\n /b\n")
end
- specify "#check_for_anaconda" do
- mktmpdir do |path|
- anaconda = "#{path}/anaconda"
- python = "#{path}/python"
- FileUtils.touch anaconda
- File.write(python, "#! #{`which bash`}\necho -n '#{python}'\n")
- FileUtils.chmod 0755, anaconda
- FileUtils.chmod 0755, python
-
- ENV["PATH"] = "#{path}#{File::PATH_SEPARATOR}#{ENV.fetch("PATH")}"
-
- expect(checks.check_for_anaconda).to match("Anaconda")
- end
- end
-
specify "#check_access_directories" do
skip "User is root so everything is writable." if Process.euid.zero?
begin
@@ -90,19 +75,6 @@
sbin.rmtree
end
- specify "#check_for_config_scripts" do
- mktmpdir do |tmp|
- file = "#{tmp}/foo-config"
- FileUtils.touch file
- FileUtils.chmod 0755, file
- homebrew_path = "#{tmp}#{File::PATH_SEPARATOR}#{ENV.fetch("PATH")}"
- stub_const("ORIGINAL_PATHS", PATH.new(homebrew_path).map { |path| Pathname.new(path).expand_path }.compact)
-
- expect(checks.check_for_config_scripts)
- .to match('"config" scripts exist')
- end
- end
-
specify "#check_for_symlinked_cellar" do
HOMEBREW_CELLAR.rmtree
| true |
Other | Homebrew | brew | 43c3c59ca471af5c9a524e5eaf0ade1fad6ba4d6.json | fix one more | bin/brew | @@ -105,7 +105,7 @@ export HOMEBREW_LIBRARY
# set from user environment
# shellcheck disable=SC2154
# Use VISUAL if HOMEBREW_EDITOR and EDITOR are unset.
-if [[ -z "${HOMEBREW_EDITOR}" && -n "${VISUAL}" ]]
+if [[ -z "${HOMEBREW_EDITOR:-}" && -n "${VISUAL}" ]]
then
export HOMEBREW_EDITOR="${VISUAL}"
fi | false |
Other | Homebrew | brew | 08e81aaf7ab52c0a02b849571ac6266eb0e17d0c.json | Apply suggestions from code review
Co-authored-by: Bo Anderson <mail@boanderson.me> | .github/workflows/doctor.yml | @@ -18,13 +18,13 @@ jobs:
tests:
strategy:
matrix:
- include:
- - runner: "13-arm64-${{github.run_id}}-${{github.run_attempt}}"
- - runner: "12-arm64"
- - runner: "12-${{github.run_id}}-${{github.run_attempt}}"
- - runner: "11-arm64"
- - runner: "11-${{github.run_id}}-${{github.run_attempt}}"
- - runner: "10.15-${{github.run_id}}-${{github.run_attempt}}"
+ runner:
+ - "13-arm64-${{github.run_id}}-${{github.run_attempt}}"
+ - "12-arm64"
+ - "12-${{github.run_id}}-${{github.run_attempt}}"
+ - "11-arm64"
+ - "11-${{github.run_id}}-${{github.run_attempt}}"
+ - "10.15-${{github.run_id}}-${{github.run_attempt}}"
fail-fast: false
runs-on: ${{ matrix.runner }}
env: | false |
Other | Homebrew | brew | 2f28b280589bdc447e8ac5bb577ecc4e33a85163.json | workflows/doctor: use ephemeral runners
This workflow hasn't been set up to run on our ephemeral runners. Let's
fix that. | .github/workflows/doctor.yml | @@ -18,9 +18,15 @@ jobs:
tests:
strategy:
matrix:
- version: ["12-arm64", "12", "11-arm64", "11", "10.15"]
+ include:
+ - runner: "13-arm64-${{github.run_id}}-${{github.run_attempt}}"
+ - runner: "12-arm64"
+ - runner: "12-${{github.run_id}}-${{github.run_attempt}}"
+ - runner: "11-arm64"
+ - runner: "11-${{github.run_id}}-${{github.run_attempt}}"
+ - runner: "10.15-${{github.run_id}}-${{github.run_attempt}}"
fail-fast: false
- runs-on: ${{ matrix.version }}
+ runs-on: ${{ matrix.runner }}
env:
PATH: "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
defaults: | false |
Other | Homebrew | brew | 9c2293a08e00e8c417df7a173b0aa13322352a59.json | Move Sandbox check to extend/os | Library/Homebrew/extend/os/mac/sandbox.rb | @@ -0,0 +1,9 @@
+# typed: strict
+# frozen_string_literal: true
+
+class Sandbox
+ sig { returns(T::Boolean) }
+ def self.available?
+ File.executable?(SANDBOX_EXEC)
+ end
+end | true |
Other | Homebrew | brew | 9c2293a08e00e8c417df7a173b0aa13322352a59.json | Move Sandbox check to extend/os | Library/Homebrew/extend/os/sandbox.rb | @@ -0,0 +1,4 @@
+# typed: strict
+# frozen_string_literal: true
+
+require "extend/os/mac/sandbox" if OS.mac? | true |
Other | Homebrew | brew | 9c2293a08e00e8c417df7a173b0aa13322352a59.json | Move Sandbox check to extend/os | Library/Homebrew/sandbox.rb | @@ -17,7 +17,7 @@ class Sandbox
sig { returns(T::Boolean) }
def self.available?
- OS.mac? && File.executable?(SANDBOX_EXEC)
+ false
end
sig { void }
@@ -256,3 +256,5 @@ def dump
end
private_constant :SandboxProfile
end
+
+require "extend/os/sandbox" | true |
Other | Homebrew | brew | 260fc858dfc538aaa3de3d82e3c5aaaf5301ae3d.json | Fix rubocop errors | Library/Homebrew/extend/os/linux/cleanup.rb | @@ -15,7 +15,7 @@ def use_system_ruby?
check_ruby_version = HOMEBREW_LIBRARY_PATH/"utils/ruby_check_version_script.rb"
rubies.uniq.any? do |ruby|
quiet_system ruby, "--enable-frozen-string-literal", "--disable=gems,did_you_mean,rubyopt",
- check_ruby_version, HOMEBREW_REQUIRED_RUBY_VERSION
+ check_ruby_version, HOMEBREW_REQUIRED_RUBY_VERSION
end
end
end | false |
Other | Homebrew | brew | 5ad0cd406ad71fc38944f67ec85c0776fc439b6e.json | Update RBI files for rack.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rack@3.0.1.rbi | @@ -496,10 +496,13 @@ class Rack::Lint::Wrapper
def respond_to?(name, *_arg1); end
def response; end
def to_ary; end
+ def to_path; end
def verify_content_length(size); end
def verify_to_path; end
end
+Rack::Lint::Wrapper::BODY_METHODS = T.let(T.unsafe(nil), Hash)
+
class Rack::Lint::Wrapper::ErrorWrapper
def initialize(error); end
| false |
Other | Homebrew | brew | 6e215ecabafb958028d25795871b84f0f0faa2e5.json | Update RBI files for rubocop-rails.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rack@3.0.1.rbi | @@ -496,10 +496,13 @@ class Rack::Lint::Wrapper
def respond_to?(name, *_arg1); end
def response; end
def to_ary; end
+ def to_path; end
def verify_content_length(size); end
def verify_to_path; end
end
+Rack::Lint::Wrapper::BODY_METHODS = T.let(T.unsafe(nil), Hash)
+
class Rack::Lint::Wrapper::ErrorWrapper
def initialize(error); end
| true |
Other | Homebrew | brew | 6e215ecabafb958028d25795871b84f0f0faa2e5.json | Update RBI files for rubocop-rails.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.17.3.rbi | @@ -178,6 +178,7 @@ RuboCop::Cop::Rails::ActionFilter::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array
class RuboCop::Cop::Rails::ActionOrder < ::RuboCop::Cop::Base
include ::RuboCop::Cop::VisibilityHelp
include ::RuboCop::Cop::DefNode
+ include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
def action_declarations(param0, param1); end
@@ -186,9 +187,14 @@ class RuboCop::Cop::Rails::ActionOrder < ::RuboCop::Cop::Base
private
def actions; end
+ def add_range(range1, range2); end
+ def correction_target(def_node); end
def expected_order; end
def find_index(node); end
+ def range_with_comments(node); end
+ def range_with_comments_and_lines(node); end
def register_offense(previous, current); end
+ def swap_range(corrector, range1, range2); end
end
RuboCop::Cop::Rails::ActionOrder::MSG = T.let(T.unsafe(nil), String)
@@ -695,6 +701,9 @@ class RuboCop::Cop::Rails::DynamicFindBy < ::RuboCop::Cop::Base
def autocorrect_argument_keywords(corrector, node, keywords); end
def autocorrect_method_name(corrector, node); end
def column_keywords(method); end
+ def dynamic_find_by_arguments?(node); end
+ def dynamic_find_by_arguments_count?(node); end
+ def dynamic_find_by_arguments_type?(node); end
def static_method_name(method_name); end
def whitelisted?(node); end
end
@@ -921,7 +930,7 @@ class RuboCop::Cop::Rails::FreezeTime < ::RuboCop::Cop::Base
def current_time_with_convert?(node, method_name); end
end
-RuboCop::Cop::Rails::FreezeTime::CONV_METHODS = T.let(T.unsafe(nil), Array)
+RuboCop::Cop::Rails::FreezeTime::CONVERT_METHODS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Rails::FreezeTime::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Rails::FreezeTime::NOW_METHODS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Rails::FreezeTime::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
@@ -1061,6 +1070,7 @@ class RuboCop::Cop::Rails::I18nLazyLookup < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::I18nLazyLookup::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Rails::I18nLazyLookup::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::I18nLocaleAssignment < ::RuboCop::Cop::Base
def i18n_locale_assignment?(param0 = T.unsafe(nil)); end
@@ -1775,7 +1785,8 @@ class RuboCop::Cop::Rails::RootPathnameMethods < ::RuboCop::Cop::Base
private
- def build_path_glob(path, method); end
+ def build_path_glob_replacement(path, method); end
+ def build_path_replacement(path, method, args); end
def evidence(node); end
def include_interpolation?(arguments); end
def join_arguments(arguments); end
@@ -2047,8 +2058,13 @@ class RuboCop::Cop::Rails::ToSWithArgument < ::RuboCop::Cop::Base
def on_csend(node); end
def on_send(node); end
+
+ private
+
+ def rails_extended_to_s?(node); end
end
+RuboCop::Cop::Rails::ToSWithArgument::EXTENDED_FORMAT_TYPES = T.let(T.unsafe(nil), Set)
RuboCop::Cop::Rails::ToSWithArgument::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Rails::ToSWithArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
| true |
Other | Homebrew | brew | 6e215ecabafb958028d25795871b84f0f0faa2e5.json | Update RBI files for rubocop-rails.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -6742,6 +6742,7 @@ module RuboCop::AST::NodePattern::Sets
SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
SET_ON_INTEL_ON_ARM = ::T.let(nil, ::T.untyped)
SET_OR_NEWER_OR_OLDER = ::T.let(nil, ::T.untyped)
+ SET_STDOUT_STDERR = ::T.let(nil, ::T.untyped)
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
SET____ETC_4 = ::T.let(nil, ::T.untyped) | true |
Other | Homebrew | brew | c7d53a2d9c6aee0222392cd180e96b51cee83522.json | Add cop to police os checks
The methods `OS.linux?` and `OS.mac?` should only be used
in `extend/os` and this cop makes sure of that. | Library/.rubocop.yml | @@ -55,6 +55,11 @@ FormulaAudit:
FormulaAuditStrict:
Enabled: true
+Homebrew/MoveToExtendOS:
+ Exclude:
+ - "Homebrew/{extend,test}/**/*"
+ - "Taps/**/*"
+
# enable all Homebrew custom cops
Homebrew:
Enabled: true | true |
Other | Homebrew | brew | c7d53a2d9c6aee0222392cd180e96b51cee83522.json | Add cop to police os checks
The methods `OS.linux?` and `OS.mac?` should only be used
in `extend/os` and this cop makes sure of that. | Library/Homebrew/rubocops/all.rb | @@ -14,6 +14,7 @@
require_relative "io_read"
require_relative "shell_commands"
+require_relative "platform"
require_relative "formula_desc"
require_relative "components_order" | true |
Other | Homebrew | brew | c7d53a2d9c6aee0222392cd180e96b51cee83522.json | Add cop to police os checks
The methods `OS.linux?` and `OS.mac?` should only be used
in `extend/os` and this cop makes sure of that. | Library/Homebrew/rubocops/platform.rb | @@ -0,0 +1,25 @@
+# typed: false
+# frozen_string_literal: true
+
+module RuboCop
+ module Cop
+ module Homebrew
+ # This cop ensures that platform specific code ends up in `extend/os`.
+ #
+ # @api private
+ class MoveToExtendOS < Base
+ MSG = "Move calls to `OS.linux?` and `OS.mac?` to `extend/os`."
+
+ def_node_matcher :os_check?, <<~PATTERN
+ (send (const nil? :OS) {:mac? | :linux?})
+ PATTERN
+
+ def on_send(node)
+ return unless os_check?(node)
+
+ add_offense(node)
+ end
+ end
+ end
+ end
+end | true |
Other | Homebrew | brew | c7d53a2d9c6aee0222392cd180e96b51cee83522.json | Add cop to police os checks
The methods `OS.linux?` and `OS.mac?` should only be used
in `extend/os` and this cop makes sure of that. | Library/Homebrew/test/rubocops/platform_spec.rb | @@ -0,0 +1,22 @@
+# typed: false
+# frozen_string_literal: true
+
+require "rubocops/platform"
+
+describe RuboCop::Cop::Homebrew::MoveToExtendOS do
+ subject(:cop) { described_class.new }
+
+ it "registers an offense when using `OS.linux?`" do
+ expect_offense(<<~RUBY)
+ OS.linux?
+ ^^^^^^^^^ Move calls to `OS.linux?` and `OS.mac?` to `extend/os`.
+ RUBY
+ end
+
+ it "registers an offense when using `OS.mac?`" do
+ expect_offense(<<~RUBY)
+ OS.mac?
+ ^^^^^^^ Move calls to `OS.linux?` and `OS.mac?` to `extend/os`.
+ RUBY
+ end
+end | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.