kubenetworks/kubevpn

View on GitHub

Showing 526 of 526 total issues

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

func (x *CloneRule) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[18]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
Severity: Major
Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 55 mins to fix
pkg/daemon/rpc/daemon.pb.go on lines 63..73
pkg/daemon/rpc/daemon.pb.go on lines 194..204
pkg/daemon/rpc/daemon.pb.go on lines 250..260
pkg/daemon/rpc/daemon.pb.go on lines 332..342
pkg/daemon/rpc/daemon.pb.go on lines 379..389
pkg/daemon/rpc/daemon.pb.go on lines 426..436
pkg/daemon/rpc/daemon.pb.go on lines 496..506
pkg/daemon/rpc/daemon.pb.go on lines 669..679
pkg/daemon/rpc/daemon.pb.go on lines 716..726
pkg/daemon/rpc/daemon.pb.go on lines 763..773
pkg/daemon/rpc/daemon.pb.go on lines 808..818
pkg/daemon/rpc/daemon.pb.go on lines 848..858
pkg/daemon/rpc/daemon.pb.go on lines 895..905
pkg/daemon/rpc/daemon.pb.go on lines 942..952
pkg/daemon/rpc/daemon.pb.go on lines 998..1008
pkg/daemon/rpc/daemon.pb.go on lines 1113..1123
pkg/daemon/rpc/daemon.pb.go on lines 1199..1209
pkg/daemon/rpc/daemon.pb.go on lines 1280..1290
pkg/daemon/rpc/daemon.pb.go on lines 1454..1464
pkg/daemon/rpc/daemon.pb.go on lines 1494..1504
pkg/daemon/rpc/daemon.pb.go on lines 1544..1554
pkg/daemon/rpc/daemon.pb.go on lines 1605..1615
pkg/daemon/rpc/daemon.pb.go on lines 1652..1662
pkg/daemon/rpc/daemon.pb.go on lines 1699..1709
pkg/daemon/rpc/daemon.pb.go on lines 1746..1756
pkg/daemon/rpc/daemon.pb.go on lines 1794..1804
pkg/daemon/rpc/daemon.pb.go on lines 1849..1859
pkg/daemon/rpc/daemon.pb.go on lines 1903..1913
pkg/daemon/rpc/daemon.pb.go on lines 1950..1960
pkg/daemon/rpc/daemon.pb.go on lines 1995..2005
pkg/daemon/rpc/daemon.pb.go on lines 2036..2046
pkg/daemon/rpc/daemon.pb.go on lines 2090..2100
pkg/daemon/rpc/daemon.pb.go on lines 2135..2145
pkg/daemon/rpc/daemon.pb.go on lines 2175..2185
pkg/daemon/rpc/daemon.pb.go on lines 2223..2233
pkg/daemon/rpc/daemon.pb.go on lines 2277..2287
pkg/daemon/rpc/daemon.pb.go on lines 2324..2334
pkg/daemon/rpc/daemon.pb.go on lines 2371..2381
pkg/daemon/rpc/daemon.pb.go on lines 2421..2431
pkg/daemon/rpc/daemon.pb.go on lines 2482..2492
pkg/daemon/rpc/daemon.pb.go on lines 2538..2548
pkg/daemon/rpc/daemon.pb.go on lines 2650..2660
pkg/daemon/rpc/daemon.pb.go on lines 2709..2719
pkg/daemon/rpc/daemon.pb.go on lines 2749..2759
pkg/dhcp/rpc/dhcpserver.pb.go on lines 47..57
pkg/dhcp/rpc/dhcpserver.pb.go on lines 102..112
pkg/dhcp/rpc/dhcpserver.pb.go on lines 159..169
pkg/dhcp/rpc/dhcpserver.pb.go on lines 227..237

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

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

