Sorry that I have to ask that, with all the other answers around, but I can't get my head around to think and adapt to my problem.
So I'm writing a custom SwiftLint rule that should check:
- does not have
is
orhas
prefix - does have
: Bool
suffix
My current Regex looks like this, but it shows me the stuff that contains is or has, but I want it to show me things that don't have it
(is|has)[A-Z][A-Za-z]*(: Bool)
I also tried this, but it won't show me any message, so I guess it's wrong:
^(?!is|has)[A-Z][A-Za-z]*: Bool$
So, what's the correct Regex?
EDIT: How it should be:
`isHello: Bool` -> nothing
hello: Bool -> should alarm me, missing is or has prefix
EDIT 2:
@State private var showActionSheet: Bool = false -> should give me a warning
@State private var hasStartWorkout: Bool = false -> should not give me a warning