laviua/komock

View on GitHub

Showing 6 of 28 total issues

Method register has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    override fun register(properties: ProxyConfigProperties) {
        val httpServerProp: HttpServerProperties = properties.httpServer

        val router = if (httpServerProp.ssl.enabled) {
            SecuredMockServer(httpServerProp)

    Method register has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        override fun register(properties: ConsulAgentProperties) {
            val clientRegistrar = ConsulClient(properties.consulHost, properties.consulPort)
            log.debug("Found: ${properties.services.size} consul services")
            for (consulService in properties.services) {
                if (consulService.enabled) {

      Method register has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          override fun register(properties: SpringConfigProperties) {
              val httpServerProp: HttpServerProperties = properties.httpServer
      
              val router = if (httpServerProp.ssl.enabled) {
                  SecuredMockServer(httpServerProp)

        Method addRoute has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            fun addRoute(url: String, httpMethod: HttpMethod, responseHandler: ResponseHandler, beforeRouteHandler: BeforeResponseHandler, afterRouteHandler: AfterResponseHandler, callbackHandler: CallbackHandler)
        Severity: Minor
        Found in komock-core/src/main/kotlin/ua/com/lavi/komock/http/server/MockServer.kt - About 45 mins to fix

          Method addRoute has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              override fun addRoute(url: String,
                                    httpMethod: HttpMethod,
                                    responseHandler: ResponseHandler,
                                    beforeRouteHandler: BeforeResponseHandler,
                                    afterRouteHandler: AfterResponseHandler,

            Method addRoute has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                fun addRoute(url: String,
                             httpMethod: HttpMethod,
                             responseHandler: ResponseHandler,
                             beforeResponseHandler: BeforeResponseHandler,
                             afterResponseHandler: AfterResponseHandler,
              Severity
              Category
              Status
              Source
              Language