Join GitHub today
Rogue Custom Rules #1586
There are certain rules that kill all custom rules. I call them Rogue Rules.
Let us start with a simple .swiftlint file, with only one customization:
Imagine that you have a custom rule, like this one:
Then an awesome variable like this one:
This works. The variable produces a warning, everyone is happy.
THE ROGUE RULE
The moment you bring the Rogue Rule, the panic starts, people running and fire emerges in other rules.
Let me introduce you to my Rogue Rule:
So by now, you must be imagining "YOU ARE THE ROGUE THAT IS KILLING REGEX". Probably you are right. Yeah, I know I have a lot to learn with regex, but it would be cool that people that use websites like Regex101 and create Rogue Rules wouldn't destroy all the work ever done by humankind.
Post Script Notes
PS: I am using the version 0.19.0.
Ok, enough is enough, I am going after that Rogue Rule.
PS3: I started to mess around with SwiftLint code and found out that this rule is created with a niled regex
When I started the issue I had no idea what was happening.
But after investigating in the code, yes, the issue is related with invalid regex.
This actually leads to two different issues: