Switch unless to if.

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Markus Reiter 2020-09-01 13:59:24 +02:00 committed by GitHub
parent 6994556d19
commit f32b2e0515
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,7 @@ module RuboCop
problem "Description shouldn't start with the #{type} name." if regex_match_group(desc, /^#{name_regex}\b/i)
if type == :cask && match = regex_match_group(desc, /\b(macOS|Mac( ?OS( ?X)?)?|OS ?X)\b/i)
problem "Description shouldn't contain the platform." unless match[1] == "MAC"
problem "Description shouldn't contain the platform." if match[1] != "MAC"
end
# Check if a full stop is used at the end of a desc (apart from in the case of "etc.").