I'm trying to implement custom swiftlint rule to track when before "// MARK:" is less than two new lines. I'm not good in regex. Here is my rule:
custom_rules:
pragma_mark:
name: "Wrong pagma mark format"
regex: "([^\n\n]?\/\/ MARK:)"
message: "Please leave two lines before // MARK:"
severity: warning
but this regex is wrong. what I do wrong? Maybe swiftlint has already this rule? But I can't find it