func (x *VersionResponse) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[20]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
Severity: Major
Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 55 mins to fix
pkg/daemon/rpc/daemon.pb.go on lines 63..73
pkg/daemon/rpc/daemon.pb.go on lines 194..204
pkg/daemon/rpc/daemon.pb.go on lines 250..260
pkg/daemon/rpc/daemon.pb.go on lines 332..342
pkg/daemon/rpc/daemon.pb.go on lines 379..389
pkg/daemon/rpc/daemon.pb.go on lines 426..436
pkg/daemon/rpc/daemon.pb.go on lines 496..506
pkg/daemon/rpc/daemon.pb.go on lines 669..679
pkg/daemon/rpc/daemon.pb.go on lines 716..726
pkg/daemon/rpc/daemon.pb.go on lines 763..773
pkg/daemon/rpc/daemon.pb.go on lines 808..818
pkg/daemon/rpc/daemon.pb.go on lines 848..858
pkg/daemon/rpc/daemon.pb.go on lines 895..905
pkg/daemon/rpc/daemon.pb.go on lines 942..952
pkg/daemon/rpc/daemon.pb.go on lines 998..1008
pkg/daemon/rpc/daemon.pb.go on lines 1113..1123
pkg/daemon/rpc/daemon.pb.go on lines 1199..1209
pkg/daemon/rpc/daemon.pb.go on lines 1280..1290
pkg/daemon/rpc/daemon.pb.go on lines 1374..1384
pkg/daemon/rpc/daemon.pb.go on lines 1454..1464
pkg/daemon/rpc/daemon.pb.go on lines 1544..1554
pkg/daemon/rpc/daemon.pb.go on lines 1605..1615
pkg/daemon/rpc/daemon.pb.go on lines 1652..1662
pkg/daemon/rpc/daemon.pb.go on lines 1699..1709
pkg/daemon/rpc/daemon.pb.go on lines 1746..1756
pkg/daemon/rpc/daemon.pb.go on lines 1794..1804
pkg/daemon/rpc/daemon.pb.go on lines 1849..1859
pkg/daemon/rpc/daemon.pb.go on lines 1903..1913
pkg/daemon/rpc/daemon.pb.go on lines 1950..1960
pkg/daemon/rpc/daemon.pb.go on lines 1995..2005
pkg/daemon/rpc/daemon.pb.go on lines 2036..2046
pkg/daemon/rpc/daemon.pb.go on lines 2090..2100
pkg/daemon/rpc/daemon.pb.go on lines 2135..2145
pkg/daemon/rpc/daemon.pb.go on lines 2175..2185
pkg/daemon/rpc/daemon.pb.go on lines 2223..2233
pkg/daemon/rpc/daemon.pb.go on lines 2277..2287
pkg/daemon/rpc/daemon.pb.go on lines 2324..2334
pkg/daemon/rpc/daemon.pb.go on lines 2371..2381
pkg/daemon/rpc/daemon.pb.go on lines 2421..2431
pkg/daemon/rpc/daemon.pb.go on lines 2482..2492
pkg/daemon/rpc/daemon.pb.go on lines 2538..2548
pkg/daemon/rpc/daemon.pb.go on lines 2650..2660
pkg/daemon/rpc/daemon.pb.go on lines 2709..2719
pkg/daemon/rpc/daemon.pb.go on lines 2749..2759
pkg/dhcp/rpc/dhcpserver.pb.go on lines 47..57
pkg/dhcp/rpc/dhcpserver.pb.go on lines 102..112
pkg/dhcp/rpc/dhcpserver.pb.go on lines 159..169
pkg/dhcp/rpc/dhcpserver.pb.go on lines 227..237

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

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

func (x *DisconnectResponse) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[3]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
Severity: Major
Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 55 mins to fix
pkg/daemon/rpc/daemon.pb.go on lines 63..73
pkg/daemon/rpc/daemon.pb.go on lines 194..204
pkg/daemon/rpc/daemon.pb.go on lines 250..260
pkg/daemon/rpc/daemon.pb.go on lines 379..389
pkg/daemon/rpc/daemon.pb.go on lines 426..436
pkg/daemon/rpc/daemon.pb.go on lines 496..506
pkg/daemon/rpc/daemon.pb.go on lines 669..679
pkg/daemon/rpc/daemon.pb.go on lines 716..726
pkg/daemon/rpc/daemon.pb.go on lines 763..773
pkg/daemon/rpc/daemon.pb.go on lines 808..818
pkg/daemon/rpc/daemon.pb.go on lines 848..858
pkg/daemon/rpc/daemon.pb.go on lines 895..905
pkg/daemon/rpc/daemon.pb.go on lines 942..952
pkg/daemon/rpc/daemon.pb.go on lines 998..1008
pkg/daemon/rpc/daemon.pb.go on lines 1113..1123
pkg/daemon/rpc/daemon.pb.go on lines 1199..1209
pkg/daemon/rpc/daemon.pb.go on lines 1280..1290
pkg/daemon/rpc/daemon.pb.go on lines 1374..1384
pkg/daemon/rpc/daemon.pb.go on lines 1454..1464
pkg/daemon/rpc/daemon.pb.go on lines 1494..1504
pkg/daemon/rpc/daemon.pb.go on lines 1544..1554
pkg/daemon/rpc/daemon.pb.go on lines 1605..1615
pkg/daemon/rpc/daemon.pb.go on lines 1652..1662
pkg/daemon/rpc/daemon.pb.go on lines 1699..1709
pkg/daemon/rpc/daemon.pb.go on lines 1746..1756
pkg/daemon/rpc/daemon.pb.go on lines 1794..1804
pkg/daemon/rpc/daemon.pb.go on lines 1849..1859
pkg/daemon/rpc/daemon.pb.go on lines 1903..1913
pkg/daemon/rpc/daemon.pb.go on lines 1950..1960
pkg/daemon/rpc/daemon.pb.go on lines 1995..2005
pkg/daemon/rpc/daemon.pb.go on lines 2036..2046
pkg/daemon/rpc/daemon.pb.go on lines 2090..2100
pkg/daemon/rpc/daemon.pb.go on lines 2135..2145
pkg/daemon/rpc/daemon.pb.go on lines 2175..2185
pkg/daemon/rpc/daemon.pb.go on lines 2223..2233
pkg/daemon/rpc/daemon.pb.go on lines 2277..2287
pkg/daemon/rpc/daemon.pb.go on lines 2324..2334
pkg/daemon/rpc/daemon.pb.go on lines 2371..2381
pkg/daemon/rpc/daemon.pb.go on lines 2421..2431
pkg/daemon/rpc/daemon.pb.go on lines 2482..2492
pkg/daemon/rpc/daemon.pb.go on lines 2538..2548
pkg/daemon/rpc/daemon.pb.go on lines 2650..2660
pkg/daemon/rpc/daemon.pb.go on lines 2709..2719
pkg/daemon/rpc/daemon.pb.go on lines 2749..2759
pkg/dhcp/rpc/dhcpserver.pb.go on lines 47..57
pkg/dhcp/rpc/dhcpserver.pb.go on lines 102..112
pkg/dhcp/rpc/dhcpserver.pb.go on lines 159..169
pkg/dhcp/rpc/dhcpserver.pb.go on lines 227..237

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

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

