eagletmt/kaede

View on GitHub

Showing 12 of 17 total issues

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

func _Scheduler_Reload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(SchedulerReloadInput)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in kaede-cli/kaede/grpc/kaede.pb.go and 5 other locations - About 2 hrs to fix
kaede-cli/kaede/grpc/kaede.pb.go on lines 331..347
kaede-cli/kaede/grpc/kaede.pb.go on lines 349..365
kaede-cli/kaede/grpc/kaede.pb.go on lines 367..383
kaede-cli/kaede/grpc/kaede.pb.go on lines 385..401
kaede-cli/kaede/grpc/kaede.pb.go on lines 403..419

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

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 _Scheduler_AddChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(AddChannelInput)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in kaede-cli/kaede/grpc/kaede.pb.go and 5 other locations - About 2 hrs to fix
kaede-cli/kaede/grpc/kaede.pb.go on lines 313..329
kaede-cli/kaede/grpc/kaede.pb.go on lines 331..347
kaede-cli/kaede/grpc/kaede.pb.go on lines 349..365
kaede-cli/kaede/grpc/kaede.pb.go on lines 367..383
kaede-cli/kaede/grpc/kaede.pb.go on lines 385..401

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

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 _Scheduler_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(UpdateInput)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in kaede-cli/kaede/grpc/kaede.pb.go and 5 other locations - About 2 hrs to fix
kaede-cli/kaede/grpc/kaede.pb.go on lines 313..329
kaede-cli/kaede/grpc/kaede.pb.go on lines 331..347
kaede-cli/kaede/grpc/kaede.pb.go on lines 349..365
kaede-cli/kaede/grpc/kaede.pb.go on lines 367..383
kaede-cli/kaede/grpc/kaede.pb.go on lines 403..419

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

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 _Scheduler_GetPrograms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(GetProgramsInput)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in kaede-cli/kaede/grpc/kaede.pb.go and 5 other locations - About 2 hrs to fix
kaede-cli/kaede/grpc/kaede.pb.go on lines 313..329
kaede-cli/kaede/grpc/kaede.pb.go on lines 331..347
kaede-cli/kaede/grpc/kaede.pb.go on lines 367..383
kaede-cli/kaede/grpc/kaede.pb.go on lines 385..401
kaede-cli/kaede/grpc/kaede.pb.go on lines 403..419

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

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 _Scheduler_AddTid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(AddTidInput)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in kaede-cli/kaede/grpc/kaede.pb.go and 5 other locations - About 2 hrs to fix
kaede-cli/kaede/grpc/kaede.pb.go on lines 313..329
kaede-cli/kaede/grpc/kaede.pb.go on lines 331..347
kaede-cli/kaede/grpc/kaede.pb.go on lines 349..365
kaede-cli/kaede/grpc/kaede.pb.go on lines 385..401
kaede-cli/kaede/grpc/kaede.pb.go on lines 403..419

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

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 _Scheduler_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(SchedulerStopInput)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in kaede-cli/kaede/grpc/kaede.pb.go and 5 other locations - About 2 hrs to fix
kaede-cli/kaede/grpc/kaede.pb.go on lines 313..329
kaede-cli/kaede/grpc/kaede.pb.go on lines 349..365
kaede-cli/kaede/grpc/kaede.pb.go on lines 367..383
kaede-cli/kaede/grpc/kaede.pb.go on lines 385..401
kaede-cli/kaede/grpc/kaede.pb.go on lines 403..419

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

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 *schedulerClient) AddChannel(ctx context.Context, in *AddChannelInput, opts ...grpc.CallOption) (*AddChannelOutput, error) {
    out := new(AddChannelOutput)
    err := grpc.Invoke(ctx, "/kaede.grpc.Scheduler/AddChannel", in, out, c.cc, opts...)
    if err != nil {
        return nil, err
Severity: Major
Found in kaede-cli/kaede/grpc/kaede.pb.go and 5 other locations - About 40 mins to fix
kaede-cli/kaede/grpc/kaede.pb.go on lines 244..251
kaede-cli/kaede/grpc/kaede.pb.go on lines 253..260
kaede-cli/kaede/grpc/kaede.pb.go on lines 262..269
kaede-cli/kaede/grpc/kaede.pb.go on lines 271..278
kaede-cli/kaede/grpc/kaede.pb.go on lines 280..287

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

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 *schedulerClient) Stop(ctx context.Context, in *SchedulerStopInput, opts ...grpc.CallOption) (*SchedulerStopOutput, error) {
    out := new(SchedulerStopOutput)
    err := grpc.Invoke(ctx, "/kaede.grpc.Scheduler/Stop", in, out, c.cc, opts...)
    if err != nil {
        return nil, err
Severity: Major
Found in kaede-cli/kaede/grpc/kaede.pb.go and 5 other locations - About 40 mins to fix
kaede-cli/kaede/grpc/kaede.pb.go on lines 244..251
kaede-cli/kaede/grpc/kaede.pb.go on lines 262..269
kaede-cli/kaede/grpc/kaede.pb.go on lines 271..278
kaede-cli/kaede/grpc/kaede.pb.go on lines 280..287
kaede-cli/kaede/grpc/kaede.pb.go on lines 289..296

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

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 *schedulerClient) GetPrograms(ctx context.Context, in *GetProgramsInput, opts ...grpc.CallOption) (*GetProgramsOutput, error) {
    out := new(GetProgramsOutput)
    err := grpc.Invoke(ctx, "/kaede.grpc.Scheduler/GetPrograms", in, out, c.cc, opts...)
    if err != nil {
        return nil, err
Severity: Major
Found in kaede-cli/kaede/grpc/kaede.pb.go and 5 other locations - About 40 mins to fix
kaede-cli/kaede/grpc/kaede.pb.go on lines 244..251
kaede-cli/kaede/grpc/kaede.pb.go on lines 253..260
kaede-cli/kaede/grpc/kaede.pb.go on lines 271..278
kaede-cli/kaede/grpc/kaede.pb.go on lines 280..287
kaede-cli/kaede/grpc/kaede.pb.go on lines 289..296

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

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 *schedulerClient) Update(ctx context.Context, in *UpdateInput, opts ...grpc.CallOption) (*UpdateOutput, error) {
    out := new(UpdateOutput)
    err := grpc.Invoke(ctx, "/kaede.grpc.Scheduler/Update", in, out, c.cc, opts...)
    if err != nil {
        return nil, err
Severity: Major
Found in kaede-cli/kaede/grpc/kaede.pb.go and 5 other locations - About 40 mins to fix
kaede-cli/kaede/grpc/kaede.pb.go on lines 244..251
kaede-cli/kaede/grpc/kaede.pb.go on lines 253..260
kaede-cli/kaede/grpc/kaede.pb.go on lines 262..269
kaede-cli/kaede/grpc/kaede.pb.go on lines 271..278
kaede-cli/kaede/grpc/kaede.pb.go on lines 289..296

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

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 *schedulerClient) Reload(ctx context.Context, in *SchedulerReloadInput, opts ...grpc.CallOption) (*SchedulerReloadOutput, error) {
    out := new(SchedulerReloadOutput)
    err := grpc.Invoke(ctx, "/kaede.grpc.Scheduler/Reload", in, out, c.cc, opts...)
    if err != nil {
        return nil, err
Severity: Major
Found in kaede-cli/kaede/grpc/kaede.pb.go and 5 other locations - About 40 mins to fix
kaede-cli/kaede/grpc/kaede.pb.go on lines 253..260
kaede-cli/kaede/grpc/kaede.pb.go on lines 262..269
kaede-cli/kaede/grpc/kaede.pb.go on lines 271..278
kaede-cli/kaede/grpc/kaede.pb.go on lines 280..287
kaede-cli/kaede/grpc/kaede.pb.go on lines 289..296

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

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 *schedulerClient) AddTid(ctx context.Context, in *AddTidInput, opts ...grpc.CallOption) (*AddTidOutput, error) {
    out := new(AddTidOutput)
    err := grpc.Invoke(ctx, "/kaede.grpc.Scheduler/AddTid", in, out, c.cc, opts...)
    if err != nil {
        return nil, err
Severity: Major
Found in kaede-cli/kaede/grpc/kaede.pb.go and 5 other locations - About 40 mins to fix
kaede-cli/kaede/grpc/kaede.pb.go on lines 244..251
kaede-cli/kaede/grpc/kaede.pb.go on lines 253..260
kaede-cli/kaede/grpc/kaede.pb.go on lines 262..269
kaede-cli/kaede/grpc/kaede.pb.go on lines 280..287
kaede-cli/kaede/grpc/kaede.pb.go on lines 289..296

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

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