From e5e03ddd41bd9bede0488608adf77d0c3e5712cf Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 4 Mar 2023 00:06:08 +0000 Subject: [PATCH] rubocop: In-line disables of `Style/ClassVars` 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 class 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/developer/bin/generate_cask_token b/developer/bin/generate_cask_token index 8a766d7955..aed55fd0c1 100755 --- a/developer/bin/generate_cask_token +++ b/developer/bin/generate_cask_token @@ -126,15 +126,15 @@ AFTER_INTERIOR_VERSION_PATS = [ class AppName < String def self.remove_trailing_pat - @@remove_trailing_pat ||= /(?<=.)(?:#{REMOVE_TRAILING_PATS.join('|')})\Z/i + @@remove_trailing_pat ||= /(?<=.)(?:#{REMOVE_TRAILING_PATS.join('|')})\Z/i # rubocop:disable Style/ClassVars end def self.preserve_trailing_pat - @@preserve_trailing_pat ||= /(?:#{PRESERVE_TRAILING_PATS.join('|')})\Z/i + @@preserve_trailing_pat ||= /(?:#{PRESERVE_TRAILING_PATS.join('|')})\Z/i # rubocop:disable Style/ClassVars end def self.after_interior_version_pat - @@after_interior_version_pat ||= /(?:#{AFTER_INTERIOR_VERSION_PATS.join('|')})/i + @@after_interior_version_pat ||= /(?:#{AFTER_INTERIOR_VERSION_PATS.join('|')})/i # rubocop:disable Style/ClassVars end def english_from_app_bundle