Detekt configuration (#501)
- generate detekt config - enable several rules - disable ktlint backing property check ## Motivation and Context Centralized control of detekt rules. Using detekt 2 configuration ## How Has This Been Tested? locally ## Breaking Changes - ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed
This commit is contained in:
parent
d958a987f2
commit
6f1c120c27
4 changed files with 856 additions and 25 deletions
|
|
@ -242,7 +242,7 @@ public class StdioClientTransport @JvmOverloads public constructor(
|
|||
message = "Transport is closed",
|
||||
)
|
||||
}
|
||||
@Suppress("TooGenericExceptionCaught", "SwallowedException")
|
||||
@Suppress("SwallowedException")
|
||||
try {
|
||||
sendChannel.send(message)
|
||||
} catch (e: CancellationException) {
|
||||
|
|
@ -298,7 +298,6 @@ public class StdioClientTransport @JvmOverloads public constructor(
|
|||
}
|
||||
|
||||
private suspend fun handleJSONRPCMessage(msg: JSONRPCMessage) {
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
try {
|
||||
_onMessage.invoke(msg)
|
||||
} catch (e: Throwable) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ internal class MockMcp(verbose: Boolean = false) {
|
|||
|
||||
val url = "${mokksy.baseUrl()}/mcp"
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
fun onInitialize(
|
||||
clientName: String? = null,
|
||||
sessionId: String,
|
||||
|
|
@ -109,7 +108,6 @@ internal class MockMcp(verbose: Boolean = false) {
|
|||
}
|
||||
}
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
fun handleWithResult(
|
||||
httpMethod: HttpMethod = HttpMethod.Post,
|
||||
jsonRpcMethod: String,
|
||||
|
|
@ -145,7 +143,6 @@ internal class MockMcp(verbose: Boolean = false) {
|
|||
}
|
||||
}
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
fun handleWithResult(
|
||||
httpMethod: HttpMethod = HttpMethod.Post,
|
||||
jsonRpcMethod: String,
|
||||
|
|
@ -170,7 +167,6 @@ internal class MockMcp(verbose: Boolean = false) {
|
|||
)
|
||||
}
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
fun handleJSONRPCRequest(
|
||||
httpMethod: HttpMethod = HttpMethod.Post,
|
||||
jsonRpcMethod: String,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import kotlin.uuid.Uuid
|
|||
*/
|
||||
@OptIn(ExperimentalUuidApi::class)
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
@Suppress("LongMethod")
|
||||
internal class OldStreamableHttpClientTest : AbstractStreamableHttpClientTest() {
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ import kotlin.uuid.Uuid
|
|||
|
||||
@OptIn(ExperimentalUuidApi::class)
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
@Suppress("LongMethod")
|
||||
internal class StreamableHttpClientTest : AbstractStreamableHttpClientTest() {
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Reference in a new issue