docker/swarmkit

View on GitHub

Showing 1,820 of 1,820 total issues

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

func (m *VolumeSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_VolumeSpec.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/specs.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *WatchSelectors) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_WatchSelectors.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in protobuf/plugin/plugin.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *LogSubscriptionOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_LogSubscriptionOptions.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/logbroker.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *GlobalService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_GlobalService.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/specs.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *SelectByCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_SelectByCustom.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/watch.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *WatchMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_WatchMessage.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/watch.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *SelectBy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_SelectBy.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/watch.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *WatchMessage_Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_WatchMessage_Event.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/watch.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *Volume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_Volume.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/objects.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *GenericRuntimeSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_GenericRuntimeSpec.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/specs.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *ContainerSpec_DNSConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_ContainerSpec_DNSConfig.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/specs.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *SecretSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_SecretSpec.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/specs.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *WatchRequest_WatchEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_WatchRequest_WatchEntry.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/watch.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *ProcessRaftMessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_ProcessRaftMessageResponse.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *NetworkAttachmentSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_NetworkAttachmentSpec.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/specs.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *StoreObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_StoreObject.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in protobuf/plugin/plugin.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *LogMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_LogMessage.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/logbroker.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *ServiceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_ServiceSpec.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/specs.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *ProcessRaftMessageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_ProcessRaftMessageRequest.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/raft.pb.go on lines 547..558
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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

func (m *StoreAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    if deterministic {
        return xxx_messageInfo_StoreAction.Marshal(b, m, deterministic)
    } else {
        b = b[:cap(b)]
Severity: Major
Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
api/ca.pb.go on lines 50..61
api/ca.pb.go on lines 87..98
api/ca.pb.go on lines 131..142
api/ca.pb.go on lines 168..179
api/ca.pb.go on lines 203..214
api/ca.pb.go on lines 239..250
api/ca.pb.go on lines 274..285
api/ca.pb.go on lines 311..322
api/dispatcher.pb.go on lines 112..123
api/dispatcher.pb.go on lines 202..213
api/dispatcher.pb.go on lines 239..250
api/dispatcher.pb.go on lines 277..288
api/dispatcher.pb.go on lines 316..327
api/dispatcher.pb.go on lines 355..366
api/dispatcher.pb.go on lines 390..401
api/dispatcher.pb.go on lines 427..438
api/dispatcher.pb.go on lines 476..487
api/dispatcher.pb.go on lines 511..522
api/dispatcher.pb.go on lines 547..558
api/dispatcher.pb.go on lines 585..596
api/dispatcher.pb.go on lines 621..632
api/dispatcher.pb.go on lines 662..673
api/dispatcher.pb.go on lines 768..779
api/dispatcher.pb.go on lines 816..827
api/health.pb.go on lines 77..88
api/health.pb.go on lines 113..124
api/logbroker.pb.go on lines 105..116
api/logbroker.pb.go on lines 148..159
api/logbroker.pb.go on lines 187..198
api/logbroker.pb.go on lines 225..236
api/logbroker.pb.go on lines 273..284
api/logbroker.pb.go on lines 311..322
api/logbroker.pb.go on lines 347..358
api/logbroker.pb.go on lines 384..395
api/logbroker.pb.go on lines 432..443
api/logbroker.pb.go on lines 477..488
api/logbroker.pb.go on lines 512..523
api/objects.pb.go on lines 51..62
api/objects.pb.go on lines 123..134
api/objects.pb.go on lines 190..201
api/objects.pb.go on lines 235..246
api/objects.pb.go on lines 283..294
api/objects.pb.go on lines 382..393
api/objects.pb.go on lines 430..441
api/objects.pb.go on lines 486..497
api/objects.pb.go on lines 558..569
api/objects.pb.go on lines 602..613
api/objects.pb.go on lines 644..655
api/objects.pb.go on lines 692..703
api/objects.pb.go on lines 733..744
api/objects.pb.go on lines 790..801
api/raft.pb.go on lines 90..101
api/raft.pb.go on lines 127..138
api/raft.pb.go on lines 169..180
api/raft.pb.go on lines 205..216
api/raft.pb.go on lines 240..251
api/raft.pb.go on lines 276..287
api/raft.pb.go on lines 311..322
api/raft.pb.go on lines 348..359
api/raft.pb.go on lines 384..395
api/raft.pb.go on lines 421..432
api/raft.pb.go on lines 458..469
api/raft.pb.go on lines 498..509
api/resource.pb.go on lines 51..62
api/resource.pb.go on lines 87..98
api/resource.pb.go on lines 123..134
api/resource.pb.go on lines 158..169
api/snapshot.pb.go on lines 73..84
api/snapshot.pb.go on lines 111..122
api/snapshot.pb.go on lines 149..160
api/specs.pb.go on lines 211..222
api/specs.pb.go on lines 274..285
api/specs.pb.go on lines 380..391
api/specs.pb.go on lines 416..427
api/specs.pb.go on lines 461..472
api/specs.pb.go on lines 498..509
api/specs.pb.go on lines 565..576
api/specs.pb.go on lines 659..670
api/specs.pb.go on lines 696..707
api/specs.pb.go on lines 736..747
api/specs.pb.go on lines 891..902
api/specs.pb.go on lines 932..943
api/specs.pb.go on lines 977..988
api/specs.pb.go on lines 1015..1026
api/specs.pb.go on lines 1056..1067
api/specs.pb.go on lines 1119..1130
api/specs.pb.go on lines 1205..1216
api/specs.pb.go on lines 1252..1263
api/specs.pb.go on lines 1299..1310
api/specs.pb.go on lines 1376..1387
api/watch.pb.go on lines 95..106
api/watch.pb.go on lines 275..286
api/watch.pb.go on lines 313..324
api/watch.pb.go on lines 370..381
api/watch.pb.go on lines 633..644
api/watch.pb.go on lines 677..688
api/watch.pb.go on lines 719..730
api/watch.pb.go on lines 764..775
protobuf/plugin/plugin.pb.go on lines 58..69
protobuf/plugin/plugin.pb.go on lines 94..105
protobuf/plugin/plugin.pb.go on lines 135..146

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

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