docker/swarmkit

View on GitHub

Showing 1,820 of 1,820 total issues

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 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3897..3908
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/specs.pb.go on lines 4021..4032
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_Global) 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 3861..3872
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3897..3908
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/specs.pb.go on lines 4021..4032
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_Service) 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 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 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3897..3908
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/specs.pb.go on lines 4021..4032
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_ReplicatedJob) 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 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3897..3908
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/specs.pb.go on lines 4021..4032
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_Extension) 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 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3897..3908
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/specs.pb.go on lines 4021..4032
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 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_Task) 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 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 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3897..3908
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/specs.pb.go on lines 4021..4032
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 *StoreObject) Size() (n int) {
    if m == nil {
        return 0
    }
    var l int
Severity: Major
Found in protobuf/plugin/plugin.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 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3897..3908
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/specs.pb.go on lines 4021..4032
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

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 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3897..3908
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/specs.pb.go on lines 4021..4032
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 *TaskSpec_Generic) 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 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3897..3908
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 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3897..3908
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/specs.pb.go on lines 4021..4032
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 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3897..3908
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/specs.pb.go on lines 4021..4032
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_Volume) 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 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3897..3908
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/specs.pb.go on lines 4021..4032
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 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_Resource) 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 2693..2704
api/raft.pb.go on lines 2705..2716
api/raft.pb.go on lines 2717..2728
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 3897..3908
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/specs.pb.go on lines 4021..4032
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 *SelectBy_Slot) 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 3861..3872
api/specs.pb.go on lines 3873..3884
api/specs.pb.go on lines 3885..3896
api/specs.pb.go on lines 3897..3908
api/specs.pb.go on lines 3997..4008
api/specs.pb.go on lines 4009..4020
api/specs.pb.go on lines 4021..4032
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
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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        in := &api.Network{
            ID: "ingress-nw-id",
            Spec: api.NetworkSpec{
                Annotations: api.Annotations{
                    Name: "default-ingress",
Severity: Minor
Found in manager/allocator/allocator_test_suite.go and 1 other location - About 40 mins to fix
manager/allocator/allocator_test_suite.go on lines 743..760

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        in := &api.Network{
            ID: "ingress-nw-id",
            Spec: api.NetworkSpec{
                Annotations: api.Annotations{
                    Name: "default-ingress",
Severity: Minor
Found in manager/allocator/allocator_test_suite.go and 1 other location - About 40 mins to fix
manager/allocator/allocator_test_suite.go on lines 1029..1046

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

type NodeCAClient interface {
    IssueNodeCertificate(ctx context.Context, in *IssueNodeCertificateRequest, opts ...grpc.CallOption) (*IssueNodeCertificateResponse, error)
    NodeCertificateStatus(ctx context.Context, in *NodeCertificateStatusRequest, opts ...grpc.CallOption) (*NodeCertificateStatusResponse, error)
}
Severity: Minor
Found in api/ca.pb.go and 1 other location - About 40 mins to fix
api/resource.pb.go on lines 322..325

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

type ResourceAllocatorClient interface {
    AttachNetwork(ctx context.Context, in *AttachNetworkRequest, opts ...grpc.CallOption) (*AttachNetworkResponse, error)
    DetachNetwork(ctx context.Context, in *DetachNetworkRequest, opts ...grpc.CallOption) (*DetachNetworkResponse, error)
}
Severity: Minor
Found in api/resource.pb.go and 1 other location - About 40 mins to fix
api/ca.pb.go on lines 696..699

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

Function newSession has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

func newSession(ctx context.Context, agent *Agent, delay time.Duration, sessionID string, description *api.NodeDescription) *session {
Severity: Minor
Found in agent/session.go - About 35 mins to fix

    Function updateRootThenUpdateCert has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    func updateRootThenUpdateCert(ctx context.Context, s *SecurityConfig, connBroker *connectionbroker.Broker, rootPaths CertPaths, failedCert *x509.Certificate) (*tls.Certificate, *IssuerInfo, error) {
    Severity: Minor
    Found in ca/config.go - About 35 mins to fix
      Severity
      Category
      Status
      Source
      Language