LLKennedy/httpgrpc

View on GitHub

Showing 125 of 125 total issues

Method Server.handleDualStream has 59 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (s *Server) handleDualStream(ctx context.Context, procType reflect.Type, caller reflect.Value, srv httpapi.ExposedService_ProxyStreamServer) (err error) {
    defer func() {
        r := recover()
        if r != nil {
            err = status.Errorf(codes.Internal, "caught panic for dual stream: %v", r)
Severity: Minor
Found in proxy/streamdual.go - About 1 hr to fix

    Method Server.callStructStruct has 57 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (s *Server) callStructStruct(ctx context.Context, inputJSON []byte, procType reflect.Type, caller reflect.Value) (res *httpapi.Response, err error) {
        // Create new instance of struct argument to pass into real implementation
        builtRequest := reflect.New(procType.In(2).Elem())
        builtRequestPtr := builtRequest.Interface()
        builtRequestMessage, ok := builtRequestPtr.(proto.Message)
    Severity: Minor
    Found in proxy/proxyunary.go - About 1 hr to fix

      Function ProxyRequest has 56 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func ProxyRequest(ctx context.Context, w http.ResponseWriter, r *http.Request, procedure string, conn grpc.ClientConnInterface, txid string, loggers ...logs.Writer) {
          remote := httpapi.NewExposedServiceClient(conn)
          isWebsocket := false
          upgradeHader, ok := r.Header["Upgrade"]
          if ok {
      Severity: Minor
      Found in convert/unary.go - About 1 hr to fix

        Function feed has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export async function feed() {
            let ws = new MercuryWebSocket<FeedData, FeedResponse>("ws://127.0.0.1:4848/Feed", FeedResponse.Parse, "FeedSocket", console);
            await ws.init()
            let stream = new ClientStream(ws);
            let data1 = new FeedData();
        Severity: Minor
        Found in internal/testservice/client/src/feed.ts - About 1 hr to fix

          Function getNativeTypeName has 55 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func getNativeTypeName(field *descriptorpb.FieldDescriptorProto, message *descriptorpb.DescriptorProto, pkgName string, fileExports []string) string {
              repeatedStr := ""
              if field.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REPEATED {
                  repeatedStr = "[]"
              }
          Severity: Minor
          Found in internal/codegen/run.go - About 1 hr to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                public async Feed(): Promise<mercury.ClientStream<service__FeedData, service__FeedResponse>> {
                    return this.StartClientStream<service__FeedData, service__FeedResponse>("Feed", service__FeedResponse.Parse);
                }
            Severity: Major
            Found in internal/testservice/service/service_mercury.ts and 1 other location - About 1 hr to fix
            internal/testservice/service/service_mercury.ts on lines 28..30

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 58.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                public async ConvertToString(): Promise<mercury.DualStream<service__ConvertInput, service__ConvertOutput>> {
                    return this.StartDualStream<service__ConvertInput, service__ConvertOutput>("ConvertToString", service__ConvertOutput.Parse);
                }
            Severity: Major
            Found in internal/testservice/service/service_mercury.ts and 1 other location - About 1 hr to fix
            internal/testservice/service/service_mercury.ts on lines 22..24

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 58.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 18 locations. Consider refactoring.
            Open

            func (x *RandomResponse) ProtoReflect() protoreflect.Message {
                mi := &file_service_proto_msgTypes[9]
                if protoimpl.UnsafeEnabled && x != nil {
                    ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
                    if ms.LoadMessageInfo() == nil {
            Severity: Major
            Found in internal/testservice/service/service.pb.go and 17 other locations - About 55 mins to fix
            httpapi/proxy.pb.go on lines 125..135
            httpapi/proxy.pb.go on lines 209..219
            httpapi/proxy.pb.go on lines 271..281
            httpapi/proxy.pb.go on lines 328..338
            httpapi/proxy.pb.go on lines 409..419
            httpapi/proxy.pb.go on lines 470..480
            internal/testservice/service/service.pb.go on lines 104..114
            internal/testservice/service/service.pb.go on lines 172..182
            internal/testservice/service/service.pb.go on lines 219..229
            internal/testservice/service/service.pb.go on lines 266..276
            internal/testservice/service/service.pb.go on lines 313..323
            internal/testservice/service/service.pb.go on lines 360..370
            internal/testservice/service/service.pb.go on lines 408..418
            internal/testservice/service/service.pb.go on lines 456..466
            internal/testservice/service/service.pb.go on lines 506..516
            internal/testservice/service/service.pb.go on lines 609..619
            internal/testservice/service/service.pb.go on lines 657..667

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 125.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 18 locations. Consider refactoring.
            Open

            func (x *BroadcastRequest) ProtoReflect() protoreflect.Message {
                mi := &file_service_proto_msgTypes[2]
                if protoimpl.UnsafeEnabled && x != nil {
                    ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
                    if ms.LoadMessageInfo() == nil {
            Severity: Major
            Found in internal/testservice/service/service.pb.go and 17 other locations - About 55 mins to fix
            httpapi/proxy.pb.go on lines 125..135
            httpapi/proxy.pb.go on lines 209..219
            httpapi/proxy.pb.go on lines 271..281
            httpapi/proxy.pb.go on lines 328..338
            httpapi/proxy.pb.go on lines 409..419
            httpapi/proxy.pb.go on lines 470..480
            internal/testservice/service/service.pb.go on lines 104..114
            internal/testservice/service/service.pb.go on lines 172..182
            internal/testservice/service/service.pb.go on lines 266..276
            internal/testservice/service/service.pb.go on lines 313..323
            internal/testservice/service/service.pb.go on lines 360..370
            internal/testservice/service/service.pb.go on lines 408..418
            internal/testservice/service/service.pb.go on lines 456..466
            internal/testservice/service/service.pb.go on lines 506..516
            internal/testservice/service/service.pb.go on lines 561..571
            internal/testservice/service/service.pb.go on lines 609..619
            internal/testservice/service/service.pb.go on lines 657..667

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 125.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 18 locations. Consider refactoring.
            Open

            func (x *FibonacciRequest) ProtoReflect() protoreflect.Message {
                mi := &file_service_proto_msgTypes[6]
                if protoimpl.UnsafeEnabled && x != nil {
                    ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
                    if ms.LoadMessageInfo() == nil {
            Severity: Major
            Found in internal/testservice/service/service.pb.go and 17 other locations - About 55 mins to fix
            httpapi/proxy.pb.go on lines 125..135
            httpapi/proxy.pb.go on lines 209..219
            httpapi/proxy.pb.go on lines 271..281
            httpapi/proxy.pb.go on lines 328..338
            httpapi/proxy.pb.go on lines 409..419
            httpapi/proxy.pb.go on lines 470..480
            internal/testservice/service/service.pb.go on lines 104..114
            internal/testservice/service/service.pb.go on lines 172..182
            internal/testservice/service/service.pb.go on lines 219..229
            internal/testservice/service/service.pb.go on lines 266..276
            internal/testservice/service/service.pb.go on lines 313..323
            internal/testservice/service/service.pb.go on lines 360..370
            internal/testservice/service/service.pb.go on lines 456..466
            internal/testservice/service/service.pb.go on lines 506..516
            internal/testservice/service/service.pb.go on lines 561..571
            internal/testservice/service/service.pb.go on lines 609..619
            internal/testservice/service/service.pb.go on lines 657..667

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 125.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 18 locations. Consider refactoring.
            Open

            func (x *FibonacciResponse) ProtoReflect() protoreflect.Message {
                mi := &file_service_proto_msgTypes[7]
                if protoimpl.UnsafeEnabled && x != nil {
                    ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
                    if ms.LoadMessageInfo() == nil {
            Severity: Major
            Found in internal/testservice/service/service.pb.go and 17 other locations - About 55 mins to fix
            httpapi/proxy.pb.go on lines 125..135
            httpapi/proxy.pb.go on lines 209..219
            httpapi/proxy.pb.go on lines 271..281
            httpapi/proxy.pb.go on lines 328..338
            httpapi/proxy.pb.go on lines 409..419
            httpapi/proxy.pb.go on lines 470..480
            internal/testservice/service/service.pb.go on lines 104..114
            internal/testservice/service/service.pb.go on lines 172..182
            internal/testservice/service/service.pb.go on lines 219..229
            internal/testservice/service/service.pb.go on lines 266..276
            internal/testservice/service/service.pb.go on lines 313..323
            internal/testservice/service/service.pb.go on lines 360..370
            internal/testservice/service/service.pb.go on lines 408..418
            internal/testservice/service/service.pb.go on lines 506..516
            internal/testservice/service/service.pb.go on lines 561..571
            internal/testservice/service/service.pb.go on lines 609..619
            internal/testservice/service/service.pb.go on lines 657..667

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 125.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 18 locations. Consider refactoring.
            Open

            func (x *MultiVal) ProtoReflect() protoreflect.Message {
                mi := &file_proxy_proto_msgTypes[5]
                if protoimpl.UnsafeEnabled && x != nil {
                    ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
                    if ms.LoadMessageInfo() == nil {
            Severity: Major
            Found in httpapi/proxy.pb.go and 17 other locations - About 55 mins to fix
            httpapi/proxy.pb.go on lines 125..135
            httpapi/proxy.pb.go on lines 209..219
            httpapi/proxy.pb.go on lines 271..281
            httpapi/proxy.pb.go on lines 328..338
            httpapi/proxy.pb.go on lines 409..419
            internal/testservice/service/service.pb.go on lines 104..114
            internal/testservice/service/service.pb.go on lines 172..182
            internal/testservice/service/service.pb.go on lines 219..229
            internal/testservice/service/service.pb.go on lines 266..276
            internal/testservice/service/service.pb.go on lines 313..323
            internal/testservice/service/service.pb.go on lines 360..370
            internal/testservice/service/service.pb.go on lines 408..418
            internal/testservice/service/service.pb.go on lines 456..466
            internal/testservice/service/service.pb.go on lines 506..516
            internal/testservice/service/service.pb.go on lines 561..571
            internal/testservice/service/service.pb.go on lines 609..619
            internal/testservice/service/service.pb.go on lines 657..667

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 125.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 18 locations. Consider refactoring.
            Open

            func (x *BroadcastData) ProtoReflect() protoreflect.Message {
                mi := &file_service_proto_msgTypes[3]
                if protoimpl.UnsafeEnabled && x != nil {
                    ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
                    if ms.LoadMessageInfo() == nil {
            Severity: Major
            Found in internal/testservice/service/service.pb.go and 17 other locations - About 55 mins to fix
            httpapi/proxy.pb.go on lines 125..135
            httpapi/proxy.pb.go on lines 209..219
            httpapi/proxy.pb.go on lines 271..281
            httpapi/proxy.pb.go on lines 328..338
            httpapi/proxy.pb.go on lines 409..419
            httpapi/proxy.pb.go on lines 470..480
            internal/testservice/service/service.pb.go on lines 104..114
            internal/testservice/service/service.pb.go on lines 172..182
            internal/testservice/service/service.pb.go on lines 219..229
            internal/testservice/service/service.pb.go on lines 313..323
            internal/testservice/service/service.pb.go on lines 360..370
            internal/testservice/service/service.pb.go on lines 408..418
            internal/testservice/service/service.pb.go on lines 456..466
            internal/testservice/service/service.pb.go on lines 506..516
            internal/testservice/service/service.pb.go on lines 561..571
            internal/testservice/service/service.pb.go on lines 609..619
            internal/testservice/service/service.pb.go on lines 657..667

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 125.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Function initConnection has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

                private async initConnection(): Promise<EstablishedWebsocket<ReqT, ResT>> {
                    if (this.initialised) {
                        throw new Error("cannot initialise MercuryWebSocket twice");
                    }
                    this.initialised = true;
            Severity: Minor
            Found in client/src/websocket/websocket.ts - About 55 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function generateImportsForMethod has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring.
            Open

            func generateImportsForMethod(f *descriptorpb.MethodDescriptorProto, ownPkg string, fileName string, importMap map[string][]string, content *strings.Builder, impexp importsExports) (useGoogle bool) {
                for _, typeName := range []string{f.GetInputType(), f.GetOutputType()} {
                    if typeName == "" {
                        continue
                    }
            Severity: Minor
            Found in internal/codegen/run.go - About 55 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Similar blocks of code found in 18 locations. Consider refactoring.
            Open

            func (x *ConvertInput) ProtoReflect() protoreflect.Message {
                mi := &file_service_proto_msgTypes[4]
                if protoimpl.UnsafeEnabled && x != nil {
                    ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
                    if ms.LoadMessageInfo() == nil {
            Severity: Major
            Found in internal/testservice/service/service.pb.go and 17 other locations - About 55 mins to fix
            httpapi/proxy.pb.go on lines 125..135
            httpapi/proxy.pb.go on lines 209..219
            httpapi/proxy.pb.go on lines 271..281
            httpapi/proxy.pb.go on lines 328..338
            httpapi/proxy.pb.go on lines 409..419
            httpapi/proxy.pb.go on lines 470..480
            internal/testservice/service/service.pb.go on lines 104..114
            internal/testservice/service/service.pb.go on lines 172..182
            internal/testservice/service/service.pb.go on lines 219..229
            internal/testservice/service/service.pb.go on lines 266..276
            internal/testservice/service/service.pb.go on lines 360..370
            internal/testservice/service/service.pb.go on lines 408..418
            internal/testservice/service/service.pb.go on lines 456..466
            internal/testservice/service/service.pb.go on lines 506..516
            internal/testservice/service/service.pb.go on lines 561..571
            internal/testservice/service/service.pb.go on lines 609..619
            internal/testservice/service/service.pb.go on lines 657..667

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 125.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 18 locations. Consider refactoring.
            Open

            func (x *StreamedResponse) ProtoReflect() protoreflect.Message {
                mi := &file_proxy_proto_msgTypes[2]
                if protoimpl.UnsafeEnabled && x != nil {
                    ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
                    if ms.LoadMessageInfo() == nil {
            Severity: Major
            Found in httpapi/proxy.pb.go and 17 other locations - About 55 mins to fix
            httpapi/proxy.pb.go on lines 125..135
            httpapi/proxy.pb.go on lines 209..219
            httpapi/proxy.pb.go on lines 328..338
            httpapi/proxy.pb.go on lines 409..419
            httpapi/proxy.pb.go on lines 470..480
            internal/testservice/service/service.pb.go on lines 104..114
            internal/testservice/service/service.pb.go on lines 172..182
            internal/testservice/service/service.pb.go on lines 219..229
            internal/testservice/service/service.pb.go on lines 266..276
            internal/testservice/service/service.pb.go on lines 313..323
            internal/testservice/service/service.pb.go on lines 360..370
            internal/testservice/service/service.pb.go on lines 408..418
            internal/testservice/service/service.pb.go on lines 456..466
            internal/testservice/service/service.pb.go on lines 506..516
            internal/testservice/service/service.pb.go on lines 561..571
            internal/testservice/service/service.pb.go on lines 609..619
            internal/testservice/service/service.pb.go on lines 657..667

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 125.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 18 locations. Consider refactoring.
            Open

            func (x *FeedResponse) ProtoReflect() protoreflect.Message {
                mi := &file_service_proto_msgTypes[1]
                if protoimpl.UnsafeEnabled && x != nil {
                    ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
                    if ms.LoadMessageInfo() == nil {
            Severity: Major
            Found in internal/testservice/service/service.pb.go and 17 other locations - About 55 mins to fix
            httpapi/proxy.pb.go on lines 125..135
            httpapi/proxy.pb.go on lines 209..219
            httpapi/proxy.pb.go on lines 271..281
            httpapi/proxy.pb.go on lines 328..338
            httpapi/proxy.pb.go on lines 409..419
            httpapi/proxy.pb.go on lines 470..480
            internal/testservice/service/service.pb.go on lines 104..114
            internal/testservice/service/service.pb.go on lines 219..229
            internal/testservice/service/service.pb.go on lines 266..276
            internal/testservice/service/service.pb.go on lines 313..323
            internal/testservice/service/service.pb.go on lines 360..370
            internal/testservice/service/service.pb.go on lines 408..418
            internal/testservice/service/service.pb.go on lines 456..466
            internal/testservice/service/service.pb.go on lines 506..516
            internal/testservice/service/service.pb.go on lines 561..571
            internal/testservice/service/service.pb.go on lines 609..619
            internal/testservice/service/service.pb.go on lines 657..667

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 125.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 18 locations. Consider refactoring.
            Open

            func (x *StreamedRequest) ProtoReflect() protoreflect.Message {
                mi := &file_proxy_proto_msgTypes[0]
                if protoimpl.UnsafeEnabled && x != nil {
                    ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
                    if ms.LoadMessageInfo() == nil {
            Severity: Major
            Found in httpapi/proxy.pb.go and 17 other locations - About 55 mins to fix
            httpapi/proxy.pb.go on lines 209..219
            httpapi/proxy.pb.go on lines 271..281
            httpapi/proxy.pb.go on lines 328..338
            httpapi/proxy.pb.go on lines 409..419
            httpapi/proxy.pb.go on lines 470..480
            internal/testservice/service/service.pb.go on lines 104..114
            internal/testservice/service/service.pb.go on lines 172..182
            internal/testservice/service/service.pb.go on lines 219..229
            internal/testservice/service/service.pb.go on lines 266..276
            internal/testservice/service/service.pb.go on lines 313..323
            internal/testservice/service/service.pb.go on lines 360..370
            internal/testservice/service/service.pb.go on lines 408..418
            internal/testservice/service/service.pb.go on lines 456..466
            internal/testservice/service/service.pb.go on lines 506..516
            internal/testservice/service/service.pb.go on lines 561..571
            internal/testservice/service/service.pb.go on lines 609..619
            internal/testservice/service/service.pb.go on lines 657..667

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 125.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 18 locations. Consider refactoring.
            Open

            func (x *ConvertOutput) ProtoReflect() protoreflect.Message {
                mi := &file_service_proto_msgTypes[5]
                if protoimpl.UnsafeEnabled && x != nil {
                    ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
                    if ms.LoadMessageInfo() == nil {
            Severity: Major
            Found in internal/testservice/service/service.pb.go and 17 other locations - About 55 mins to fix
            httpapi/proxy.pb.go on lines 125..135
            httpapi/proxy.pb.go on lines 209..219
            httpapi/proxy.pb.go on lines 271..281
            httpapi/proxy.pb.go on lines 328..338
            httpapi/proxy.pb.go on lines 409..419
            httpapi/proxy.pb.go on lines 470..480
            internal/testservice/service/service.pb.go on lines 104..114
            internal/testservice/service/service.pb.go on lines 172..182
            internal/testservice/service/service.pb.go on lines 219..229
            internal/testservice/service/service.pb.go on lines 266..276
            internal/testservice/service/service.pb.go on lines 313..323
            internal/testservice/service/service.pb.go on lines 408..418
            internal/testservice/service/service.pb.go on lines 456..466
            internal/testservice/service/service.pb.go on lines 506..516
            internal/testservice/service/service.pb.go on lines 561..571
            internal/testservice/service/service.pb.go on lines 609..619
            internal/testservice/service/service.pb.go on lines 657..667

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 125.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Severity
            Category
            Status
            Source
            Language