LLKennedy/httpgrpc

View on GitHub

Showing 125 of 125 total issues

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

    evStub.withArgs("error", sinon.match(() => true)).callsFake((type, listener) => {
        done[3](listener);
    })
Severity: Major
Found in client/src/websocket/websocket.spec.ts and 3 other locations - About 40 mins to fix
client/src/websocket/websocket.spec.ts on lines 177..179
client/src/websocket/websocket.spec.ts on lines 180..182
client/src/websocket/websocket.spec.ts on lines 183..185

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

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 4 locations. Consider refactoring.
Open

    evStub.withArgs("open", sinon.match(() => true)).callsFake((type, listener) => {
        done[1](listener);
    })
Severity: Major
Found in client/src/websocket/websocket.spec.ts and 3 other locations - About 40 mins to fix
client/src/websocket/websocket.spec.ts on lines 177..179
client/src/websocket/websocket.spec.ts on lines 183..185
client/src/websocket/websocket.spec.ts on lines 186..188

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

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 5 locations. Consider refactoring.
Open

func (c *exposedServiceClient) ProxyStream(ctx context.Context, opts ...grpc.CallOption) (ExposedService_ProxyStreamClient, error) {
    stream, err := c.cc.NewStream(ctx, &_ExposedService_serviceDesc.Streams[0], "/httpapi.ExposedService/ProxyStream", opts...)
    if err != nil {
        return nil, err
    }
Severity: Major
Found in httpapi/proxy_grpc.pb.go and 4 other locations - About 40 mins to fix
internal/testservice/service/service_grpc.pb.go on lines 69..76
internal/testservice/service/service_grpc.pb.go on lines 135..142
internal/testservice/service/service_grpc.pb.go on lines 422..429
internal/testservice/service/service_grpc.pb.go on lines 488..495

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

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 5 locations. Consider refactoring.
Open

func (c *appClient) ConvertToString(ctx context.Context, opts ...grpc.CallOption) (App_ConvertToStringClient, error) {
    stream, err := c.cc.NewStream(ctx, &_App_serviceDesc.Streams[2], "/service.App/ConvertToString", opts...)
    if err != nil {
        return nil, err
    }
Severity: Major
Found in internal/testservice/service/service_grpc.pb.go and 4 other locations - About 40 mins to fix
httpapi/proxy_grpc.pb.go on lines 43..50
internal/testservice/service/service_grpc.pb.go on lines 69..76
internal/testservice/service/service_grpc.pb.go on lines 422..429
internal/testservice/service/service_grpc.pb.go on lines 488..495

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

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 5 locations. Consider refactoring.
Open

func (c *exposedAppClient) GetConvertToString(ctx context.Context, opts ...grpc.CallOption) (ExposedApp_GetConvertToStringClient, error) {
    stream, err := c.cc.NewStream(ctx, &_ExposedApp_serviceDesc.Streams[2], "/service.ExposedApp/GetConvertToString", opts...)
    if err != nil {
        return nil, err
    }
Severity: Major
Found in internal/testservice/service/service_grpc.pb.go and 4 other locations - About 40 mins to fix
httpapi/proxy_grpc.pb.go on lines 43..50
internal/testservice/service/service_grpc.pb.go on lines 69..76
internal/testservice/service/service_grpc.pb.go on lines 135..142
internal/testservice/service/service_grpc.pb.go on lines 422..429

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

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 5 locations. Consider refactoring.
Open

func (c *appClient) Feed(ctx context.Context, opts ...grpc.CallOption) (App_FeedClient, error) {
    stream, err := c.cc.NewStream(ctx, &_App_serviceDesc.Streams[0], "/service.App/Feed", opts...)
    if err != nil {
        return nil, err
    }
Severity: Major
Found in internal/testservice/service/service_grpc.pb.go and 4 other locations - About 40 mins to fix
httpapi/proxy_grpc.pb.go on lines 43..50
internal/testservice/service/service_grpc.pb.go on lines 135..142
internal/testservice/service/service_grpc.pb.go on lines 422..429
internal/testservice/service/service_grpc.pb.go on lines 488..495

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

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

func validateArgs(expected, found reflect.Type, pattern apiMethodPattern) error {
    // All this to get a proper array out of these reflection types
    expectedInLen := expected.NumIn()
    expectedOutLen := expected.NumOut()
    foundInLen := found.NumIn()
Severity: Major
Found in proxy/args.go - About 40 mins to fix

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

    func (c *exposedAppClient) GetFeed(ctx context.Context, opts ...grpc.CallOption) (ExposedApp_GetFeedClient, error) {
        stream, err := c.cc.NewStream(ctx, &_ExposedApp_serviceDesc.Streams[0], "/service.ExposedApp/GetFeed", opts...)
        if err != nil {
            return nil, err
        }
    Severity: Major
    Found in internal/testservice/service/service_grpc.pb.go and 4 other locations - About 40 mins to fix
    httpapi/proxy_grpc.pb.go on lines 43..50
    internal/testservice/service/service_grpc.pb.go on lines 69..76
    internal/testservice/service/service_grpc.pb.go on lines 135..142
    internal/testservice/service/service_grpc.pb.go on lines 488..495

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

    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 generateService has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    func generateService(f *descriptorpb.FileDescriptorProto, service *descriptorpb.ServiceDescriptorProto, content *strings.Builder, impexp importsExports, parsedMethods map[string]parsedMethod) {
    Severity: Minor
    Found in internal/codegen/run.go - About 35 mins to fix

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

      func (c *appClient) UploadPhoto(ctx context.Context, in *UploadPhotoRequest, opts ...grpc.CallOption) (*UploadPhotoResponse, error) {
          out := new(UploadPhotoResponse)
          err := c.cc.Invoke(ctx, "/service.App/UploadPhoto", in, out, opts...)
          if err != nil {
              return nil, err
      Severity: Major
      Found in internal/testservice/service/service_grpc.pb.go and 5 other locations - About 35 mins to fix
      httpapi/proxy_grpc.pb.go on lines 34..41
      internal/testservice/service/service_grpc.pb.go on lines 42..49
      internal/testservice/service/service_grpc.pb.go on lines 51..58
      internal/testservice/service/service_grpc.pb.go on lines 404..411
      internal/testservice/service/service_grpc.pb.go on lines 413..420

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

      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 6 locations. Consider refactoring.
      Open

      func (c *exposedAppClient) GetRandom(ctx context.Context, in *RandomRequest, opts ...grpc.CallOption) (*RandomResponse, error) {
          out := new(RandomResponse)
          err := c.cc.Invoke(ctx, "/service.ExposedApp/GetRandom", in, out, opts...)
          if err != nil {
              return nil, err
      Severity: Major
      Found in internal/testservice/service/service_grpc.pb.go and 5 other locations - About 35 mins to fix
      httpapi/proxy_grpc.pb.go on lines 34..41
      internal/testservice/service/service_grpc.pb.go on lines 42..49
      internal/testservice/service/service_grpc.pb.go on lines 51..58
      internal/testservice/service/service_grpc.pb.go on lines 60..67
      internal/testservice/service/service_grpc.pb.go on lines 413..420

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

      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 6 locations. Consider refactoring.
      Open

      func (c *appClient) Random(ctx context.Context, in *RandomRequest, opts ...grpc.CallOption) (*RandomResponse, error) {
          out := new(RandomResponse)
          err := c.cc.Invoke(ctx, "/service.App/Random", in, out, opts...)
          if err != nil {
              return nil, err
      Severity: Major
      Found in internal/testservice/service/service_grpc.pb.go and 5 other locations - About 35 mins to fix
      httpapi/proxy_grpc.pb.go on lines 34..41
      internal/testservice/service/service_grpc.pb.go on lines 42..49
      internal/testservice/service/service_grpc.pb.go on lines 60..67
      internal/testservice/service/service_grpc.pb.go on lines 404..411
      internal/testservice/service/service_grpc.pb.go on lines 413..420

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

      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 6 locations. Consider refactoring.
      Open

      func (c *appClient) Fibonacci(ctx context.Context, in *FibonacciRequest, opts ...grpc.CallOption) (*FibonacciResponse, error) {
          out := new(FibonacciResponse)
          err := c.cc.Invoke(ctx, "/service.App/Fibonacci", in, out, opts...)
          if err != nil {
              return nil, err
      Severity: Major
      Found in internal/testservice/service/service_grpc.pb.go and 5 other locations - About 35 mins to fix
      httpapi/proxy_grpc.pb.go on lines 34..41
      internal/testservice/service/service_grpc.pb.go on lines 51..58
      internal/testservice/service/service_grpc.pb.go on lines 60..67
      internal/testservice/service/service_grpc.pb.go on lines 404..411
      internal/testservice/service/service_grpc.pb.go on lines 413..420

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

      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 6 locations. Consider refactoring.
      Open

      func (c *exposedAppClient) PostUploadPhoto(ctx context.Context, in *UploadPhotoRequest, opts ...grpc.CallOption) (*UploadPhotoResponse, error) {
          out := new(UploadPhotoResponse)
          err := c.cc.Invoke(ctx, "/service.ExposedApp/PostUploadPhoto", in, out, opts...)
          if err != nil {
              return nil, err
      Severity: Major
      Found in internal/testservice/service/service_grpc.pb.go and 5 other locations - About 35 mins to fix
      httpapi/proxy_grpc.pb.go on lines 34..41
      internal/testservice/service/service_grpc.pb.go on lines 42..49
      internal/testservice/service/service_grpc.pb.go on lines 51..58
      internal/testservice/service/service_grpc.pb.go on lines 60..67
      internal/testservice/service/service_grpc.pb.go on lines 404..411

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

      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 6 locations. Consider refactoring.
      Open

      func (c *exposedServiceClient) ProxyUnary(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
          out := new(Response)
          err := c.cc.Invoke(ctx, "/httpapi.ExposedService/ProxyUnary", in, out, opts...)
          if err != nil {
              return nil, err
      Severity: Major
      Found in httpapi/proxy_grpc.pb.go and 5 other locations - About 35 mins to fix
      internal/testservice/service/service_grpc.pb.go on lines 42..49
      internal/testservice/service/service_grpc.pb.go on lines 51..58
      internal/testservice/service/service_grpc.pb.go on lines 60..67
      internal/testservice/service/service_grpc.pb.go on lines 404..411
      internal/testservice/service/service_grpc.pb.go on lines 413..420

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

      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

      func (x *appFeedClient) CloseAndRecv() (*FeedResponse, error) {
          if err := x.ClientStream.CloseSend(); err != nil {
              return nil, err
          }
          m := new(FeedResponse)
      Severity: Minor
      Found in internal/testservice/service/service_grpc.pb.go and 1 other location - About 35 mins to fix
      internal/testservice/service/service_grpc.pb.go on lines 445..454

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

      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

      func (x *exposedAppGetFeedClient) CloseAndRecv() (*FeedResponse, error) {
          if err := x.ClientStream.CloseSend(); err != nil {
              return nil, err
          }
          m := new(FeedResponse)
      Severity: Minor
      Found in internal/testservice/service/service_grpc.pb.go and 1 other location - About 35 mins to fix
      internal/testservice/service/service_grpc.pb.go on lines 92..101

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

      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 4 locations. Consider refactoring.
      Open

                  evStub.withArgs("error", sinon.match(() => true)).callsFake(() => {
                      evsCalled[3] = 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 69..71

      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

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

                  evStub.withArgs("open", sinon.match(() => true)).callsFake(() => {
                      evsCalled[1] = 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 69..71
      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

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

                  evStub.withArgs("close", sinon.match(() => true)).callsFake(() => {
                      evsCalled[0] = 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 66..68
      client/src/websocket/websocket.spec.ts on lines 69..71
      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

      Severity
      Category
      Status
      Source
      Language