Switch unless
to if
.
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
6994556d19
commit
f32b2e0515
@ -65,7 +65,7 @@ module RuboCop
|
|||||||
problem "Description shouldn't start with the #{type} name." if regex_match_group(desc, /^#{name_regex}\b/i)
|
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)
|
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
|
end
|
||||||
|
|
||||||
# Check if a full stop is used at the end of a desc (apart from in the case of "etc.").
|
# Check if a full stop is used at the end of a desc (apart from in the case of "etc.").
|
||||||
|
Loading…
x
Reference in New Issue
Block a user