docker/swarmkit

View on GitHub

Showing 1,820 of 1,820 total issues

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

        case 8:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType)
            }
            var msglen int
Severity: Major
Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 8:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
            }
            var msglen int
Severity: Major
Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 9:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType)
            }
            var msglen int
Severity: Major
Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 1:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType)
            }
            var msglen int
Severity: Major
Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 3:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
            }
            var msglen int
Severity: Major
Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 11:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field GlobalJob", wireType)
            }
            var msglen int
Severity: Major
Found in api/specs.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 8:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Attachment", wireType)
            }
            var msglen int
Severity: Major
Found in api/specs.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 4:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType)
            }
            var msglen int
Severity: Major
Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 10:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
            }
            var msglen int
Severity: Major
Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 4:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType)
            }
            var msglen int
Severity: Major
Found in api/dispatcher.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 4:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Global", wireType)
            }
            var msglen int
Severity: Major
Found in api/specs.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 2:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
            }
            var msglen int
Severity: Major
Found in api/dispatcher.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 5:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType)
            }
            var msglen int
Severity: Major
Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 9:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType)
            }
            var msglen int
Severity: Major
Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951

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

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

        case 5:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
            }
            var msglen int
Severity: Major
Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 6:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType)
            }
            var msglen int
Severity: Major
Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 10:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType)
            }
            var msglen int
Severity: Major
Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 1:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
            }
            var msglen int
Severity: Major
Found in api/specs.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 2:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
            }
            var msglen int
Severity: Major
Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3387..3421
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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

        case 9:
            if wireType != 2 {
                return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
            }
            var msglen int
Severity: Major
Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
api/dispatcher.pb.go on lines 4666..4700
api/dispatcher.pb.go on lines 4701..4735
api/dispatcher.pb.go on lines 4736..4770
api/dispatcher.pb.go on lines 4771..4805
api/raft.pb.go on lines 4125..4159
api/raft.pb.go on lines 4160..4194
api/raft.pb.go on lines 4195..4229
api/raft.pb.go on lines 4230..4264
api/raft.pb.go on lines 4265..4299
api/raft.pb.go on lines 4300..4334
api/raft.pb.go on lines 4335..4369
api/raft.pb.go on lines 4370..4404
api/raft.pb.go on lines 4405..4439
api/raft.pb.go on lines 4440..4474
api/specs.pb.go on lines 5131..5165
api/specs.pb.go on lines 5166..5200
api/specs.pb.go on lines 5343..5377
api/specs.pb.go on lines 5378..5412
api/specs.pb.go on lines 5720..5754
api/specs.pb.go on lines 5933..5967
api/specs.pb.go on lines 5987..6021
api/watch.pb.go on lines 3107..3141
api/watch.pb.go on lines 3142..3176
api/watch.pb.go on lines 3177..3211
api/watch.pb.go on lines 3212..3246
api/watch.pb.go on lines 3247..3281
api/watch.pb.go on lines 3282..3316
api/watch.pb.go on lines 3317..3351
api/watch.pb.go on lines 3352..3386
api/watch.pb.go on lines 3422..3456
api/watch.pb.go on lines 3882..3916
api/watch.pb.go on lines 3917..3951
api/watch.pb.go on lines 4016..4050

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

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