style: fix lint

This commit is contained in:
usbharu 2024-01-31 22:17:07 +09:00
parent 61e61ec4bd
commit e5f620749e
21 changed files with 89 additions and 89 deletions

View File

@ -52,11 +52,11 @@ open class Delete : Object, HasId, HasActor {
override fun toString(): String {
return "Delete(" +
"apObject=$apObject, " +
"published='$published', " +
"actor='$actor', " +
"id='$id'" +
")" +
" ${super.toString()}"
"apObject=$apObject, " +
"published='$published', " +
"actor='$actor', " +
"id='$id'" +
")" +
" ${super.toString()}"
}
}

View File

@ -16,12 +16,12 @@ open class Emoji(
override fun toString(): String {
return "Emoji(" +
"name='$name', " +
"id='$id', " +
"updated='$updated', " +
"icon=$icon" +
")" +
" ${super.toString()}"
"name='$name', " +
"id='$id', " +
"updated='$updated', " +
"icon=$icon" +
")" +
" ${super.toString()}"
}
override fun equals(other: Any?): Boolean {

View File

@ -36,10 +36,10 @@ open class Follow(
override fun toString(): String {
return "Follow(" +
"apObject='$apObject', " +
"actor='$actor', " +
"id=$id" +
")" +
" ${super.toString()}"
"apObject='$apObject', " +
"actor='$actor', " +
"id=$id" +
")" +
" ${super.toString()}"
}
}

View File

@ -62,17 +62,17 @@ constructor(
override fun toString(): String {
return "Note(" +
"id='$id', " +
"attributedTo='$attributedTo', " +
"content='$content', " +
"published='$published', " +
"to=$to, " +
"cc=$cc, " +
"sensitive=$sensitive, " +
"inReplyTo=$inReplyTo, " +
"attachment=$attachment, " +
"tag=$tag" +
")" +
" ${super.toString()}"
"id='$id', " +
"attributedTo='$attributedTo', " +
"content='$content', " +
"published='$published', " +
"to=$to, " +
"cc=$cc, " +
"sensitive=$sensitive, " +
"inReplyTo=$inReplyTo, " +
"attachment=$attachment, " +
"tag=$tag" +
")" +
" ${super.toString()}"
}
}

View File

@ -40,11 +40,11 @@ open class Undo(
override fun toString(): String {
return "Undo(" +
"actor='$actor', " +
"id='$id', " +
"apObject=$apObject, " +
"published=$published" +
")" +
" ${super.toString()}"
"actor='$actor', " +
"id='$id', " +
"apObject=$apObject, " +
"published=$published" +
")" +
" ${super.toString()}"
}
}

View File

@ -16,4 +16,4 @@ fun <S> Query.withPagination(page: Page, exp: ExpressionWithColumnType<S>): Pagi
}
return PaginationList(resultRows, resultRows.firstOrNull()?.getOrNull(exp), resultRows.lastOrNull()?.getOrNull(exp))
}
}

View File

@ -212,27 +212,27 @@ data class Actor private constructor(
fun withLastPostAt(lastPostDate: Instant): Actor = this.copy(lastPostDate = lastPostDate)
override fun toString(): String {
return "Actor(" +
"id=$id, " +
"name='$name', " +
"domain='$domain', " +
"screenName='$screenName', " +
"description='$description', " +
"inbox='$inbox', " +
"outbox='$outbox', " +
"url='$url', " +
"publicKey='$publicKey', " +
"privateKey=$privateKey, " +
"createdAt=$createdAt, " +
"keyId='$keyId', " +
"followers=$followers, " +
"following=$following, " +
"instance=$instance, " +
"locked=$locked, " +
"followersCount=$followersCount, " +
"followingCount=$followingCount, " +
"postsCount=$postsCount, " +
"lastPostDate=$lastPostDate, " +
"emojis=$emojis" +
")"
"id=$id, " +
"name='$name', " +
"domain='$domain', " +
"screenName='$screenName', " +
"description='$description', " +
"inbox='$inbox', " +
"outbox='$outbox', " +
"url='$url', " +
"publicKey='$publicKey', " +
"privateKey=$privateKey, " +
"createdAt=$createdAt, " +
"keyId='$keyId', " +
"followers=$followers, " +
"following=$following, " +
"instance=$instance, " +
"locked=$locked, " +
"followersCount=$followersCount, " +
"followingCount=$followingCount, " +
"postsCount=$postsCount, " +
"lastPostDate=$lastPostDate, " +
"emojis=$emojis" +
")"
}
}

View File

@ -10,9 +10,9 @@ sealed class Emoji {
abstract fun id(): String
override fun toString(): String {
return "Emoji(" +
"domain='$domain', " +
"name='$name'" +
")"
"domain='$domain', " +
"name='$name'" +
")"
}
}

View File