func (x *LeaveResponse) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[5]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
Severity: Major
Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 55 mins to fix
pkg/daemon/rpc/daemon.pb.go on lines 63..73
pkg/daemon/rpc/daemon.pb.go on lines 194..204
pkg/daemon/rpc/daemon.pb.go on lines 250..260
pkg/daemon/rpc/daemon.pb.go on lines 332..342
pkg/daemon/rpc/daemon.pb.go on lines 379..389
pkg/daemon/rpc/daemon.pb.go on lines 496..506
pkg/daemon/rpc/daemon.pb.go on lines 669..679
pkg/daemon/rpc/daemon.pb.go on lines 716..726
pkg/daemon/rpc/daemon.pb.go on lines 763..773
pkg/daemon/rpc/daemon.pb.go on lines 808..818
pkg/daemon/rpc/daemon.pb.go on lines 848..858
pkg/daemon/rpc/daemon.pb.go on lines 895..905
pkg/daemon/rpc/daemon.pb.go on lines 942..952
pkg/daemon/rpc/daemon.pb.go on lines 998..1008
pkg/daemon/rpc/daemon.pb.go on lines 1113..1123
pkg/daemon/rpc/daemon.pb.go on lines 1199..1209
pkg/daemon/rpc/daemon.pb.go on lines 1280..1290
pkg/daemon/rpc/daemon.pb.go on lines 1374..1384
pkg/daemon/rpc/daemon.pb.go on lines 1454..1464
pkg/daemon/rpc/daemon.pb.go on lines 1494..1504
pkg/daemon/rpc/daemon.pb.go on lines 1544..1554
pkg/daemon/rpc/daemon.pb.go on lines 1605..1615
pkg/daemon/rpc/daemon.pb.go on lines 1652..1662
pkg/daemon/rpc/daemon.pb.go on lines 1699..1709
pkg/daemon/rpc/daemon.pb.go on lines 1746..1756
pkg/daemon/rpc/daemon.pb.go on lines 1794..1804
pkg/daemon/rpc/daemon.pb.go on lines 1849..1859
pkg/daemon/rpc/daemon.pb.go on lines 1903..1913
pkg/daemon/rpc/daemon.pb.go on lines 1950..1960
pkg/daemon/rpc/daemon.pb.go on lines 1995..2005
pkg/daemon/rpc/daemon.pb.go on lines 2036..2046
pkg/daemon/rpc/daemon.pb.go on lines 2090..2100
pkg/daemon/rpc/daemon.pb.go on lines 2135..2145
pkg/daemon/rpc/daemon.pb.go on lines 2175..2185
pkg/daemon/rpc/daemon.pb.go on lines 2223..2233
pkg/daemon/rpc/daemon.pb.go on lines 2277..2287
pkg/daemon/rpc/daemon.pb.go on lines 2324..2334
pkg/daemon/rpc/daemon.pb.go on lines 2371..2381
pkg/daemon/rpc/daemon.pb.go on lines 2421..2431
pkg/daemon/rpc/daemon.pb.go on lines 2482..2492
pkg/daemon/rpc/daemon.pb.go on lines 2538..2548
pkg/daemon/rpc/daemon.pb.go on lines 2650..2660
pkg/daemon/rpc/daemon.pb.go on lines 2709..2719
pkg/daemon/rpc/daemon.pb.go on lines 2749..2759
pkg/dhcp/rpc/dhcpserver.pb.go on lines 47..57
pkg/dhcp/rpc/dhcpserver.pb.go on lines 102..112
pkg/dhcp/rpc/dhcpserver.pb.go on lines 159..169
pkg/dhcp/rpc/dhcpserver.pb.go on lines 227..237

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

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

func (x *CloneRequest) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[6]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
Severity: Major
Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 55 mins to fix
pkg/daemon/rpc/daemon.pb.go on lines 63..73
pkg/daemon/rpc/daemon.pb.go on lines 194..204
pkg/daemon/rpc/daemon.pb.go on lines 250..260
pkg/daemon/rpc/daemon.pb.go on lines 332..342
pkg/daemon/rpc/daemon.pb.go on lines 379..389
pkg/daemon/rpc/daemon.pb.go on lines 426..436
pkg/daemon/rpc/daemon.pb.go on lines 669..679
pkg/daemon/rpc/daemon.pb.go on lines 716..726
pkg/daemon/rpc/daemon.pb.go on lines 763..773
pkg/daemon/rpc/daemon.pb.go on lines 808..818
pkg/daemon/rpc/daemon.pb.go on lines 848..858
pkg/daemon/rpc/daemon.pb.go on lines 895..905
pkg/daemon/rpc/daemon.pb.go on lines 942..952
pkg/daemon/rpc/daemon.pb.go on lines 998..1008
pkg/daemon/rpc/daemon.pb.go on lines 1113..1123
pkg/daemon/rpc/daemon.pb.go on lines 1199..1209
pkg/daemon/rpc/daemon.pb.go on lines 1280..1290
pkg/daemon/rpc/daemon.pb.go on lines 1374..1384
pkg/daemon/rpc/daemon.pb.go on lines 1454..1464
pkg/daemon/rpc/daemon.pb.go on lines 1494..1504
pkg/daemon/rpc/daemon.pb.go on lines 1544..1554
pkg/daemon/rpc/daemon.pb.go on lines 1605..1615
pkg/daemon/rpc/daemon.pb.go on lines 1652..1662
pkg/daemon/rpc/daemon.pb.go on lines 1699..1709
pkg/daemon/rpc/daemon.pb.go on lines 1746..1756
pkg/daemon/rpc/daemon.pb.go on lines 1794..1804
pkg/daemon/rpc/daemon.pb.go on lines 1849..1859
pkg/daemon/rpc/daemon.pb.go on lines 1903..1913
pkg/daemon/rpc/daemon.pb.go on lines 1950..1960
pkg/daemon/rpc/daemon.pb.go on lines 1995..2005
pkg/daemon/rpc/daemon.pb.go on lines 2036..2046
pkg/daemon/rpc/daemon.pb.go on lines 2090..2100
pkg/daemon/rpc/daemon.pb.go on lines 2135..2145
pkg/daemon/rpc/daemon.pb.go on lines 2175..2185
pkg/daemon/rpc/daemon.pb.go on lines 2223..2233
pkg/daemon/rpc/daemon.pb.go on lines 2277..2287
pkg/daemon/rpc/daemon.pb.go on lines 2324..2334
pkg/daemon/rpc/daemon.pb.go on lines 2371..2381
pkg/daemon/rpc/daemon.pb.go on lines 2421..2431
pkg/daemon/rpc/daemon.pb.go on lines 2482..2492
pkg/daemon/rpc/daemon.pb.go on lines 2538..2548
pkg/daemon/rpc/daemon.pb.go on lines 2650..2660
pkg/daemon/rpc/daemon.pb.go on lines 2709..2719
pkg/daemon/rpc/daemon.pb.go on lines 2749..2759
pkg/dhcp/rpc/dhcpserver.pb.go on lines 47..57
pkg/dhcp/rpc/dhcpserver.pb.go on lines 102..112
pkg/dhcp/rpc/dhcpserver.pb.go on lines 159..169
pkg/dhcp/rpc/dhcpserver.pb.go on lines 227..237

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

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

