0
I'm making a custom rule for programming language Lint to :
- match 1 or more empty lines after
{
, and - another rule to match empty line before
}
.
As an example in this code, I want these rules to match line 2 and line 5 :
class Test { /* Line 1 */
/* Line 2 */
func example() { /* Line 3 */
} /* Line 4 */
/* Line 5 */
}
I had tried to do it with positive lookahead/lookbehind but with no luck (?<=\{)\n
.
Could anyone help with it ?
Update:
Added whitespeace to the example.
class Test {
func example() {
}
}
@C0deDaedalus, you created the [lint] tag. I'm waiting for questions using it like, "there's a lot of lint clogging the fan and my system is overheating". Can you add at least a wiki excerpt with usage guidance on the tag (a wiki entry would also be good)? :-) – fixer1234 – 2018-05-16T20:57:02.403
@fixer1234, sure would do that. Thanks for your concern. – C0deDaedalus – 2018-05-17T01:21:24.940