Skip to content

Regex check across two lines #4949

Discussion options

You must be logged in to vote

This is a known limitation in the validation check logic. See:

/**
* Returns the list of line indexes which contain prohibited content per this check (given an
* iterable of lines). Note that the returned indexes are based on the iteration order of the
* provided iterable.
*/
fun computeAffectedLines(lines: Iterable<String>): List<Int> {
if (prohibitedContentRegex != null)
return lines.withIndex().filter { (_, line) ->
prohibitedContentRegex.containsMatchIn(line)
}.map { (index, _) -> index }
else return

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

BenHenning
May 4, 2023
Maintainer Sponsor

You must be logged in to vote
0 replies
Answer selected by Vishwajith-Shettigar
Comment options

You must be logged in to vote
1 reply
@chrislee115
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants