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:
Pavel Gorgulov 2026-02-04 16:02:58 +01:00 • committed by GitHub
commit 6f1c120c27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 856 additions and 25 deletions

View file

@ -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) {

View file

@ -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,

View file

@ -30,7 +30,6 @@ import kotlin.uuid.Uuid
*/
@OptIn(ExperimentalUuidApi::class)
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@Suppress("LongMethod")
internal class OldStreamableHttpClientTest : AbstractStreamableHttpClientTest() {
@Test

View file

@ -27,7 +27,6 @@ import kotlin.uuid.Uuid
@OptIn(ExperimentalUuidApi::class)
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@Suppress("LongMethod")
internal class StreamableHttpClientTest : AbstractStreamableHttpClientTest() {
@Test