From 41eeedf932a39ea54ad647417dcff2d38b176740 Mon Sep 17 00:00:00 2001 From: Him188 Date: Mon, 3 May 2021 17:09:53 +0800 Subject: [PATCH] Optimize suppresses --- backend/mirai-console/src/command/CommandSender.kt | 12 ++++++------ .../mirai-console/src/command/CompositeCommand.kt | 8 -------- backend/mirai-console/src/command/RawCommand.kt | 2 -- backend/mirai-console/src/command/SimpleCommand.kt | 8 -------- 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/backend/mirai-console/src/command/CommandSender.kt b/backend/mirai-console/src/command/CommandSender.kt index d159a62c3..4a06ee5a1 100644 --- a/backend/mirai-console/src/command/CommandSender.kt +++ b/backend/mirai-console/src/command/CommandSender.kt @@ -1,14 +1,14 @@ /* - * Copyright 2019-2020 Mamoe Technologies and contributors. + * Copyright 2019-2021 Mamoe Technologies and contributors. * - * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. - * Use of this source code is governed by the GNU AFFERO GENERAL PUBLIC LICENSE version 3 license that can be found through the following link. + * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. + * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. * - * https://github.com/mamoe/mirai/blob/master/LICENSE + * https://github.com/mamoe/mirai/blob/master/LICENSE */ @file:Suppress( - "NOTHING_TO_INLINE", "INAPPLICABLE_JVM_NAME", "FunctionName", "SuspendFunctionOnCoroutineScope", + "NOTHING_TO_INLINE", "FunctionName", "unused", "MemberVisibilityCanBePrivate" ) @@ -34,7 +34,7 @@ import net.mamoe.mirai.console.util.CoroutineScopeUtils.childScopeContext import net.mamoe.mirai.console.util.MessageScope import net.mamoe.mirai.contact.* import net.mamoe.mirai.event.events.* -import net.mamoe.mirai.message.* +import net.mamoe.mirai.message.MessageReceipt import net.mamoe.mirai.message.data.Message import net.mamoe.mirai.message.data.PlainText import kotlin.contracts.InvocationKind diff --git a/backend/mirai-console/src/command/CompositeCommand.kt b/backend/mirai-console/src/command/CompositeCommand.kt index ac2d3d06a..525acb4f7 100644 --- a/backend/mirai-console/src/command/CompositeCommand.kt +++ b/backend/mirai-console/src/command/CompositeCommand.kt @@ -7,14 +7,6 @@ * https://github.com/mamoe/mirai/blob/master/LICENSE */ -@file:Suppress( - "EXPOSED_SUPER_CLASS", - "NOTHING_TO_INLINE", - "unused", - "WRONG_MODIFIER_TARGET", "CANNOT_WEAKEN_ACCESS_PRIVILEGE", - "WRONG_MODIFIER_CONTAINING_DECLARATION", "RedundantVisibilityModifier" -) - package net.mamoe.mirai.console.command import net.mamoe.mirai.console.command.descriptor.* diff --git a/backend/mirai-console/src/command/RawCommand.kt b/backend/mirai-console/src/command/RawCommand.kt index 638973f60..430df8955 100644 --- a/backend/mirai-console/src/command/RawCommand.kt +++ b/backend/mirai-console/src/command/RawCommand.kt @@ -7,8 +7,6 @@ * https://github.com/mamoe/mirai/blob/master/LICENSE */ -@file:Suppress("unused") - package net.mamoe.mirai.console.command import net.mamoe.mirai.console.command.descriptor.* diff --git a/backend/mirai-console/src/command/SimpleCommand.kt b/backend/mirai-console/src/command/SimpleCommand.kt index d85d0fcd3..2ca5c38ee 100644 --- a/backend/mirai-console/src/command/SimpleCommand.kt +++ b/backend/mirai-console/src/command/SimpleCommand.kt @@ -7,14 +7,6 @@ * https://github.com/mamoe/mirai/blob/master/LICENSE */ -@file:Suppress( - "EXPOSED_SUPER_CLASS", - "NOTHING_TO_INLINE", - "unused", - "WRONG_MODIFIER_TARGET", "CANNOT_WEAKEN_ACCESS_PRIVILEGE", - "WRONG_MODIFIER_CONTAINING_DECLARATION", "RedundantVisibilityModifier" -) - package net.mamoe.mirai.console.command import net.mamoe.mirai.console.command.descriptor.*