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.
This commit is contained in:
Issy Long
2023-03-06 17:35:49 +01:00
committed by Markus Reiter
parent 605c1ab906
commit e5e03ddd41
+3 -3
View File
@@ -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