Merge pull request #165476 from bevanjkay/cmd-style-fix

developer/bin: disable `Style/TopLevelMethodDefinition` rubocop
This commit is contained in:
Bevan Kay
2024-01-29 09:41:24 +08:00
committed by GitHub
5 changed files with 18 additions and 2 deletions
+4
View File
@@ -1,6 +1,8 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
# rubocop:disable Style/TopLevelMethodDefinition
require "find"
require "json"
require "open-uri"
@@ -114,3 +116,5 @@ end.freeze
Open3.capture2("/usr/bin/pbcopy", stdin_data: "#{CASK_LISTS.join("\n")}\n")
puts("Copied lists to clipboard. Replace the information in the issue.")
system("open", ONLINE_ISSUE)
# rubocop:enable Style/TopLevelMethodDefinition
+4
View File
@@ -1,6 +1,8 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
# rubocop:disable Style/TopLevelMethodDefinition
require "open3"
require "pathname"
require "yaml"
@@ -89,3 +91,5 @@ App = Pathname(ARGV[0]).freeze
find_sparkle(App)
find_electron_builder(App)
# rubocop:enable Style/TopLevelMethodDefinition
+4
View File
@@ -1,6 +1,8 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
# rubocop:disable Style/TopLevelMethodDefinition
#
# generate_cask_token
#
@@ -433,3 +435,5 @@ if ARGV.length != 1
end
report
# rubocop:enable Style/TopLevelMethodDefinition
+3
View File
@@ -1,6 +1,8 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
# rubocop:disable Style/TopLevelMethodDefinition
#
# list_login_items_for_app
#
@@ -64,3 +66,4 @@ end
process_args
list_login_items_for_app $app_path # rubocop:disable Style/GlobalVars
# rubocop:enable Style/TopLevelMethodDefinition
+3 -2
View File
@@ -1,6 +1,8 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
# rubocop:disable Style/GlobalVars, Style/TopLevelMethodDefinition
#
# list_running_app_ids
#
@@ -17,7 +19,6 @@ require "io/console"
### globals
###
# rubocop:disable Style/GlobalVars
$opt_test = nil
$COLUMNS = IO.console.winsize.last
@@ -121,4 +122,4 @@ if $opt_test
else
report_apps
end
# rubocop:enable Style/GlobalVars
# rubocop:enable Style/GlobalVars, Style/TopLevelMethodDefinition