rubocop: In-line disables of Style/GlobalVars offenses

- We're working to remove the global `Excludes:` from RuboCop configuration in `Homebrew/brew` (see issue 14685 over there).
- This file in Cask was the only place where global vars weren't already in-line disabled. So, to be able to clean up the configuration stanza in Homebrew/brew PR 14878, I've added some.
This commit is contained in:
Issy Long
2023-03-06 17:35:49 +01:00
committed by Markus Reiter
parent e5e03ddd41
commit 658d55ddfc
3 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -370,7 +370,7 @@ def warnings
end
def report
puts "Proposed Simplified App name: #{simplified_app_name}" if $debug
puts "Proposed Simplified App name: #{simplified_app_name}" if $debug # rubocop:disable Style/GlobalVars
puts "Proposed token: #{cask_token}"
puts "Proposed file name: #{cask_file_name}"
puts "Cask Header Line: cask \"#{cask_token}\" do"
@@ -402,7 +402,7 @@ if /^-+h(elp)?$/i.match?(ARGV.first)
end
if /^-+debug?$/i.match?(ARGV.first)
$debug = 1
$debug = 1 # rubocop:disable Style/GlobalVars
ARGV.shift
end
+2 -2
View File
@@ -38,7 +38,7 @@ def process_args
puts usage
exit 0
elsif ARGV.length == 1
$app_path = ARGV.first
$app_path = ARGV.first # rubocop:disable Style/GlobalVars
else
puts usage
exit 1
@@ -63,4 +63,4 @@ end
###
process_args
list_login_items_for_app $app_path
list_login_items_for_app $app_path # rubocop:disable Style/GlobalVars
+2
View File
@@ -17,6 +17,7 @@ require "io/console"
### globals
###
# rubocop:disable Style/GlobalVars
$opt_test = nil
$COLUMNS = IO.console.winsize.last
@@ -120,3 +121,4 @@ if $opt_test
else
report_apps
end
# rubocop:enable Style/GlobalVars