func (x *LogRequest) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[31]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
Severity: Major
Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 55 mins to fix
pkg/daemon/rpc/daemon.pb.go on lines 63..73
pkg/daemon/rpc/daemon.pb.go on lines 194..204
pkg/daemon/rpc/daemon.pb.go on lines 250..260
pkg/daemon/rpc/daemon.pb.go on lines 332..342
pkg/daemon/rpc/daemon.pb.go on lines 379..389
pkg/daemon/rpc/daemon.pb.go on lines 426..436
pkg/daemon/rpc/daemon.pb.go on lines 496..506
pkg/daemon/rpc/daemon.pb.go on lines 669..679
pkg/daemon/rpc/daemon.pb.go on lines 716..726
pkg/daemon/rpc/daemon.pb.go on lines 763..773
pkg/daemon/rpc/daemon.pb.go on lines 808..818
pkg/daemon/rpc/daemon.pb.go on lines 848..858
pkg/daemon/rpc/daemon.pb.go on lines 895..905
pkg/daemon/rpc/daemon.pb.go on lines 942..952
pkg/daemon/rpc/daemon.pb.go on lines 998..1008
pkg/daemon/rpc/daemon.pb.go on lines 1113..1123
pkg/daemon/rpc/daemon.pb.go on lines 1199..1209
pkg/daemon/rpc/daemon.pb.go on lines 1280..1290
pkg/daemon/rpc/daemon.pb.go on lines 1374..1384
pkg/daemon/rpc/daemon.pb.go on lines 1454..1464
pkg/daemon/rpc/daemon.pb.go on lines 1494..1504
pkg/daemon/rpc/daemon.pb.go on lines 1544..1554
pkg/daemon/rpc/daemon.pb.go on lines 1605..1615
pkg/daemon/rpc/daemon.pb.go on lines 1652..1662
pkg/daemon/rpc/daemon.pb.go on lines 1699..1709
pkg/daemon/rpc/daemon.pb.go on lines 1746..1756
pkg/daemon/rpc/daemon.pb.go on lines 1794..1804
pkg/daemon/rpc/daemon.pb.go on lines 1849..1859
pkg/daemon/rpc/daemon.pb.go on lines 1903..1913
pkg/daemon/rpc/daemon.pb.go on lines 1950..1960
pkg/daemon/rpc/daemon.pb.go on lines 1995..2005
pkg/daemon/rpc/daemon.pb.go on lines 2090..2100
pkg/daemon/rpc/daemon.pb.go on lines 2135..2145
pkg/daemon/rpc/daemon.pb.go on lines 2175..2185
pkg/daemon/rpc/daemon.pb.go on lines 2223..2233
pkg/daemon/rpc/daemon.pb.go on lines 2277..2287
pkg/daemon/rpc/daemon.pb.go on lines 2324..2334
pkg/daemon/rpc/daemon.pb.go on lines 2371..2381
pkg/daemon/rpc/daemon.pb.go on lines 2421..2431
pkg/daemon/rpc/daemon.pb.go on lines 2482..2492
pkg/daemon/rpc/daemon.pb.go on lines 2538..2548
pkg/daemon/rpc/daemon.pb.go on lines 2650..2660
pkg/daemon/rpc/daemon.pb.go on lines 2709..2719
pkg/daemon/rpc/daemon.pb.go on lines 2749..2759
pkg/dhcp/rpc/dhcpserver.pb.go on lines 47..57
pkg/dhcp/rpc/dhcpserver.pb.go on lines 102..112
pkg/dhcp/rpc/dhcpserver.pb.go on lines 159..169
pkg/dhcp/rpc/dhcpserver.pb.go on lines 227..237

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

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

