SwiftLint icon indicating copy to clipboard operation
SwiftLint copied to clipboard

Custom rule using lookbehind becomes Invalid configuration

Open asa08 opened this issue 11 months ago • 1 comments

I want to use lookbehind in a custom rule but get Invalid configuration for 'xxx'. Falling back to default.. Is there any other way?

Example

No setClass on the line before the line containing configur.

(?<!setClass.*?\n.*?)configur

Highlighted

func setup() {
  configur()
}

Not Highlighted

func setup() {
  setClass()
  configur()
}

Thank you.

asa08 avatar Mar 26 '24 06:03 asa08