style: fix lint

This commit is contained in:
usbharu 2024-02-12 12:36:23 +09:00
parent 41d1e59322
commit 7189159cb0
15 changed files with 15 additions and 19 deletions

View File

@ -71,7 +71,6 @@ class MuteProcessServiceImpl : MuteProcessService {
it, it,
precompileRegex(it) precompileRegex(it)
) )
} }
return filterQueryModelList return filterQueryModelList
@ -93,11 +92,9 @@ class MuteProcessServiceImpl : MuteProcessService {
} }
} }
val noneRegex = noneRegexStrings.joinToString("|", "(", ")") val noneRegex = noneRegexStrings.joinToString("|", "(", ")")
val wholeRegex = wholeRegexStrings.joinToString("|", "\\b(", ")\\b") val wholeRegex = wholeRegexStrings.joinToString("|", "\\b(", ")\\b")
val regex = if (noneRegexStrings.isNotEmpty() && wholeRegexStrings.isNotEmpty()) { val regex = if (noneRegexStrings.isNotEmpty() && wholeRegexStrings.isNotEmpty()) {
Regex("$noneRegex|$wholeRegex") Regex("$noneRegex|$wholeRegex")
} else if (noneRegexStrings.isNotEmpty()) { } else if (noneRegexStrings.isNotEmpty()) {

View File

@ -2,7 +2,6 @@ package dev.usbharu.hideout.mastodon.interfaces.api.filter
import dev.usbharu.hideout.controller.mastodon.generated.FilterApi import dev.usbharu.hideout.controller.mastodon.generated.FilterApi
import dev.usbharu.hideout.domain.mastodon.model.generated.* import dev.usbharu.hideout.domain.mastodon.model.generated.*
import kotlinx.coroutines.flow.Flow
import org.springframework.http.ResponseEntity import org.springframework.http.ResponseEntity
import org.springframework.stereotype.Controller import org.springframework.stereotype.Controller