From 5ab62d1250e584a5f9f64527018b257499ad0a12 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:31:47 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/mastodon/account/AccountApiPaginationTest.kt | 4 ++++ .../core/application/shared/AbstractApplicationService.kt | 2 +- .../hideout/core/domain/model/filter/FilterResult.kt | 3 +-- .../hideout/core/interfaces/api/auth/AuthController.kt | 4 +--- hideout-core/src/main/resources/application.yml | 1 + .../core/domain/model/actor/ActorDescriptionTest.kt | 4 +--- .../dev/usbharu/hideout/core/domain/model/post/PostTest.kt | 2 +- .../hideout/mastodon/interfaces/api/SpringTimelineApi.kt | 7 +------ hideout-mastodon/src/main/resources/openapi/mastodon.yaml | 2 +- 9 files changed, 12 insertions(+), 17 deletions(-) diff --git a/hideout-core/src/intTest/kotlin/mastodon/account/AccountApiPaginationTest.kt b/hideout-core/src/intTest/kotlin/mastodon/account/AccountApiPaginationTest.kt index 81971e7a..baf0a42a 100644 --- a/hideout-core/src/intTest/kotlin/mastodon/account/AccountApiPaginationTest.kt +++ b/hideout-core/src/intTest/kotlin/mastodon/account/AccountApiPaginationTest.kt @@ -14,6 +14,8 @@ * limitations under the License. */ +@file:Suppress("SpringJavaInjectionPointsAutowiringInspection") + package mastodon.account import com.fasterxml.jackson.core.type.TypeReference @@ -41,6 +43,7 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders import org.springframework.transaction.annotation.Transactional import org.springframework.web.context.WebApplicationContext +@Suppress("NonAsciiCharacters") @SpringBootTest(classes = [SpringApplication::class]) @AutoConfigureMockMvc @Transactional @@ -48,6 +51,7 @@ import org.springframework.web.context.WebApplicationContext @Sql("/sql/test-user2.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_CLASS) @Sql("/sql/accounts/test-accounts-statuses.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_CLASS) class AccountApiPaginationTest { + @Suppress("SpringJavaInjectionPointsAutowiringInspection") @Autowired private lateinit var context: WebApplicationContext diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/shared/AbstractApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/shared/AbstractApplicationService.kt index 9e34cc91..79c0f352 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/shared/AbstractApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/shared/AbstractApplicationService.kt @@ -25,7 +25,7 @@ abstract class AbstractApplicationService( ) : ApplicationService { override suspend fun execute(command: T, executor: CommandExecutor): R { return try { - logger.debug("START ${command::class.simpleName} by $executor") + logger.debug("START {} by {}", command::class.simpleName, executor) val response = transaction.transaction { internalExecute(command, executor) } diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterResult.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterResult.kt index 0878c0cd..b291e6bd 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterResult.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/filter/FilterResult.kt @@ -1,4 +1,3 @@ package dev.usbharu.hideout.core.domain.model.filter -class FilterResult(val filter: Filter, val matchedKeyword: String) { -} \ No newline at end of file +class FilterResult(val filter: Filter, val matchedKeyword: String) \ No newline at end of file diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/api/auth/AuthController.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/api/auth/AuthController.kt index 761dacde..39e8d6c8 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/api/auth/AuthController.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/api/auth/AuthController.kt @@ -32,9 +32,7 @@ class AuthController( private val springMvcCommandExecutorFactory: SpringMvcCommandExecutorFactory, ) { @GetMapping("/auth/sign_up") - fun signUp(): String { - return "sign_up" - } + fun signUp(): String = "sign_up" @PostMapping("/auth/sign_up") suspend fun signUp(@Validated @ModelAttribute signUpForm: SignUpForm, request: HttpServletRequest): String { diff --git a/hideout-core/src/main/resources/application.yml b/hideout-core/src/main/resources/application.yml index e5c023ec..55cec25b 100644 --- a/hideout-core/src/main/resources/application.yml +++ b/hideout-core/src/main/resources/application.yml @@ -1,3 +1,4 @@ +#file: noinspection SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection hideout: url: "https://test-hideout-dev.usbharu.dev" use-mongodb: true diff --git a/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/domain/model/actor/ActorDescriptionTest.kt b/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/domain/model/actor/ActorDescriptionTest.kt index 90670a45..acfa8b11 100644 --- a/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/domain/model/actor/ActorDescriptionTest.kt +++ b/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/domain/model/actor/ActorDescriptionTest.kt @@ -1,5 +1,3 @@ package dev.usbharu.hideout.core.domain.model.actor -class ActorDescriptionTest { - -} \ No newline at end of file +class ActorDescriptionTest \ No newline at end of file diff --git a/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/domain/model/post/PostTest.kt b/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/domain/model/post/PostTest.kt index 5c4f0226..65ab6cbb 100644 --- a/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/domain/model/post/PostTest.kt +++ b/hideout-core/src/test/kotlin/dev/usbharu/hideout/core/domain/model/post/PostTest.kt @@ -193,7 +193,7 @@ class PostTest { } @Test - fun hideがtrueのときcontetnがemptyを返す() { + fun hideがtrueのときcontentがemptyを返す() { val post = TestPostFactory.create(hide = true) assertEquals(PostContent.empty, post.content) diff --git a/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringTimelineApi.kt b/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringTimelineApi.kt index 7220865f..2f631d70 100644 --- a/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringTimelineApi.kt +++ b/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/SpringTimelineApi.kt @@ -17,12 +17,7 @@ package dev.usbharu.hideout.mastodon.interfaces.api import dev.usbharu.hideout.mastodon.interfaces.api.generated.TimelineApi -import dev.usbharu.hideout.mastodon.interfaces.api.generated.model.Status -import kotlinx.coroutines.flow.Flow -import org.springframework.http.ResponseEntity import org.springframework.stereotype.Controller @Controller -class SpringTimelineApi : TimelineApi { - -} \ No newline at end of file +class SpringTimelineApi : TimelineApi \ No newline at end of file diff --git a/hideout-mastodon/src/main/resources/openapi/mastodon.yaml b/hideout-mastodon/src/main/resources/openapi/mastodon.yaml index 91c75422..bc5195d5 100644 --- a/hideout-mastodon/src/main/resources/openapi/mastodon.yaml +++ b/hideout-mastodon/src/main/resources/openapi/mastodon.yaml @@ -1540,7 +1540,7 @@ components: type: boolean moved: type: boolean - suspendex: + suspended: type: boolean limited: type: boolean