fix new warnings, regenerate lint-baseline.xml (#4684)

Mostly "StringFormatTrivial" which I think is new, but it makes totally
sense to fix
This commit is contained in:
Konrad Pozniak 2024-09-16 20:57:27 +02:00 committed by GitHub
commit c887c8213c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 68 additions and 124 deletions

View file

@ -104,7 +104,7 @@ class FilterModel @Inject constructor(
val phrase = filter.phrase
val quotedPhrase = Pattern.quote(phrase)
return if (filter.wholeWord && ALPHANUMERIC.matcher(phrase).matches()) {
String.format("(^|\\W)%s($|\\W)", quotedPhrase)
"(^|\\W)$quotedPhrase($|\\W)"
} else {
quotedPhrase
}