docker/swarmkit

View on GitHub

Showing 812 of 1,820 total issues

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

func (m *ProcessRaftMessageRequest) Size() (n int) {
    if m == nil {
        return 0
    }
    var l int
Severity: Major
Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
api/dispatcher.pb.go on lines 2989..3000
api/dispatcher.pb.go on lines 3001..3012
api/dispatcher.pb.go on lines 3013..3024
api/dispatcher.pb.go on lines 3025..3036
api/raft.pb.go on lines 2485..2496
api/raft.pb.go on lines 2529..2540
api/raft.pb.go on lines 2609..2620
api/raft.pb.go on lines 2621..2632
api/raft.pb.go on lines 2633..2644
api/raft.pb.go on lines 2645..2656
api/raft.pb.go on lines 2657..2668
api/raft.pb.go on lines 2669..2680
api/raft.pb.go on lines 2681..2692
api/raft.pb.go on lines 2693..2704
api/raft.pb.go on lines 2705..2716
api/raft.pb.go on lines 2717..2728
api/specs.pb.go on lines 3849..3860
api/specs.pb.go on lines 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3985..3996
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/watch.pb.go on lines 2284..2295
api/watch.pb.go on lines 2296..2307
api/watch.pb.go on lines 2308..2319
api/watch.pb.go on lines 2320..2331
api/watch.pb.go on lines 2332..2343
api/watch.pb.go on lines 2344..2355
api/watch.pb.go on lines 2356..2367
api/watch.pb.go on lines 2368..2379
api/watch.pb.go on lines 2380..2391
api/watch.pb.go on lines 2392..2403
api/watch.pb.go on lines 2493..2504
api/watch.pb.go on lines 2505..2516
api/watch.pb.go on lines 2537..2548
protobuf/plugin/plugin.pb.go on lines 585..596

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

func (m *StoreAction_Extension) Size() (n int) {
    if m == nil {
        return 0
    }
    var l int
Severity: Major
Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
api/dispatcher.pb.go on lines 2989..3000
api/dispatcher.pb.go on lines 3001..3012
api/dispatcher.pb.go on lines 3013..3024
api/dispatcher.pb.go on lines 3025..3036
api/raft.pb.go on lines 2485..2496
api/raft.pb.go on lines 2507..2518
api/raft.pb.go on lines 2529..2540
api/raft.pb.go on lines 2609..2620
api/raft.pb.go on lines 2621..2632
api/raft.pb.go on lines 2633..2644
api/raft.pb.go on lines 2645..2656
api/raft.pb.go on lines 2657..2668
api/raft.pb.go on lines 2669..2680
api/raft.pb.go on lines 2681..2692
api/raft.pb.go on lines 2705..2716
api/raft.pb.go on lines 2717..2728
api/specs.pb.go on lines 3849..3860
api/specs.pb.go on lines 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3985..3996
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/watch.pb.go on lines 2284..2295
api/watch.pb.go on lines 2296..2307
api/watch.pb.go on lines 2308..2319
api/watch.pb.go on lines 2320..2331
api/watch.pb.go on lines 2332..2343
api/watch.pb.go on lines 2344..2355
api/watch.pb.go on lines 2356..2367
api/watch.pb.go on lines 2368..2379
api/watch.pb.go on lines 2380..2391
api/watch.pb.go on lines 2392..2403
api/watch.pb.go on lines 2493..2504
api/watch.pb.go on lines 2505..2516
api/watch.pb.go on lines 2537..2548
protobuf/plugin/plugin.pb.go on lines 585..596

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

func (m *LeaveRequest) Size() (n int) {
    if m == nil {
        return 0
    }
    var l int
Severity: Major
Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
api/dispatcher.pb.go on lines 2989..3000
api/dispatcher.pb.go on lines 3001..3012
api/dispatcher.pb.go on lines 3013..3024
api/dispatcher.pb.go on lines 3025..3036
api/raft.pb.go on lines 2507..2518
api/raft.pb.go on lines 2529..2540
api/raft.pb.go on lines 2609..2620
api/raft.pb.go on lines 2621..2632
api/raft.pb.go on lines 2633..2644
api/raft.pb.go on lines 2645..2656
api/raft.pb.go on lines 2657..2668
api/raft.pb.go on lines 2669..2680
api/raft.pb.go on lines 2681..2692
api/raft.pb.go on lines 2693..2704
api/raft.pb.go on lines 2705..2716
api/raft.pb.go on lines 2717..2728
api/specs.pb.go on lines 3849..3860
api/specs.pb.go on lines 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3985..3996
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/watch.pb.go on lines 2284..2295
api/watch.pb.go on lines 2296..2307
api/watch.pb.go on lines 2308..2319
api/watch.pb.go on lines 2320..2331
api/watch.pb.go on lines 2332..2343
api/watch.pb.go on lines 2344..2355
api/watch.pb.go on lines 2356..2367
api/watch.pb.go on lines 2368..2379
api/watch.pb.go on lines 2380..2391
api/watch.pb.go on lines 2392..2403
api/watch.pb.go on lines 2493..2504
api/watch.pb.go on lines 2505..2516
api/watch.pb.go on lines 2537..2548
protobuf/plugin/plugin.pb.go on lines 585..596

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

func (m *StoreAction_Network) Size() (n int) {
    if m == nil {
        return 0
    }
    var l int
Severity: Major
Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
api/dispatcher.pb.go on lines 2989..3000
api/dispatcher.pb.go on lines 3001..3012
api/dispatcher.pb.go on lines 3013..3024
api/dispatcher.pb.go on lines 3025..3036
api/raft.pb.go on lines 2485..2496
api/raft.pb.go on lines 2507..2518
api/raft.pb.go on lines 2529..2540
api/raft.pb.go on lines 2609..2620
api/raft.pb.go on lines 2621..2632
api/raft.pb.go on lines 2633..2644
api/raft.pb.go on lines 2657..2668
api/raft.pb.go on lines 2669..2680
api/raft.pb.go on lines 2681..2692
api/raft.pb.go on lines 2693..2704
api/raft.pb.go on lines 2705..2716
api/raft.pb.go on lines 2717..2728
api/specs.pb.go on lines 3849..3860
api/specs.pb.go on lines 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3985..3996
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/watch.pb.go on lines 2284..2295
api/watch.pb.go on lines 2296..2307
api/watch.pb.go on lines 2308..2319
api/watch.pb.go on lines 2320..2331
api/watch.pb.go on lines 2332..2343
api/watch.pb.go on lines 2344..2355
api/watch.pb.go on lines 2356..2367
api/watch.pb.go on lines 2368..2379
api/watch.pb.go on lines 2380..2391
api/watch.pb.go on lines 2392..2403
api/watch.pb.go on lines 2493..2504
api/watch.pb.go on lines 2505..2516
api/watch.pb.go on lines 2537..2548
protobuf/plugin/plugin.pb.go on lines 585..596

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

func (m *StoreAction_Secret) Size() (n int) {
    if m == nil {
        return 0
    }
    var l int
Severity: Major
Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
api/dispatcher.pb.go on lines 2989..3000
api/dispatcher.pb.go on lines 3001..3012
api/dispatcher.pb.go on lines 3013..3024
api/dispatcher.pb.go on lines 3025..3036
api/raft.pb.go on lines 2485..2496
api/raft.pb.go on lines 2507..2518
api/raft.pb.go on lines 2529..2540
api/raft.pb.go on lines 2609..2620
api/raft.pb.go on lines 2621..2632
api/raft.pb.go on lines 2633..2644
api/raft.pb.go on lines 2645..2656
api/raft.pb.go on lines 2657..2668
api/raft.pb.go on lines 2681..2692
api/raft.pb.go on lines 2693..2704
api/raft.pb.go on lines 2705..2716
api/raft.pb.go on lines 2717..2728
api/specs.pb.go on lines 3849..3860
api/specs.pb.go on lines 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3985..3996
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/watch.pb.go on lines 2284..2295
api/watch.pb.go on lines 2296..2307
api/watch.pb.go on lines 2308..2319
api/watch.pb.go on lines 2320..2331
api/watch.pb.go on lines 2332..2343
api/watch.pb.go on lines 2344..2355
api/watch.pb.go on lines 2356..2367
api/watch.pb.go on lines 2368..2379
api/watch.pb.go on lines 2380..2391
api/watch.pb.go on lines 2392..2403
api/watch.pb.go on lines 2493..2504
api/watch.pb.go on lines 2505..2516
api/watch.pb.go on lines 2537..2548
protobuf/plugin/plugin.pb.go on lines 585..596

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

func (m *ServiceSpec_GlobalJob) Size() (n int) {
    if m == nil {
        return 0
    }
    var l int
Severity: Major
Found in api/specs.pb.go and 37 other locations - About 40 mins to fix
api/dispatcher.pb.go on lines 2989..3000
api/dispatcher.pb.go on lines 3001..3012
api/dispatcher.pb.go on lines 3013..3024
api/dispatcher.pb.go on lines 3025..3036
api/raft.pb.go on lines 2485..2496
api/raft.pb.go on lines 2507..2518
api/raft.pb.go on lines 2529..2540
api/raft.pb.go on lines 2609..2620
api/raft.pb.go on lines 2621..2632
api/raft.pb.go on lines 2633..2644
api/raft.pb.go on lines 2645..2656
api/raft.pb.go on lines 2657..2668
api/raft.pb.go on lines 2669..2680
api/raft.pb.go on lines 2681..2692
api/raft.pb.go on lines 2693..2704
api/raft.pb.go on lines 2705..2716
api/raft.pb.go on lines 2717..2728
api/specs.pb.go on lines 3849..3860
api/specs.pb.go on lines 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3985..3996
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/watch.pb.go on lines 2284..2295
api/watch.pb.go on lines 2296..2307
api/watch.pb.go on lines 2308..2319
api/watch.pb.go on lines 2320..2331
api/watch.pb.go on lines 2332..2343
api/watch.pb.go on lines 2344..2355
api/watch.pb.go on lines 2356..2367
api/watch.pb.go on lines 2368..2379
api/watch.pb.go on lines 2380..2391
api/watch.pb.go on lines 2392..2403
api/watch.pb.go on lines 2493..2504
api/watch.pb.go on lines 2505..2516
api/watch.pb.go on lines 2537..2548
protobuf/plugin/plugin.pb.go on lines 585..596

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

func (m *Object_Task) Size() (n int) {
    if m == nil {
        return 0
    }
    var l int
Severity: Major
Found in api/watch.pb.go and 37 other locations - About 40 mins to fix
api/dispatcher.pb.go on lines 2989..3000
api/dispatcher.pb.go on lines 3001..3012
api/dispatcher.pb.go on lines 3013..3024
api/dispatcher.pb.go on lines 3025..3036
api/raft.pb.go on lines 2485..2496
api/raft.pb.go on lines 2507..2518
api/raft.pb.go on lines 2529..2540
api/raft.pb.go on lines 2609..2620
api/raft.pb.go on lines 2621..2632
api/raft.pb.go on lines 2633..2644
api/raft.pb.go on lines 2645..2656
api/raft.pb.go on lines 2657..2668
api/raft.pb.go on lines 2669..2680
api/raft.pb.go on lines 2681..2692
api/raft.pb.go on lines 2693..2704
api/raft.pb.go on lines 2705..2716
api/raft.pb.go on lines 2717..2728
api/specs.pb.go on lines 3849..3860
api/specs.pb.go on lines 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3985..3996
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/watch.pb.go on lines 2284..2295
api/watch.pb.go on lines 2296..2307
api/watch.pb.go on lines 2308..2319
api/watch.pb.go on lines 2332..2343
api/watch.pb.go on lines 2344..2355
api/watch.pb.go on lines 2356..2367
api/watch.pb.go on lines 2368..2379
api/watch.pb.go on lines 2380..2391
api/watch.pb.go on lines 2392..2403
api/watch.pb.go on lines 2493..2504
api/watch.pb.go on lines 2505..2516
api/watch.pb.go on lines 2537..2548
protobuf/plugin/plugin.pb.go on lines 585..596

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

func (m *StoreAction_Cluster) Size() (n int) {
    if m == nil {
        return 0
    }
    var l int
Severity: Major
Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
api/dispatcher.pb.go on lines 2989..3000
api/dispatcher.pb.go on lines 3001..3012
api/dispatcher.pb.go on lines 3013..3024
api/dispatcher.pb.go on lines 3025..3036
api/raft.pb.go on lines 2485..2496
api/raft.pb.go on lines 2507..2518
api/raft.pb.go on lines 2529..2540
api/raft.pb.go on lines 2609..2620
api/raft.pb.go on lines 2621..2632
api/raft.pb.go on lines 2633..2644
api/raft.pb.go on lines 2645..2656
api/raft.pb.go on lines 2669..2680
api/raft.pb.go on lines 2681..2692
api/raft.pb.go on lines 2693..2704
api/raft.pb.go on lines 2705..2716
api/raft.pb.go on lines 2717..2728
api/specs.pb.go on lines 3849..3860
api/specs.pb.go on lines 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3985..3996
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/watch.pb.go on lines 2284..2295
api/watch.pb.go on lines 2296..2307
api/watch.pb.go on lines 2308..2319
api/watch.pb.go on lines 2320..2331
api/watch.pb.go on lines 2332..2343
api/watch.pb.go on lines 2344..2355
api/watch.pb.go on lines 2356..2367
api/watch.pb.go on lines 2368..2379
api/watch.pb.go on lines 2380..2391
api/watch.pb.go on lines 2392..2403
api/watch.pb.go on lines 2493..2504
api/watch.pb.go on lines 2505..2516
api/watch.pb.go on lines 2537..2548
protobuf/plugin/plugin.pb.go on lines 585..596

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

func (m *StoreAction_Config) Size() (n int) {
    if m == nil {
        return 0
    }
    var l int
Severity: Major
Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
api/dispatcher.pb.go on lines 2989..3000
api/dispatcher.pb.go on lines 3001..3012
api/dispatcher.pb.go on lines 3013..3024
api/dispatcher.pb.go on lines 3025..3036
api/raft.pb.go on lines 2485..2496
api/raft.pb.go on lines 2507..2518
api/raft.pb.go on lines 2529..2540
api/raft.pb.go on lines 2609..2620
api/raft.pb.go on lines 2621..2632
api/raft.pb.go on lines 2633..2644
api/raft.pb.go on lines 2645..2656
api/raft.pb.go on lines 2657..2668
api/raft.pb.go on lines 2669..2680
api/raft.pb.go on lines 2681..2692
api/raft.pb.go on lines 2693..2704
api/raft.pb.go on lines 2717..2728
api/specs.pb.go on lines 3849..3860
api/specs.pb.go on lines 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3985..3996
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/watch.pb.go on lines 2284..2295
api/watch.pb.go on lines 2296..2307
api/watch.pb.go on lines 2308..2319
api/watch.pb.go on lines 2320..2331
api/watch.pb.go on lines 2332..2343
api/watch.pb.go on lines 2344..2355
api/watch.pb.go on lines 2356..2367
api/watch.pb.go on lines 2368..2379
api/watch.pb.go on lines 2380..2391
api/watch.pb.go on lines 2392..2403
api/watch.pb.go on lines 2493..2504
api/watch.pb.go on lines 2505..2516
api/watch.pb.go on lines 2537..2548
protobuf/plugin/plugin.pb.go on lines 585..596

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

func (c *nodeCAClient) NodeCertificateStatus(ctx context.Context, in *NodeCertificateStatusRequest, opts ...grpc.CallOption) (*NodeCertificateStatusResponse, error) {
    out := new(NodeCertificateStatusResponse)
    err := c.cc.Invoke(ctx, "/docker.swarmkit.v1.NodeCA/NodeCertificateStatus", in, out, opts...)
    if err != nil {
        return nil, err
Severity: Major
Found in api/ca.pb.go and 13 other locations - About 35 mins to fix
api/ca.pb.go on lines 599..606
api/ca.pb.go on lines 608..615
api/ca.pb.go on lines 709..716
api/dispatcher.pb.go on lines 1416..1423
api/dispatcher.pb.go on lines 1425..1432
api/dispatcher.pb.go on lines 1434..1441
api/health.pb.go on lines 245..252
api/raft.pb.go on lines 1140..1147
api/raft.pb.go on lines 1183..1190
api/raft.pb.go on lines 1328..1335
api/raft.pb.go on lines 1337..1344
api/resource.pb.go on lines 335..342
api/resource.pb.go on lines 344..351

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

func (c *raftClient) ProcessRaftMessage(ctx context.Context, in *ProcessRaftMessageRequest, opts ...grpc.CallOption) (*ProcessRaftMessageResponse, error) {
    out := new(ProcessRaftMessageResponse)
    err := c.cc.Invoke(ctx, "/docker.swarmkit.v1.Raft/ProcessRaftMessage", in, out, opts...)
    if err != nil {
        return nil, err
Severity: Major
Found in api/raft.pb.go and 13 other locations - About 35 mins to fix
api/ca.pb.go on lines 599..606
api/ca.pb.go on lines 608..615
api/ca.pb.go on lines 709..716
api/ca.pb.go on lines 718..725
api/dispatcher.pb.go on lines 1416..1423
api/dispatcher.pb.go on lines 1425..1432
api/dispatcher.pb.go on lines 1434..1441
api/health.pb.go on lines 245..252
api/raft.pb.go on lines 1183..1190
api/raft.pb.go on lines 1328..1335
api/raft.pb.go on lines 1337..1344
api/resource.pb.go on lines 335..342
api/resource.pb.go on lines 344..351

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

func encodeVarintWatch(dAtA []byte, offset int, v uint64) int {
    offset -= sovWatch(v)
    base := offset
    for v >= 1<<7 {
        dAtA[offset] = uint8(v&0x7f | 0x80)
Severity: Major
Found in api/watch.pb.go and 10 other locations - About 35 mins to fix
api/ca.pb.go on lines 1076..1086
api/dispatcher.pb.go on lines 2431..2441
api/health.pb.go on lines 360..370
api/logbroker.pb.go on lines 1704..1714
api/objects.pb.go on lines 2619..2629
api/raft.pb.go on lines 2074..2084
api/resource.pb.go on lines 552..562
api/snapshot.pb.go on lines 616..626
api/specs.pb.go on lines 3784..3794
protobuf/plugin/plugin.pb.go on lines 526..536

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

func (c *nodeCAClient) IssueNodeCertificate(ctx context.Context, in *IssueNodeCertificateRequest, opts ...grpc.CallOption) (*IssueNodeCertificateResponse, error) {
    out := new(IssueNodeCertificateResponse)
    err := c.cc.Invoke(ctx, "/docker.swarmkit.v1.NodeCA/IssueNodeCertificate", in, out, opts...)
    if err != nil {
        return nil, err
Severity: Major
Found in api/ca.pb.go and 13 other locations - About 35 mins to fix
api/ca.pb.go on lines 599..606
api/ca.pb.go on lines 608..615
api/ca.pb.go on lines 718..725
api/dispatcher.pb.go on lines 1416..1423
api/dispatcher.pb.go on lines 1425..1432
api/dispatcher.pb.go on lines 1434..1441
api/health.pb.go on lines 245..252
api/raft.pb.go on lines 1140..1147
api/raft.pb.go on lines 1183..1190
api/raft.pb.go on lines 1328..1335
api/raft.pb.go on lines 1337..1344
api/resource.pb.go on lines 335..342
api/resource.pb.go on lines 344..351

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

func encodeVarintDispatcher(dAtA []byte, offset int, v uint64) int {
    offset -= sovDispatcher(v)
    base := offset
    for v >= 1<<7 {
        dAtA[offset] = uint8(v&0x7f | 0x80)
Severity: Major
Found in api/dispatcher.pb.go and 10 other locations - About 35 mins to fix
api/ca.pb.go on lines 1076..1086
api/health.pb.go on lines 360..370
api/logbroker.pb.go on lines 1704..1714
api/objects.pb.go on lines 2619..2629
api/raft.pb.go on lines 2074..2084
api/resource.pb.go on lines 552..562
api/snapshot.pb.go on lines 616..626
api/specs.pb.go on lines 3784..3794
api/watch.pb.go on lines 2137..2147
protobuf/plugin/plugin.pb.go on lines 526..536

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

func (c *raftClient) ResolveAddress(ctx context.Context, in *ResolveAddressRequest, opts ...grpc.CallOption) (*ResolveAddressResponse, error) {
    out := new(ResolveAddressResponse)
    err := c.cc.Invoke(ctx, "/docker.swarmkit.v1.Raft/ResolveAddress", in, out, opts...)
    if err != nil {
        return nil, err
Severity: Major
Found in api/raft.pb.go and 13 other locations - About 35 mins to fix
api/ca.pb.go on lines 599..606
api/ca.pb.go on lines 608..615
api/ca.pb.go on lines 709..716
api/ca.pb.go on lines 718..725
api/dispatcher.pb.go on lines 1416..1423
api/dispatcher.pb.go on lines 1425..1432
api/dispatcher.pb.go on lines 1434..1441
api/health.pb.go on lines 245..252
api/raft.pb.go on lines 1140..1147
api/raft.pb.go on lines 1328..1335
api/raft.pb.go on lines 1337..1344
api/resource.pb.go on lines 335..342
api/resource.pb.go on lines 344..351

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

func (this *SelectBySlot) String() string {
    if this == nil {
        return "nil"
    }
    s := strings.Join([]string{`&SelectBySlot{`,
Severity: Major
Found in api/watch.pb.go and 7 other locations - About 35 mins to fix
api/ca.pb.go on lines 1527..1537
api/dispatcher.pb.go on lines 3192..3202
api/logbroker.pb.go on lines 2275..2285
api/objects.pb.go on lines 6088..6098
api/raft.pb.go on lines 2869..2879
api/specs.pb.go on lines 4544..4554
api/specs.pb.go on lines 4621..4631

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

func (c *resourceAllocatorClient) DetachNetwork(ctx context.Context, in *DetachNetworkRequest, opts ...grpc.CallOption) (*DetachNetworkResponse, error) {
    out := new(DetachNetworkResponse)
    err := c.cc.Invoke(ctx, "/docker.swarmkit.v1.ResourceAllocator/DetachNetwork", in, out, opts...)
    if err != nil {
        return nil, err
Severity: Major
Found in api/resource.pb.go and 13 other locations - About 35 mins to fix
api/ca.pb.go on lines 599..606
api/ca.pb.go on lines 608..615
api/ca.pb.go on lines 709..716
api/ca.pb.go on lines 718..725
api/dispatcher.pb.go on lines 1416..1423
api/dispatcher.pb.go on lines 1425..1432
api/dispatcher.pb.go on lines 1434..1441
api/health.pb.go on lines 245..252
api/raft.pb.go on lines 1140..1147
api/raft.pb.go on lines 1183..1190
api/raft.pb.go on lines 1328..1335
api/raft.pb.go on lines 1337..1344
api/resource.pb.go on lines 335..342

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

func (c *dispatcherClient) Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error) {
    out := new(HeartbeatResponse)
    err := c.cc.Invoke(ctx, "/docker.swarmkit.v1.Dispatcher/Heartbeat", in, out, opts...)
    if err != nil {
        return nil, err
Severity: Major
Found in api/dispatcher.pb.go and 13 other locations - About 35 mins to fix
api/ca.pb.go on lines 599..606
api/ca.pb.go on lines 608..615
api/ca.pb.go on lines 709..716
api/ca.pb.go on lines 718..725
api/dispatcher.pb.go on lines 1425..1432
api/dispatcher.pb.go on lines 1434..1441
api/health.pb.go on lines 245..252
api/raft.pb.go on lines 1140..1147
api/raft.pb.go on lines 1183..1190
api/raft.pb.go on lines 1328..1335
api/raft.pb.go on lines 1337..1344
api/resource.pb.go on lines 335..342
api/resource.pb.go on lines 344..351

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

func encodeVarintObjects(dAtA []byte, offset int, v uint64) int {
    offset -= sovObjects(v)
    base := offset
    for v >= 1<<7 {
        dAtA[offset] = uint8(v&0x7f | 0x80)
Severity: Major
Found in api/objects.pb.go and 10 other locations - About 35 mins to fix
api/ca.pb.go on lines 1076..1086
api/dispatcher.pb.go on lines 2431..2441
api/health.pb.go on lines 360..370
api/logbroker.pb.go on lines 1704..1714
api/raft.pb.go on lines 2074..2084
api/resource.pb.go on lines 552..562
api/snapshot.pb.go on lines 616..626
api/specs.pb.go on lines 3784..3794
api/watch.pb.go on lines 2137..2147
protobuf/plugin/plugin.pb.go on lines 526..536

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

func (this *StoreAction) String() string {
    if this == nil {
        return "nil"
    }
    s := strings.Join([]string{`&StoreAction{`,
Severity: Major
Found in api/raft.pb.go and 7 other locations - About 35 mins to fix
api/ca.pb.go on lines 1527..1537
api/dispatcher.pb.go on lines 3192..3202
api/logbroker.pb.go on lines 2275..2285
api/objects.pb.go on lines 6088..6098
api/specs.pb.go on lines 4544..4554
api/specs.pb.go on lines 4621..4631
api/watch.pb.go on lines 2815..2825

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

Severity
Category
Status
Source
Language