@ -41,10 +41,10 @@ class HttpSignatureUser(
override fun toString(): String {
return "HttpSignatureUser(" +
"domain='$domain', " +
"id=$id" +
")" +
" ${super.toString()}"
"domain='$domain', " +
"id=$id" +
")" +
" ${super.toString()}"
}
companion object {

View File

@ -273,7 +273,7 @@ class ExposedOAuth2AuthorizationService(
oidcTokenIssuedAt,
oidcTokenExpiresAt,
oidcTokenMetadata.getValue(OAuth2Authorization.Token.CLAIMS_METADATA_NAME)
as MutableMap<String, Any>?
as MutableMap<String, Any>?
)
builder.token(oidcIdToken) { it.putAll(oidcTokenMetadata) }

View File

@ -28,9 +28,9 @@ class UserDetailsImpl(
) : User(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities) {
override fun toString(): String {
return "UserDetailsImpl(" +
"id=$id" +
")" +
" ${super.toString()}"
"id=$id" +
")" +
" ${super.toString()}"
}
override fun equals(other: Any?): Boolean {

View File

@ -29,7 +29,7 @@ class MediaServiceImpl(
val fileName = mediaRequest.file.name
logger.info(
"Media upload. filename:$fileName " +
"contentType:${mediaRequest.file.contentType}"
"contentType:${mediaRequest.file.contentType}"
)
val tempFile = Files.createTempFile("hideout-tmp-file", ".tmp")

View File

@ -8,7 +8,7 @@ data class ImageMediaProcessorConfiguration(
val thubnail: ImageMediaProcessorThumbnailConfiguration?,
val supportedType: List<String>?,
)
)
data class ImageMediaProcessorThumbnailConfiguration(
val generate: Boolean,

View File

@ -32,7 +32,6 @@ class ExposedGenerateTimelineService(private val statusQueryService: StatusQuery
}
val result = query.withPagination(page, Timelines.id)
val statusQueries = result.map {
StatusQuery(
it[Timelines.postId],

View File

@ -87,7 +87,7 @@ class StatusQueryServiceImpl : StatusQueryService {
}
val pairs = query
.withPagination(page,Posts.id)
.withPagination(page, Posts.id)
.groupBy { it[Posts.id] }
.map { it.value }
.map {

View File

@ -50,7 +50,6 @@ class MongoMastodonNotificationRepositoryWrapper(
mongoTemplate.find(query, MastodonNotification::class.java)
}
return PaginationList(
mastodonNotifications,
mastodonNotifications.firstOrNull()?.id,

View File

@ -66,16 +66,16 @@ class StatusesRequest {
override fun toString(): String {
return "StatusesRequest(" +
"status=$status, " +
"media_ids=$media_ids, " +
"poll=$poll, " +
"in_reply_to_id=$in_reply_to_id, " +
"sensitive=$sensitive, " +
"spoiler_text=$spoiler_text, " +
"visibility=$visibility, " +
"language=$language, " +
"scheduled_at=$scheduled_at" +
")"
"status=$status, " +
"media_ids=$media_ids, " +
"poll=$poll, " +
"in_reply_to_id=$in_reply_to_id, " +
"sensitive=$sensitive, " +
"spoiler_text=$spoiler_text, " +
"visibility=$visibility, " +
"language=$language, " +
"scheduled_at=$scheduled_at" +
")"
}
@Suppress("EnumNaming", "EnumEntryNameCase")

View File

@ -9,6 +9,7 @@ interface StatusQueryService {
suspend fun findByPostIds(ids: List<Long>): List<Status>
suspend fun findByPostIdsWithMediaIds(statusQueries: List<StatusQuery>): List<Status>
@Suppress("LongParameterList")
suspend fun accountsStatus(
accountId: Long,
onlyMedia: Boolean = false,

View File

@ -20,6 +20,7 @@ import kotlin.math.min
@Suppress("TooManyFunctions")
interface AccountApiService {
@Suppress("ongParameterList")
suspend fun accountsStatuses(
userid: Long,
onlyMedia: Boolean,
@ -87,7 +88,7 @@ class AccountApiServiceImpl(
): PaginationList<Status, Long> {
val canViewFollowers = if (loginUser == null) {
false
}else if(loginUser == userid) {
} else if (loginUser == userid) {
true
} else {
transaction.transaction {

View File

@ -19,7 +19,7 @@ class InstanceApiServiceImpl(private val applicationConfig: ApplicationConfig) :
title = "Hideout Server",
shortDescription = "Hideout test server",
description = "This server is operated for testing of Hideout." +
" We are not responsible for any events that occur when associating with this server",
" We are not responsible for any events that occur when associating with this server",
email = "i@usbharu.dev",
version = "0.0.1",
urls = V1InstanceUrls("wss://${url.host}"),

View File

@ -7,9 +7,9 @@ class LruCache<K, V>(private val maxSize: Int) : LinkedHashMap<K, V>(15, 0.75f,
override fun removeEldestEntry(eldest: MutableMap.MutableEntry<K, V>?): Boolean = size > maxSize
override fun toString(): String {
return "LruCache(" +
"maxSize=$maxSize" +
")" +
" ${super.toString()}"
"maxSize=$maxSize" +
")" +
" ${super.toString()}"
}
companion object {