LLKennedy/httpgrpc

View on GitHub

Showing 125 of 125 total issues

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

            evStub.withArgs("message", sinon.match(() => true)).callsFake(() => {
                evsCalled[2] = true;
            })
Severity: Major
Found in client/src/websocket/websocket.spec.ts and 3 other locations - About 35 mins to fix
client/src/websocket/websocket.spec.ts on lines 63..65
client/src/websocket/websocket.spec.ts on lines 66..68
client/src/websocket/websocket.spec.ts on lines 72..74

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 47.

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 validateMethod has 5 return statements (exceeds 4 allowed).
Open

func validateMethod(apiMethod reflect.Method, serverType reflect.Type) (methodType string, procedureName string, pattern apiMethodPattern, err error) {
    name := apiMethod.Name
    httpType, trueName, valid := MatchAndStripMethodName(name)
    if !valid {
        err = fmt.Errorf("%s does not begin with a valid HTTP method", name)
Severity: Major
Found in proxy/methods.go - About 35 mins to fix

    Method Server.handleServerStream has 5 return statements (exceeds 4 allowed).
    Open

    func (s *Server) handleServerStream(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 server stream: %v", r)
    Severity: Major
    Found in proxy/streamserver.go - About 35 mins to fix

      Method Server.ProxyStream has 5 return statements (exceeds 4 allowed).
      Open

      func (s *Server) ProxyStream(srv httpapi.ExposedService_ProxyStreamServer) (err error) {
          wrapErr := func(code codes.Code, err error) error {
              if err == nil {
                  return nil
              }
      Severity: Major
      Found in proxy/proxystream.go - About 35 mins to fix

        Method Server.handleDualStream has 5 return statements (exceeds 4 allowed).
        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: Major
        Found in proxy/streamdual.go - About 35 mins to fix

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

                  file_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*RandomResponse); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in internal/testservice/service/service.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 690..701
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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

                  file_proxy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*StreamedResponse); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in httpapi/proxy.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 690..701
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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

                  file_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*BroadcastRequest); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in internal/testservice/service/service.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 690..701
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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

                  file_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*ConvertInput); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in internal/testservice/service/service.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 690..701
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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

                  file_proxy_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*Response); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in httpapi/proxy.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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

                  file_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*FeedResponse); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in internal/testservice/service/service.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 690..701
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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

                  file_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*BroadcastData); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in internal/testservice/service/service.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 690..701
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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

                  file_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*FibonacciRequest); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in internal/testservice/service/service.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 690..701
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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

                  file_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*RandomRequest); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in internal/testservice/service/service.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 690..701
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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

                  file_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*ConvertOutput); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in internal/testservice/service/service.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 690..701
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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

                  file_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*UploadPhotoResponse); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in internal/testservice/service/service.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 690..701
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988

          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 103.

          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

                  file_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*FeedData); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in internal/testservice/service/service.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 690..701
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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

                  file_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*StreamedRequest); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in httpapi/proxy.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 690..701
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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

                  file_proxy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*Request); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in httpapi/proxy.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 690..701
          httpapi/proxy.pb.go on lines 702..713
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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

                  file_proxy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*MultiVal); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in httpapi/proxy.pb.go and 17 other locations - About 35 mins to fix
          httpapi/proxy.pb.go on lines 642..653
          httpapi/proxy.pb.go on lines 654..665
          httpapi/proxy.pb.go on lines 666..677
          httpapi/proxy.pb.go on lines 678..689
          httpapi/proxy.pb.go on lines 690..701
          internal/testservice/service/service.pb.go on lines 857..868
          internal/testservice/service/service.pb.go on lines 869..880
          internal/testservice/service/service.pb.go on lines 881..892
          internal/testservice/service/service.pb.go on lines 893..904
          internal/testservice/service/service.pb.go on lines 905..916
          internal/testservice/service/service.pb.go on lines 917..928
          internal/testservice/service/service.pb.go on lines 929..940
          internal/testservice/service/service.pb.go on lines 941..952
          internal/testservice/service/service.pb.go on lines 953..964
          internal/testservice/service/service.pb.go on lines 965..976
          internal/testservice/service/service.pb.go on lines 977..988
          internal/testservice/service/service.pb.go on lines 989..1000

          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 103.

          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