From 658d55ddfcc35fc90172854d325f8f6cb9fa115c Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 4 Mar 2023 00:22:36 +0000 Subject: [PATCH] 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. --- developer/bin/generate_cask_token | 4 ++-- developer/bin/list_login_items_for_app | 4 ++-- developer/bin/list_running_app_ids | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/developer/bin/generate_cask_token b/developer/bin/generate_cask_token index aed55fd0c1..8fa54772f4 100755 --- a/developer/bin/generate_cask_token +++ b/developer/bin/generate_cask_token @@ -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 diff --git a/developer/bin/list_login_items_for_app b/developer/bin/list_login_items_for_app index ef4e016c26..d7491683e7 100755 --- a/developer/bin/list_login_items_for_app +++ b/developer/bin/list_login_items_for_app @@ -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 diff --git a/developer/bin/list_running_app_ids b/developer/bin/list_running_app_ids index 4e210a22f4..4597166b96 100755 --- a/developer/bin/list_running_app_ids +++ b/developer/bin/list_running_app_ids @@ -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