docker/swarmkit

View on GitHub

Showing 812 of 1,820 total issues

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

func (m *TaskSpec_Generic) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    i := len(dAtA)
    if m.Generic != nil {
        {
            size, err := m.Generic.MarshalToSizedBuffer(dAtA[:i])
Severity: Major
Found in api/specs.pb.go and 33 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 2256..2271
api/dispatcher.pb.go on lines 2277..2292
api/dispatcher.pb.go on lines 2298..2313
api/dispatcher.pb.go on lines 2319..2334
api/raft.pb.go on lines 1869..1884
api/raft.pb.go on lines 1890..1905
api/raft.pb.go on lines 1911..1926
api/raft.pb.go on lines 1932..1947
api/raft.pb.go on lines 1953..1968
api/raft.pb.go on lines 1974..1989
api/raft.pb.go on lines 1995..2010
api/raft.pb.go on lines 2016..2031
api/raft.pb.go on lines 2037..2052
api/raft.pb.go on lines 2058..2073
api/specs.pb.go on lines 2355..2370
api/specs.pb.go on lines 2376..2391
api/specs.pb.go on lines 2397..2412
api/specs.pb.go on lines 2418..2433
api/specs.pb.go on lines 2659..2674
api/specs.pb.go on lines 2680..2695
api/watch.pb.go on lines 1371..1386
api/watch.pb.go on lines 1392..1407
api/watch.pb.go on lines 1413..1428
api/watch.pb.go on lines 1434..1449
api/watch.pb.go on lines 1455..1470
api/watch.pb.go on lines 1476..1491
api/watch.pb.go on lines 1497..1512
api/watch.pb.go on lines 1518..1533
api/watch.pb.go on lines 1539..1554
api/watch.pb.go on lines 1560..1575
api/watch.pb.go on lines 1748..1763
api/watch.pb.go on lines 1769..1784
api/watch.pb.go on lines 1818..1833

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

func (m *StoreAction_Service) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    i := len(dAtA)
    if m.Service != nil {
        {
            size, err := m.Service.MarshalToSizedBuffer(dAtA[:i])
Severity: Major
Found in api/raft.pb.go and 33 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 2256..2271
api/dispatcher.pb.go on lines 2277..2292
api/dispatcher.pb.go on lines 2298..2313
api/dispatcher.pb.go on lines 2319..2334
api/raft.pb.go on lines 1869..1884
api/raft.pb.go on lines 1911..1926
api/raft.pb.go on lines 1932..1947
api/raft.pb.go on lines 1953..1968
api/raft.pb.go on lines 1974..1989
api/raft.pb.go on lines 1995..2010
api/raft.pb.go on lines 2016..2031
api/raft.pb.go on lines 2037..2052
api/raft.pb.go on lines 2058..2073
api/specs.pb.go on lines 2355..2370
api/specs.pb.go on lines 2376..2391
api/specs.pb.go on lines 2397..2412
api/specs.pb.go on lines 2418..2433
api/specs.pb.go on lines 2659..2674
api/specs.pb.go on lines 2680..2695
api/specs.pb.go on lines 2701..2716
api/watch.pb.go on lines 1371..1386
api/watch.pb.go on lines 1392..1407
api/watch.pb.go on lines 1413..1428
api/watch.pb.go on lines 1434..1449
api/watch.pb.go on lines 1455..1470
api/watch.pb.go on lines 1476..1491
api/watch.pb.go on lines 1497..1512
api/watch.pb.go on lines 1518..1533
api/watch.pb.go on lines 1539..1554
api/watch.pb.go on lines 1560..1575
api/watch.pb.go on lines 1748..1763
api/watch.pb.go on lines 1769..1784
api/watch.pb.go on lines 1818..1833

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

func (m *StoreAction_Task) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    i := len(dAtA)
    if m.Task != nil {
        {
            size, err := m.Task.MarshalToSizedBuffer(dAtA[:i])
Severity: Major
Found in api/raft.pb.go and 33 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 2256..2271
api/dispatcher.pb.go on lines 2277..2292
api/dispatcher.pb.go on lines 2298..2313
api/dispatcher.pb.go on lines 2319..2334
api/raft.pb.go on lines 1869..1884
api/raft.pb.go on lines 1890..1905
api/raft.pb.go on lines 1932..1947
api/raft.pb.go on lines 1953..1968
api/raft.pb.go on lines 1974..1989
api/raft.pb.go on lines 1995..2010
api/raft.pb.go on lines 2016..2031
api/raft.pb.go on lines 2037..2052
api/raft.pb.go on lines 2058..2073
api/specs.pb.go on lines 2355..2370
api/specs.pb.go on lines 2376..2391
api/specs.pb.go on lines 2397..2412
api/specs.pb.go on lines 2418..2433
api/specs.pb.go on lines 2659..2674
api/specs.pb.go on lines 2680..2695
api/specs.pb.go on lines 2701..2716
api/watch.pb.go on lines 1371..1386
api/watch.pb.go on lines 1392..1407
api/watch.pb.go on lines 1413..1428
api/watch.pb.go on lines 1434..1449
api/watch.pb.go on lines 1455..1470
api/watch.pb.go on lines 1476..1491
api/watch.pb.go on lines 1497..1512
api/watch.pb.go on lines 1518..1533
api/watch.pb.go on lines 1539..1554
api/watch.pb.go on lines 1560..1575
api/watch.pb.go on lines 1748..1763
api/watch.pb.go on lines 1769..1784
api/watch.pb.go on lines 1818..1833

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

func (m *StoreAction_Secret) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    i := len(dAtA)
    if m.Secret != nil {
        {
            size, err := m.Secret.MarshalToSizedBuffer(dAtA[:i])
Severity: Major
Found in api/raft.pb.go and 33 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 2256..2271
api/dispatcher.pb.go on lines 2277..2292
api/dispatcher.pb.go on lines 2298..2313
api/dispatcher.pb.go on lines 2319..2334
api/raft.pb.go on lines 1869..1884
api/raft.pb.go on lines 1890..1905
api/raft.pb.go on lines 1911..1926
api/raft.pb.go on lines 1932..1947
api/raft.pb.go on lines 1953..1968
api/raft.pb.go on lines 1995..2010
api/raft.pb.go on lines 2016..2031
api/raft.pb.go on lines 2037..2052
api/raft.pb.go on lines 2058..2073
api/specs.pb.go on lines 2355..2370
api/specs.pb.go on lines 2376..2391
api/specs.pb.go on lines 2397..2412
api/specs.pb.go on lines 2418..2433
api/specs.pb.go on lines 2659..2674
api/specs.pb.go on lines 2680..2695
api/specs.pb.go on lines 2701..2716
api/watch.pb.go on lines 1371..1386
api/watch.pb.go on lines 1392..1407
api/watch.pb.go on lines 1413..1428
api/watch.pb.go on lines 1434..1449
api/watch.pb.go on lines 1455..1470
api/watch.pb.go on lines 1476..1491
api/watch.pb.go on lines 1497..1512
api/watch.pb.go on lines 1518..1533
api/watch.pb.go on lines 1539..1554
api/watch.pb.go on lines 1560..1575
api/watch.pb.go on lines 1748..1763
api/watch.pb.go on lines 1769..1784
api/watch.pb.go on lines 1818..1833

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

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

        case 18:
            if wireType != 0 {
                return fmt.Errorf("proto: wrong wireType = %d for field OpenStdin", wireType)
            }
            var v int
Severity: Major
Found in api/specs.pb.go and 16 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 4298..4317
api/logbroker.pb.go on lines 2485..2504
api/logbroker.pb.go on lines 3582..3601
api/logbroker.pb.go on lines 3718..3737
api/objects.pb.go on lines 7083..7102
api/objects.pb.go on lines 8571..8590
api/objects.pb.go on lines 8988..9007
api/objects.pb.go on lines 9226..9245
api/objects.pb.go on lines 10008..10027
api/specs.pb.go on lines 6898..6917
api/specs.pb.go on lines 7074..7093
api/specs.pb.go on lines 8084..8103
api/specs.pb.go on lines 8104..8123
api/specs.pb.go on lines 8160..8179
api/specs.pb.go on lines 8180..8199
api/watch.pb.go on lines 4359..4378

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

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

        case 3:
            if wireType != 0 {
                return fmt.Errorf("proto: wrong wireType = %d for field IncludeOldObject", wireType)
            }
            var v int
Severity: Major
Found in api/watch.pb.go and 16 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 4298..4317
api/logbroker.pb.go on lines 2485..2504
api/logbroker.pb.go on lines 3582..3601
api/logbroker.pb.go on lines 3718..3737
api/objects.pb.go on lines 7083..7102
api/objects.pb.go on lines 8571..8590
api/objects.pb.go on lines 8988..9007
api/objects.pb.go on lines 9226..9245
api/objects.pb.go on lines 10008..10027
api/specs.pb.go on lines 6898..6917
api/specs.pb.go on lines 7054..7073
api/specs.pb.go on lines 7074..7093
api/specs.pb.go on lines 8084..8103
api/specs.pb.go on lines 8104..8123
api/specs.pb.go on lines 8160..8179
api/specs.pb.go on lines 8180..8199

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

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

func (m *WatchMessage_Event) CopyFrom(src interface{}) {

    o := src.(*WatchMessage_Event)
    *m = *o
    if o.Object != nil {
Severity: Major
Found in api/watch.pb.go and 3 other locations - About 1 hr to fix
api/ca.pb.go on lines 466..478
api/logbroker.pb.go on lines 793..805
api/logbroker.pb.go on lines 848..860

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

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

        case 19:
            if wireType != 0 {
                return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
            }
            var v int
Severity: Major
Found in api/specs.pb.go and 16 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 4298..4317
api/logbroker.pb.go on lines 2485..2504
api/logbroker.pb.go on lines 3582..3601
api/logbroker.pb.go on lines 3718..3737
api/objects.pb.go on lines 7083..7102
api/objects.pb.go on lines 8571..8590
api/objects.pb.go on lines 8988..9007
api/objects.pb.go on lines 9226..9245
api/objects.pb.go on lines 10008..10027
api/specs.pb.go on lines 6898..6917
api/specs.pb.go on lines 7054..7073
api/specs.pb.go on lines 8084..8103
api/specs.pb.go on lines 8104..8123
api/specs.pb.go on lines 8160..8179
api/specs.pb.go on lines 8180..8199
api/watch.pb.go on lines 4359..4378

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

func (m *Assignment_Secret) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    i := len(dAtA)
    if m.Secret != nil {
        {
            size, err := m.Secret.MarshalToSizedBuffer(dAtA[:i])
Severity: Major
Found in api/dispatcher.pb.go and 33 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 2256..2271
api/dispatcher.pb.go on lines 2298..2313
api/dispatcher.pb.go on lines 2319..2334
api/raft.pb.go on lines 1869..1884
api/raft.pb.go on lines 1890..1905
api/raft.pb.go on lines 1911..1926
api/raft.pb.go on lines 1932..1947
api/raft.pb.go on lines 1953..1968
api/raft.pb.go on lines 1974..1989
api/raft.pb.go on lines 1995..2010
api/raft.pb.go on lines 2016..2031
api/raft.pb.go on lines 2037..2052
api/raft.pb.go on lines 2058..2073
api/specs.pb.go on lines 2355..2370
api/specs.pb.go on lines 2376..2391
api/specs.pb.go on lines 2397..2412
api/specs.pb.go on lines 2418..2433
api/specs.pb.go on lines 2659..2674
api/specs.pb.go on lines 2680..2695
api/specs.pb.go on lines 2701..2716
api/watch.pb.go on lines 1371..1386
api/watch.pb.go on lines 1392..1407
api/watch.pb.go on lines 1413..1428
api/watch.pb.go on lines 1434..1449
api/watch.pb.go on lines 1455..1470
api/watch.pb.go on lines 1476..1491
api/watch.pb.go on lines 1497..1512
api/watch.pb.go on lines 1518..1533
api/watch.pb.go on lines 1539..1554
api/watch.pb.go on lines 1560..1575
api/watch.pb.go on lines 1748..1763
api/watch.pb.go on lines 1769..1784
api/watch.pb.go on lines 1818..1833

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

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

        case 2:
            if wireType != 0 {
                return fmt.Errorf("proto: wrong wireType = %d for field Unpublished", wireType)
            }
            var v int
Severity: Major
Found in api/dispatcher.pb.go and 16 other locations - About 1 hr to fix
api/logbroker.pb.go on lines 2485..2504
api/logbroker.pb.go on lines 3582..3601
api/logbroker.pb.go on lines 3718..3737
api/objects.pb.go on lines 7083..7102
api/objects.pb.go on lines 8571..8590
api/objects.pb.go on lines 8988..9007
api/objects.pb.go on lines 9226..9245
api/objects.pb.go on lines 10008..10027
api/specs.pb.go on lines 6898..6917
api/specs.pb.go on lines 7054..7073
api/specs.pb.go on lines 7074..7093
api/specs.pb.go on lines 8084..8103
api/specs.pb.go on lines 8104..8123
api/specs.pb.go on lines 8160..8179
api/specs.pb.go on lines 8180..8199
api/watch.pb.go on lines 4359..4378

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

func (m *Assignment_Task) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    i := len(dAtA)
    if m.Task != nil {
        {
            size, err := m.Task.MarshalToSizedBuffer(dAtA[:i])
Severity: Major
Found in api/dispatcher.pb.go and 33 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 2277..2292
api/dispatcher.pb.go on lines 2298..2313
api/dispatcher.pb.go on lines 2319..2334
api/raft.pb.go on lines 1869..1884
api/raft.pb.go on lines 1890..1905
api/raft.pb.go on lines 1911..1926
api/raft.pb.go on lines 1932..1947
api/raft.pb.go on lines 1953..1968
api/raft.pb.go on lines 1974..1989
api/raft.pb.go on lines 1995..2010
api/raft.pb.go on lines 2016..2031
api/raft.pb.go on lines 2037..2052
api/raft.pb.go on lines 2058..2073
api/specs.pb.go on lines 2355..2370
api/specs.pb.go on lines 2376..2391
api/specs.pb.go on lines 2397..2412
api/specs.pb.go on lines 2418..2433
api/specs.pb.go on lines 2659..2674
api/specs.pb.go on lines 2680..2695
api/specs.pb.go on lines 2701..2716
api/watch.pb.go on lines 1371..1386
api/watch.pb.go on lines 1392..1407
api/watch.pb.go on lines 1413..1428
api/watch.pb.go on lines 1434..1449
api/watch.pb.go on lines 1455..1470
api/watch.pb.go on lines 1476..1491
api/watch.pb.go on lines 1497..1512
api/watch.pb.go on lines 1518..1533
api/watch.pb.go on lines 1539..1554
api/watch.pb.go on lines 1560..1575
api/watch.pb.go on lines 1748..1763
api/watch.pb.go on lines 1769..1784
api/watch.pb.go on lines 1818..1833

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

func (m *ServiceSpec_Global) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    i := len(dAtA)
    if m.Global != nil {
        {
            size, err := m.Global.MarshalToSizedBuffer(dAtA[:i])
Severity: Major
Found in api/specs.pb.go and 33 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 2256..2271
api/dispatcher.pb.go on lines 2277..2292
api/dispatcher.pb.go on lines 2298..2313
api/dispatcher.pb.go on lines 2319..2334
api/raft.pb.go on lines 1869..1884
api/raft.pb.go on lines 1890..1905
api/raft.pb.go on lines 1911..1926
api/raft.pb.go on lines 1932..1947
api/raft.pb.go on lines 1953..1968
api/raft.pb.go on lines 1974..1989
api/raft.pb.go on lines 1995..2010
api/raft.pb.go on lines 2016..2031
api/raft.pb.go on lines 2037..2052
api/raft.pb.go on lines 2058..2073
api/specs.pb.go on lines 2355..2370
api/specs.pb.go on lines 2397..2412
api/specs.pb.go on lines 2418..2433
api/specs.pb.go on lines 2659..2674
api/specs.pb.go on lines 2680..2695
api/specs.pb.go on lines 2701..2716
api/watch.pb.go on lines 1371..1386
api/watch.pb.go on lines 1392..1407
api/watch.pb.go on lines 1413..1428
api/watch.pb.go on lines 1434..1449
api/watch.pb.go on lines 1455..1470
api/watch.pb.go on lines 1476..1491
api/watch.pb.go on lines 1497..1512
api/watch.pb.go on lines 1518..1533
api/watch.pb.go on lines 1539..1554
api/watch.pb.go on lines 1560..1575
api/watch.pb.go on lines 1748..1763
api/watch.pb.go on lines 1769..1784
api/watch.pb.go on lines 1818..1833

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

func (m *SelectBy_Slot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    i := len(dAtA)
    if m.Slot != nil {
        {
            size, err := m.Slot.MarshalToSizedBuffer(dAtA[:i])
Severity: Major
Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 2256..2271
api/dispatcher.pb.go on lines 2277..2292
api/dispatcher.pb.go on lines 2298..2313
api/dispatcher.pb.go on lines 2319..2334
api/raft.pb.go on lines 1869..1884
api/raft.pb.go on lines 1890..1905
api/raft.pb.go on lines 1911..1926
api/raft.pb.go on lines 1932..1947
api/raft.pb.go on lines 1953..1968
api/raft.pb.go on lines 1974..1989
api/raft.pb.go on lines 1995..2010
api/raft.pb.go on lines 2016..2031
api/raft.pb.go on lines 2037..2052
api/raft.pb.go on lines 2058..2073
api/specs.pb.go on lines 2355..2370
api/specs.pb.go on lines 2376..2391
api/specs.pb.go on lines 2397..2412
api/specs.pb.go on lines 2418..2433
api/specs.pb.go on lines 2659..2674
api/specs.pb.go on lines 2680..2695
api/specs.pb.go on lines 2701..2716
api/watch.pb.go on lines 1371..1386
api/watch.pb.go on lines 1392..1407
api/watch.pb.go on lines 1413..1428
api/watch.pb.go on lines 1434..1449
api/watch.pb.go on lines 1455..1470
api/watch.pb.go on lines 1476..1491
api/watch.pb.go on lines 1497..1512
api/watch.pb.go on lines 1518..1533
api/watch.pb.go on lines 1539..1554
api/watch.pb.go on lines 1560..1575
api/watch.pb.go on lines 1748..1763
api/watch.pb.go on lines 1769..1784

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

func (m *StoreAction_Volume) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    i := len(dAtA)
    if m.Volume != nil {
        {
            size, err := m.Volume.MarshalToSizedBuffer(dAtA[:i])
Severity: Major
Found in api/raft.pb.go and 33 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 2256..2271
api/dispatcher.pb.go on lines 2277..2292
api/dispatcher.pb.go on lines 2298..2313
api/dispatcher.pb.go on lines 2319..2334
api/raft.pb.go on lines 1869..1884
api/raft.pb.go on lines 1890..1905
api/raft.pb.go on lines 1911..1926
api/raft.pb.go on lines 1932..1947
api/raft.pb.go on lines 1953..1968
api/raft.pb.go on lines 1974..1989
api/raft.pb.go on lines 1995..2010
api/raft.pb.go on lines 2016..2031
api/raft.pb.go on lines 2037..2052
api/specs.pb.go on lines 2355..2370
api/specs.pb.go on lines 2376..2391
api/specs.pb.go on lines 2397..2412
api/specs.pb.go on lines 2418..2433
api/specs.pb.go on lines 2659..2674
api/specs.pb.go on lines 2680..2695
api/specs.pb.go on lines 2701..2716
api/watch.pb.go on lines 1371..1386
api/watch.pb.go on lines 1392..1407
api/watch.pb.go on lines 1413..1428
api/watch.pb.go on lines 1434..1449
api/watch.pb.go on lines 1455..1470
api/watch.pb.go on lines 1476..1491
api/watch.pb.go on lines 1497..1512
api/watch.pb.go on lines 1518..1533
api/watch.pb.go on lines 1539..1554
api/watch.pb.go on lines 1560..1575
api/watch.pb.go on lines 1748..1763
api/watch.pb.go on lines 1769..1784
api/watch.pb.go on lines 1818..1833

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

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

        case 4:
            if wireType != 0 {
                return fmt.Errorf("proto: wrong wireType = %d for field Internal", wireType)
            }
            var v int
Severity: Major
Found in api/objects.pb.go and 16 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 4298..4317
api/logbroker.pb.go on lines 2485..2504
api/logbroker.pb.go on lines 3582..3601
api/logbroker.pb.go on lines 3718..3737
api/objects.pb.go on lines 7083..7102
api/objects.pb.go on lines 8571..8590
api/objects.pb.go on lines 8988..9007
api/objects.pb.go on lines 10008..10027
api/specs.pb.go on lines 6898..6917
api/specs.pb.go on lines 7054..7073
api/specs.pb.go on lines 7074..7093
api/specs.pb.go on lines 8084..8103
api/specs.pb.go on lines 8104..8123
api/specs.pb.go on lines 8160..8179
api/specs.pb.go on lines 8180..8199
api/watch.pb.go on lines 4359..4378

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

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

        case 3:
            if wireType != 0 {
                return fmt.Errorf("proto: wrong wireType = %d for field Ipv6Enabled", wireType)
            }
            var v int
Severity: Major
Found in api/specs.pb.go and 16 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 4298..4317
api/logbroker.pb.go on lines 2485..2504
api/logbroker.pb.go on lines 3582..3601
api/logbroker.pb.go on lines 3718..3737
api/objects.pb.go on lines 7083..7102
api/objects.pb.go on lines 8571..8590
api/objects.pb.go on lines 8988..9007
api/objects.pb.go on lines 9226..9245
api/objects.pb.go on lines 10008..10027
api/specs.pb.go on lines 6898..6917
api/specs.pb.go on lines 7054..7073
api/specs.pb.go on lines 7074..7093
api/specs.pb.go on lines 8104..8123
api/specs.pb.go on lines 8160..8179
api/specs.pb.go on lines 8180..8199
api/watch.pb.go on lines 4359..4378

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

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

        case 4:
            if wireType != 0 {
                return fmt.Errorf("proto: wrong wireType = %d for field Internal", wireType)
            }
            var v int
Severity: Major
Found in api/specs.pb.go and 16 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 4298..4317
api/logbroker.pb.go on lines 2485..2504
api/logbroker.pb.go on lines 3582..3601
api/logbroker.pb.go on lines 3718..3737
api/objects.pb.go on lines 7083..7102
api/objects.pb.go on lines 8571..8590
api/objects.pb.go on lines 8988..9007
api/objects.pb.go on lines 9226..9245
api/objects.pb.go on lines 10008..10027
api/specs.pb.go on lines 6898..6917
api/specs.pb.go on lines 7054..7073
api/specs.pb.go on lines 7074..7093
api/specs.pb.go on lines 8084..8103
api/specs.pb.go on lines 8160..8179
api/specs.pb.go on lines 8180..8199
api/watch.pb.go on lines 4359..4378

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

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

        case 6:
            if wireType != 0 {
                return fmt.Errorf("proto: wrong wireType = %d for field Attachable", wireType)
            }
            var v int
Severity: Major
Found in api/specs.pb.go and 16 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 4298..4317
api/logbroker.pb.go on lines 2485..2504
api/logbroker.pb.go on lines 3582..3601
api/logbroker.pb.go on lines 3718..3737
api/objects.pb.go on lines 7083..7102
api/objects.pb.go on lines 8571..8590
api/objects.pb.go on lines 8988..9007
api/objects.pb.go on lines 9226..9245
api/objects.pb.go on lines 10008..10027
api/specs.pb.go on lines 6898..6917
api/specs.pb.go on lines 7054..7073
api/specs.pb.go on lines 7074..7093
api/specs.pb.go on lines 8084..8103
api/specs.pb.go on lines 8104..8123
api/specs.pb.go on lines 8180..8199
api/watch.pb.go on lines 4359..4378

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

func (m *Assignment_Volume) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    i := len(dAtA)
    if m.Volume != nil {
        {
            size, err := m.Volume.MarshalToSizedBuffer(dAtA[:i])
Severity: Major
Found in api/dispatcher.pb.go and 33 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 2256..2271
api/dispatcher.pb.go on lines 2277..2292
api/dispatcher.pb.go on lines 2298..2313
api/raft.pb.go on lines 1869..1884
api/raft.pb.go on lines 1890..1905
api/raft.pb.go on lines 1911..1926
api/raft.pb.go on lines 1932..1947
api/raft.pb.go on lines 1953..1968
api/raft.pb.go on lines 1974..1989
api/raft.pb.go on lines 1995..2010
api/raft.pb.go on lines 2016..2031
api/raft.pb.go on lines 2037..2052
api/raft.pb.go on lines 2058..2073
api/specs.pb.go on lines 2355..2370
api/specs.pb.go on lines 2376..2391
api/specs.pb.go on lines 2397..2412
api/specs.pb.go on lines 2418..2433
api/specs.pb.go on lines 2659..2674
api/specs.pb.go on lines 2680..2695
api/specs.pb.go on lines 2701..2716
api/watch.pb.go on lines 1371..1386
api/watch.pb.go on lines 1392..1407
api/watch.pb.go on lines 1413..1428
api/watch.pb.go on lines 1434..1449
api/watch.pb.go on lines 1455..1470
api/watch.pb.go on lines 1476..1491
api/watch.pb.go on lines 1497..1512
api/watch.pb.go on lines 1518..1533
api/watch.pb.go on lines 1539..1554
api/watch.pb.go on lines 1560..1575
api/watch.pb.go on lines 1748..1763
api/watch.pb.go on lines 1769..1784
api/watch.pb.go on lines 1818..1833

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

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

        case 7:
            if wireType != 0 {
                return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType)
            }
            var v int
Severity: Major
Found in api/specs.pb.go and 16 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 4298..4317
api/logbroker.pb.go on lines 2485..2504
api/logbroker.pb.go on lines 3582..3601
api/logbroker.pb.go on lines 3718..3737
api/objects.pb.go on lines 7083..7102
api/objects.pb.go on lines 8571..8590
api/objects.pb.go on lines 8988..9007
api/objects.pb.go on lines 9226..9245
api/objects.pb.go on lines 10008..10027
api/specs.pb.go on lines 6898..6917
api/specs.pb.go on lines 7054..7073
api/specs.pb.go on lines 7074..7093
api/specs.pb.go on lines 8084..8103
api/specs.pb.go on lines 8104..8123
api/specs.pb.go on lines 8160..8179
api/watch.pb.go on lines 4359..4378

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

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