func (x *RentIPResponse) ProtoReflect() protoreflect.Message {
    mi := &file_dhcpserver_proto_msgTypes[1]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
Severity: Major
Found in pkg/dhcp/rpc/dhcpserver.pb.go and 48 other locations - About 55 mins to fix
pkg/daemon/rpc/daemon.pb.go on lines 63..73
pkg/daemon/rpc/daemon.pb.go on lines 194..204
pkg/daemon/rpc/daemon.pb.go on lines 250..260
pkg/daemon/rpc/daemon.pb.go on lines 332..342
pkg/daemon/rpc/daemon.pb.go on lines 379..389
pkg/daemon/rpc/daemon.pb.go on lines 426..436
pkg/daemon/rpc/daemon.pb.go on lines 496..506
pkg/daemon/rpc/daemon.pb.go on lines 669..679
pkg/daemon/rpc/daemon.pb.go on lines 716..726
pkg/daemon/rpc/daemon.pb.go on lines 763..773
pkg/daemon/rpc/daemon.pb.go on lines 808..818
pkg/daemon/rpc/daemon.pb.go on lines 848..858
pkg/daemon/rpc/daemon.pb.go on lines 895..905
pkg/daemon/rpc/daemon.pb.go on lines 942..952
pkg/daemon/rpc/daemon.pb.go on lines 998..1008
pkg/daemon/rpc/daemon.pb.go on lines 1113..1123
pkg/daemon/rpc/daemon.pb.go on lines 1199..1209
pkg/daemon/rpc/daemon.pb.go on lines 1280..1290
pkg/daemon/rpc/daemon.pb.go on lines 1374..1384
pkg/daemon/rpc/daemon.pb.go on lines 1454..1464
pkg/daemon/rpc/daemon.pb.go on lines 1494..1504
pkg/daemon/rpc/daemon.pb.go on lines 1544..1554
pkg/daemon/rpc/daemon.pb.go on lines 1605..1615
pkg/daemon/rpc/daemon.pb.go on lines 1652..1662
pkg/daemon/rpc/daemon.pb.go on lines 1699..1709
pkg/daemon/rpc/daemon.pb.go on lines 1746..1756
pkg/daemon/rpc/daemon.pb.go on lines 1794..1804
pkg/daemon/rpc/daemon.pb.go on lines 1849..1859
pkg/daemon/rpc/daemon.pb.go on lines 1903..1913
pkg/daemon/rpc/daemon.pb.go on lines 1950..1960
pkg/daemon/rpc/daemon.pb.go on lines 1995..2005
pkg/daemon/rpc/daemon.pb.go on lines 2036..2046
pkg/daemon/rpc/daemon.pb.go on lines 2090..2100
pkg/daemon/rpc/daemon.pb.go on lines 2135..2145
pkg/daemon/rpc/daemon.pb.go on lines 2175..2185
pkg/daemon/rpc/daemon.pb.go on lines 2223..2233
pkg/daemon/rpc/daemon.pb.go on lines 2277..2287
pkg/daemon/rpc/daemon.pb.go on lines 2324..2334
pkg/daemon/rpc/daemon.pb.go on lines 2371..2381
pkg/daemon/rpc/daemon.pb.go on lines 2421..2431
pkg/daemon/rpc/daemon.pb.go on lines 2482..2492
pkg/daemon/rpc/daemon.pb.go on lines 2538..2548
pkg/daemon/rpc/daemon.pb.go on lines 2650..2660
pkg/daemon/rpc/daemon.pb.go on lines 2709..2719
pkg/daemon/rpc/daemon.pb.go on lines 2749..2759
pkg/dhcp/rpc/dhcpserver.pb.go on lines 47..57
pkg/dhcp/rpc/dhcpserver.pb.go on lines 159..169
pkg/dhcp/rpc/dhcpserver.pb.go on lines 227..237

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

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

func (x *QuitResponse) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[11]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
Severity: Major
Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 55 mins to fix
pkg/daemon/rpc/daemon.pb.go on lines 63..73
pkg/daemon/rpc/daemon.pb.go on lines 194..204
pkg/daemon/rpc/daemon.pb.go on lines 250..260
pkg/daemon/rpc/daemon.pb.go on lines 332..342
pkg/daemon/rpc/daemon.pb.go on lines 379..389
pkg/daemon/rpc/daemon.pb.go on lines 426..436
pkg/daemon/rpc/daemon.pb.go on lines 496..506
pkg/daemon/rpc/daemon.pb.go on lines 669..679
pkg/daemon/rpc/daemon.pb.go on lines 716..726
pkg/daemon/rpc/daemon.pb.go on lines 763..773
pkg/daemon/rpc/daemon.pb.go on lines 808..818
pkg/daemon/rpc/daemon.pb.go on lines 895..905
pkg/daemon/rpc/daemon.pb.go on lines 942..952
pkg/daemon/rpc/daemon.pb.go on lines 998..1008
pkg/daemon/rpc/daemon.pb.go on lines 1113..1123
pkg/daemon/rpc/daemon.pb.go on lines 1199..1209
pkg/daemon/rpc/daemon.pb.go on lines 1280..1290
pkg/daemon/rpc/daemon.pb.go on lines 1374..1384
pkg/daemon/rpc/daemon.pb.go on lines 1454..1464
pkg/daemon/rpc/daemon.pb.go on lines 1494..1504
pkg/daemon/rpc/daemon.pb.go on lines 1544..1554
pkg/daemon/rpc/daemon.pb.go on lines 1605..1615
pkg/daemon/rpc/daemon.pb.go on lines 1652..1662
pkg/daemon/rpc/daemon.pb.go on lines 1699..1709
pkg/daemon/rpc/daemon.pb.go on lines 1746..1756
pkg/daemon/rpc/daemon.pb.go on lines 1794..1804
pkg/daemon/rpc/daemon.pb.go on lines 1849..1859
pkg/daemon/rpc/daemon.pb.go on lines 1903..1913
pkg/daemon/rpc/daemon.pb.go on lines 1950..1960
pkg/daemon/rpc/daemon.pb.go on lines 1995..2005
pkg/daemon/rpc/daemon.pb.go on lines 2036..2046
pkg/daemon/rpc/daemon.pb.go on lines 2090..2100
pkg/daemon/rpc/daemon.pb.go on lines 2135..2145
pkg/daemon/rpc/daemon.pb.go on lines 2175..2185
pkg/daemon/rpc/daemon.pb.go on lines 2223..2233
pkg/daemon/rpc/daemon.pb.go on lines 2277..2287
pkg/daemon/rpc/daemon.pb.go on lines 2324..2334
pkg/daemon/rpc/daemon.pb.go on lines 2371..2381
pkg/daemon/rpc/daemon.pb.go on lines 2421..2431
pkg/daemon/rpc/daemon.pb.go on lines 2482..2492
pkg/daemon/rpc/daemon.pb.go on lines 2538..2548
pkg/daemon/rpc/daemon.pb.go on lines 2650..2660
pkg/daemon/rpc/daemon.pb.go on lines 2709..2719
pkg/daemon/rpc/daemon.pb.go on lines 2749..2759
pkg/dhcp/rpc/dhcpserver.pb.go on lines 47..57
pkg/dhcp/rpc/dhcpserver.pb.go on lines 102..112
pkg/dhcp/rpc/dhcpserver.pb.go on lines 159..169
pkg/dhcp/rpc/dhcpserver.pb.go on lines 227..237

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

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

func (x *ListRequest) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[33]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
Severity: Major
Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 55 mins to fix
pkg/daemon/rpc/daemon.pb.go on lines 63..73
pkg/daemon/rpc/daemon.pb.go on lines 194..204
pkg/daemon/rpc/daemon.pb.go on lines 250..260
pkg/daemon/rpc/daemon.pb.go on lines 332..342
pkg/daemon/rpc/daemon.pb.go on lines 379..389
pkg/daemon/rpc/daemon.pb.go on lines 426..436
pkg/daemon/rpc/daemon.pb.go on lines 496..506
pkg/daemon/rpc/daemon.pb.go on lines 669..679
pkg/daemon/rpc/daemon.pb.go on lines 716..726
pkg/daemon/rpc/daemon.pb.go on lines 763..773
pkg/daemon/rpc/daemon.pb.go on lines 808..818
pkg/daemon/rpc/daemon.pb.go on lines 848..858
pkg/daemon/rpc/daemon.pb.go on lines 895..905
pkg/daemon/rpc/daemon.pb.go on lines 942..952
pkg/daemon/rpc/daemon.pb.go on lines 998..1008
pkg/daemon/rpc/daemon.pb.go on lines 1113..1123
pkg/daemon/rpc/daemon.pb.go on lines 1199..1209
pkg/daemon/rpc/daemon.pb.go on lines 1280..1290
pkg/daemon/rpc/daemon.pb.go on lines 1374..1384
pkg/daemon/rpc/daemon.pb.go on lines 1454..1464
pkg/daemon/rpc/daemon.pb.go on lines 1494..1504
pkg/daemon/rpc/daemon.pb.go on lines 1544..1554
pkg/daemon/rpc/daemon.pb.go on lines 1605..1615
pkg/daemon/rpc/daemon.pb.go on lines 1652..1662
pkg/daemon/rpc/daemon.pb.go on lines 1699..1709
pkg/daemon/rpc/daemon.pb.go on lines 1746..1756
pkg/daemon/rpc/daemon.pb.go on lines 1794..1804
pkg/daemon/rpc/daemon.pb.go on lines 1849..1859
pkg/daemon/rpc/daemon.pb.go on lines 1903..1913
pkg/daemon/rpc/daemon.pb.go on lines 1950..1960
pkg/daemon/rpc/daemon.pb.go on lines 1995..2005
pkg/daemon/rpc/daemon.pb.go on lines 2036..2046
pkg/daemon/rpc/daemon.pb.go on lines 2090..2100
pkg/daemon/rpc/daemon.pb.go on lines 2175..2185
pkg/daemon/rpc/daemon.pb.go on lines 2223..2233
pkg/daemon/rpc/daemon.pb.go on lines 2277..2287
pkg/daemon/rpc/daemon.pb.go on lines 2324..2334
pkg/daemon/rpc/daemon.pb.go on lines 2371..2381
pkg/daemon/rpc/daemon.pb.go on lines 2421..2431
pkg/daemon/rpc/daemon.pb.go on lines 2482..2492
pkg/daemon/rpc/daemon.pb.go on lines 2538..2548
pkg/daemon/rpc/daemon.pb.go on lines 2650..2660
pkg/daemon/rpc/daemon.pb.go on lines 2709..2719
pkg/daemon/rpc/daemon.pb.go on lines 2749..2759
pkg/dhcp/rpc/dhcpserver.pb.go on lines 47..57
pkg/dhcp/rpc/dhcpserver.pb.go on lines 102..112
pkg/dhcp/rpc/dhcpserver.pb.go on lines 159..169
pkg/dhcp/rpc/dhcpserver.pb.go on lines 227..237

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

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

func (x *GetResponse) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[36]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
Severity: Major
Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 55 mins to fix
pkg/daemon/rpc/daemon.pb.go on lines 63..73
pkg/daemon/rpc/daemon.pb.go on lines 194..204
pkg/daemon/rpc/daemon.pb.go on lines 250..260
pkg/daemon/rpc/daemon.pb.go on lines 332..342
pkg/daemon/rpc/daemon.pb.go on lines 379..389
pkg/daemon/rpc/daemon.pb.go on lines 426..436
pkg/daemon/rpc/daemon.pb.go on lines 496..506
pkg/daemon/rpc/daemon.pb.go on lines 669..679
pkg/daemon/rpc/daemon.pb.go on lines 716..726
pkg/daemon/rpc/daemon.pb.go on lines 763..773
pkg/daemon/rpc/daemon.pb.go on lines 808..818
pkg/daemon/rpc/daemon.pb.go on lines 848..858
pkg/daemon/rpc/daemon.pb.go on lines 895..905
pkg/daemon/rpc/daemon.pb.go on lines 942..952
pkg/daemon/rpc/daemon.pb.go on lines 998..1008
pkg/daemon/rpc/daemon.pb.go on lines 1113..1123
pkg/daemon/rpc/daemon.pb.go on lines 1199..1209
pkg/daemon/rpc/daemon.pb.go on lines 1280..1290
pkg/daemon/rpc/daemon.pb.go on lines 1374..1384
pkg/daemon/rpc/daemon.pb.go on lines 1454..1464
pkg/daemon/rpc/daemon.pb.go on lines 1494..1504
pkg/daemon/rpc/daemon.pb.go on lines 1544..1554
pkg/daemon/rpc/daemon.pb.go on lines 1605..1615
pkg/daemon/rpc/daemon.pb.go on lines 1652..1662
pkg/daemon/rpc/daemon.pb.go on lines 1699..1709
pkg/daemon/rpc/daemon.pb.go on lines 1746..1756
pkg/daemon/rpc/daemon.pb.go on lines 1794..1804
pkg/daemon/rpc/daemon.pb.go on lines 1849..1859
pkg/daemon/rpc/daemon.pb.go on lines 1903..1913
pkg/daemon/rpc/daemon.pb.go on lines 1950..1960
pkg/daemon/rpc/daemon.pb.go on lines 1995..2005
pkg/daemon/rpc/daemon.pb.go on lines 2036..2046
pkg/daemon/rpc/daemon.pb.go on lines 2090..2100
pkg/daemon/rpc/daemon.pb.go on lines 2135..2145
pkg/daemon/rpc/daemon.pb.go on lines 2175..2185
pkg/daemon/rpc/daemon.pb.go on lines 2223..2233
pkg/daemon/rpc/daemon.pb.go on lines 2324..2334
pkg/daemon/rpc/daemon.pb.go on lines 2371..2381
pkg/daemon/rpc/daemon.pb.go on lines 2421..2431
pkg/daemon/rpc/daemon.pb.go on lines 2482..2492
pkg/daemon/rpc/daemon.pb.go on lines 2538..2548
pkg/daemon/rpc/daemon.pb.go on lines 2650..2660
pkg/daemon/rpc/daemon.pb.go on lines 2709..2719
pkg/daemon/rpc/daemon.pb.go on lines 2749..2759
pkg/dhcp/rpc/dhcpserver.pb.go on lines 47..57
pkg/dhcp/rpc/dhcpserver.pb.go on lines 102..112
pkg/dhcp/rpc/dhcpserver.pb.go on lines 159..169
pkg/dhcp/rpc/dhcpserver.pb.go on lines 227..237

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

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

func (x *ExtraRoute) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[42]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
Severity: Major
Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 55 mins to fix
pkg/daemon/rpc/daemon.pb.go on lines 63..73
pkg/daemon/rpc/daemon.pb.go on lines 194..204
pkg/daemon/rpc/daemon.pb.go on lines 250..260
pkg/daemon/rpc/daemon.pb.go on lines 332..342
pkg/daemon/rpc/daemon.pb.go on lines 379..389
pkg/daemon/rpc/daemon.pb.go on lines 426..436
pkg/daemon/rpc/daemon.pb.go on lines 496..506
pkg/daemon/rpc/daemon.pb.go on lines 669..679
pkg/daemon/rpc/daemon.pb.go on lines 716..726
pkg/daemon/rpc/daemon.pb.go on lines 763..773
pkg/daemon/rpc/daemon.pb.go on lines 808..818
pkg/daemon/rpc/daemon.pb.go on lines 848..858
pkg/daemon/rpc/daemon.pb.go on lines 895..905
pkg/daemon/rpc/daemon.pb.go on lines 942..952
pkg/daemon/rpc/daemon.pb.go on lines 998..1008
pkg/daemon/rpc/daemon.pb.go on lines 1113..1123
pkg/daemon/rpc/daemon.pb.go on lines 1199..1209
pkg/daemon/rpc/daemon.pb.go on lines 1280..1290
pkg/daemon/rpc/daemon.pb.go on lines 1374..1384
pkg/daemon/rpc/daemon.pb.go on lines 1454..1464
pkg/daemon/rpc/daemon.pb.go on lines 1494..1504
pkg/daemon/rpc/daemon.pb.go on lines 1544..1554
pkg/daemon/rpc/daemon.pb.go on lines 1605..1615
pkg/daemon/rpc/daemon.pb.go on lines 1652..1662
pkg/daemon/rpc/daemon.pb.go on lines 1699..1709
pkg/daemon/rpc/daemon.pb.go on lines 1746..1756
pkg/daemon/rpc/daemon.pb.go on lines 1794..1804
pkg/daemon/rpc/daemon.pb.go on lines 1849..1859
pkg/daemon/rpc/daemon.pb.go on lines 1903..1913
pkg/daemon/rpc/daemon.pb.go on lines 1950..1960
pkg/daemon/rpc/daemon.pb.go on lines 1995..2005
pkg/daemon/rpc/daemon.pb.go on lines 2036..2046
pkg/daemon/rpc/daemon.pb.go on lines 2090..2100
pkg/daemon/rpc/daemon.pb.go on lines 2135..2145
pkg/daemon/rpc/daemon.pb.go on lines 2175..2185
pkg/daemon/rpc/daemon.pb.go on lines 2223..2233
pkg/daemon/rpc/daemon.pb.go on lines 2277..2287
pkg/daemon/rpc/daemon.pb.go on lines 2324..2334
pkg/daemon/rpc/daemon.pb.go on lines 2371..2381
pkg/daemon/rpc/daemon.pb.go on lines 2421..2431
pkg/daemon/rpc/daemon.pb.go on lines 2482..2492
pkg/daemon/rpc/daemon.pb.go on lines 2538..2548
pkg/daemon/rpc/daemon.pb.go on lines 2709..2719
pkg/daemon/rpc/daemon.pb.go on lines 2749..2759
pkg/dhcp/rpc/dhcpserver.pb.go on lines 47..57
pkg/dhcp/rpc/dhcpserver.pb.go on lines 102..112
pkg/dhcp/rpc/dhcpserver.pb.go on lines 159..169
pkg/dhcp/rpc/dhcpserver.pb.go on lines 227..237

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

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

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

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

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

Refactorings

Further Reading

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

    var resourcesLarge = v1.ResourceRequirements{
        Requests: map[v1.ResourceName]resource.Quantity{
            v1.ResourceCPU:    resource.MustParse("500m"),
            v1.ResourceMemory: resource.MustParse("512Mi"),
        },
Severity: Minor
Found in pkg/handler/remote.go and 1 other location - About 55 mins to fix
pkg/handler/remote.go on lines 185..194

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

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

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

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

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

Refactorings

Further Reading

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

                        case *miekgdns.A:
                            if ip := net.ParseIP(a.A.String()); ip != nil && !ip.IsLoopback() {
                                addRouteFunc(domain, a.A.String())
                                c.extraHost = append(c.extraHost, dns.Entry{IP: a.A.String(), Domain: domain})
                                success = true
Severity: Minor
Found in pkg/handler/connect.go and 1 other location - About 55 mins to fix
pkg/handler/connect.go on lines 914..919

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

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

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

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

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

Refactorings

Further Reading

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

    var resourcesSmall = v1.ResourceRequirements{
        Requests: map[v1.ResourceName]resource.Quantity{
            v1.ResourceCPU:    resource.MustParse("100m"),
            v1.ResourceMemory: resource.MustParse("128Mi"),
        },
Severity: Minor
Found in pkg/handler/remote.go and 1 other location - About 55 mins to fix
pkg/handler/remote.go on lines 195..204

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

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

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

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

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

Refactorings

Further Reading

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

                        case *miekgdns.AAAA:
                            if ip := net.ParseIP(a.AAAA.String()); ip != nil && !ip.IsLoopback() {
                                addRouteFunc(domain, a.AAAA.String())
                                c.extraHost = append(c.extraHost, dns.Entry{IP: a.AAAA.String(), Domain: domain})
                                success = true
Severity: Minor
Found in pkg/handler/connect.go and 1 other location - About 55 mins to fix
pkg/handler/connect.go on lines 908..913

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

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

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

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

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

Refactorings

Further Reading

Function GetKubeconfigPath has 8 return statements (exceeds 4 allowed).
Open

func GetKubeconfigPath(factory cmdutil.Factory) (string, error) {
    rawConfig, err := factory.ToRawKubeConfigLoader().RawConfig()
    if err != nil {
        return "", err
    }
Severity: Major
Found in pkg/util/ns.go - About 50 mins to fix

    Function CmdDisconnect has 8 return statements (exceeds 4 allowed).
    Open

    func CmdDisconnect(f cmdutil.Factory) *cobra.Command {
        var all = false
        var clusterIDs []string
        cmd := &cobra.Command{
            Use:   "disconnect",
    Severity: Major
    Found in cmd/kubevpn/cmds/disconnect.go - About 50 mins to fix

      Function newer has 8 return statements (exceeds 4 allowed).
      Open

      func newer(clientImgStr, serverImgStr string) (bool, error) {
          clientImg, err := reference.ParseNormalizedNamed(clientImgStr)
          if err != nil {
              return false, err
          }
      Severity: Major
      Found in pkg/handler/connect.go - About 50 mins to fix

        Function CreateAfterDeletePod has 8 return statements (exceeds 4 allowed).
        Open

        func CreateAfterDeletePod(factory util.Factory, p *v1.Pod, helper *resource.Helper) error {
            _, err := helper.DeleteWithOptions(p.Namespace, p.Name, &v12.DeleteOptions{
                GracePeriodSeconds: pointer.Int64(0),
            })
            if err != nil {
        Severity: Major
        Found in pkg/inject/proxy.go - About 50 mins to fix

          Method CloneOptions.replaceRegistry has 8 return statements (exceeds 4 allowed).
          Open

          func (d *CloneOptions) replaceRegistry(u *unstructured.Unstructured) error {
              // not pass this options, do nothing
              if !d.IsChangeTargetRegistry {
                  return nil
              }
          Severity: Major
          Found in pkg/handler/clone.go - About 50 mins to fix
            Severity
            Category
            Status
            Source
            Language