kubenetworks/kubevpn

View on GitHub

Showing 198 of 556 total issues

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

    err := d.updateDHCPConfigMap(ctx, func(ipv4 *ipallocator.Range, ipv6 *ipallocator.Range) (err error) {
        for {
            if v4, err = ipv4.AllocateNext(); err != nil {
                return err
            }
Severity: Major
Found in pkg/handler/dhcp.go and 1 other location - About 1 hr to fix
pkg/handler/dhcp.go on lines 101..119

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

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

func printDisconnectResp(disconnect rpc.Daemon_DisconnectClient) error {
    for {
        recv, err := disconnect.Recv()
        if err == io.EOF {
            return nil
Severity: Major
Found in cmd/kubevpn/cmds/reset.go and 1 other location - About 1 hr to fix
cmd/kubevpn/cmds/reset.go on lines 93..105

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

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

    configFlags.WrapConfigFn = func(c *rest.Config) *rest.Config {
        if path, ok := os.LookupEnv(config.EnvSSHJump); ok {
            bytes, err := os.ReadFile(path)
            cmdutil.CheckErr(err)
            var conf *rest.Config
Severity: Major
Found in pkg/util/ns.go and 1 other location - About 1 hr to fix
cmd/kubevpn/cmds/root.go on lines 35..45

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

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

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

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

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

Refactorings

Further Reading

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

type AuthorEntity struct {
    Login             string `json:"login"`
    Id                int64  `json:"id"`
    NodeId            string `json:"node_id"`
    AvatarUrl         string `json:"avatar_url"`
Severity: Major
Found in pkg/util/upgarde.go and 1 other location - About 1 hr to fix
pkg/util/upgarde.go on lines 224..243

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

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

    configFlags.WrapConfigFn = func(c *rest.Config) *rest.Config {
        if path, ok := os.LookupEnv(config.EnvSSHJump); ok {
            kubeconfigBytes, err := os.ReadFile(path)
            cmdutil.CheckErr(err)
            var conf *restclient.Config
Severity: Major
Found in cmd/kubevpn/cmds/root.go and 1 other location - About 1 hr to fix
pkg/util/ns.go on lines 117..127

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

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

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

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

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

Refactorings

Further Reading

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

type UploaderEntity struct {
    Login             string `json:"login"`
    Id                int64  `json:"id"`
    NodeId            string `json:"node_id"`
    AvatarUrl         string `json:"avatar_url"`
Severity: Major
Found in pkg/util/upgarde.go and 1 other location - About 1 hr to fix
pkg/util/upgarde.go on lines 187..206

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

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

func (c *fakeUDPTunnelConn) Close() error {
    if cc, ok := c.Conn.(interface{ CloseRead() error }); ok {
        _ = cc.CloseRead()
    }
    if cc, ok := c.Conn.(interface{ CloseWrite() error }); ok {
Severity: Major
Found in pkg/core/tcphandler.go and 1 other location - About 1 hr to fix
pkg/core/gvisorudphandler.go on lines 108..116

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

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

func (c *gvisorFakeUDPTunnelConn) Close() error {
    if cc, ok := c.Conn.(interface{ CloseRead() error }); ok {
        _ = cc.CloseRead()
    }
    if cc, ok := c.Conn.(interface{ CloseWrite() error }); ok {
Severity: Major
Found in pkg/core/gvisorudphandler.go and 1 other location - About 1 hr to fix
pkg/core/tcphandler.go on lines 143..151

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

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

    for i, container := range temp.Spec.InitContainers {
        oldImage := container.Image
        named, err := reference.ParseNormalizedNamed(oldImage)
        if err != nil {
            return err
Severity: Major
Found in pkg/handler/clone.go and 1 other location - About 1 hr to fix
pkg/handler/clone.go on lines 695..705

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

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

    for i, container := range temp.Spec.Containers {
        oldImage := container.Image
        named, err := reference.ParseNormalizedNamed(oldImage)
        if err != nil {
            return err
Severity: Major
Found in pkg/handler/clone.go and 1 other location - About 1 hr to fix
pkg/handler/clone.go on lines 683..693

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

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 *QuitRequest) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[10]
    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 494..504
pkg/daemon/rpc/daemon.pb.go on lines 653..663
pkg/daemon/rpc/daemon.pb.go on lines 700..710
pkg/daemon/rpc/daemon.pb.go on lines 747..757
pkg/daemon/rpc/daemon.pb.go on lines 832..842
pkg/daemon/rpc/daemon.pb.go on lines 879..889
pkg/daemon/rpc/daemon.pb.go on lines 926..936
pkg/daemon/rpc/daemon.pb.go on lines 982..992
pkg/daemon/rpc/daemon.pb.go on lines 1097..1107
pkg/daemon/rpc/daemon.pb.go on lines 1183..1193
pkg/daemon/rpc/daemon.pb.go on lines 1263..1273
pkg/daemon/rpc/daemon.pb.go on lines 1350..1360
pkg/daemon/rpc/daemon.pb.go on lines 1430..1440
pkg/daemon/rpc/daemon.pb.go on lines 1470..1480
pkg/daemon/rpc/daemon.pb.go on lines 1520..1530
pkg/daemon/rpc/daemon.pb.go on lines 1581..1591
pkg/daemon/rpc/daemon.pb.go on lines 1628..1638
pkg/daemon/rpc/daemon.pb.go on lines 1675..1685
pkg/daemon/rpc/daemon.pb.go on lines 1722..1732
pkg/daemon/rpc/daemon.pb.go on lines 1770..1780
pkg/daemon/rpc/daemon.pb.go on lines 1825..1835
pkg/daemon/rpc/daemon.pb.go on lines 1879..1889
pkg/daemon/rpc/daemon.pb.go on lines 1926..1936
pkg/daemon/rpc/daemon.pb.go on lines 1971..1981
pkg/daemon/rpc/daemon.pb.go on lines 2011..2021
pkg/daemon/rpc/daemon.pb.go on lines 2058..2068
pkg/daemon/rpc/daemon.pb.go on lines 2103..2113
pkg/daemon/rpc/daemon.pb.go on lines 2143..2153
pkg/daemon/rpc/daemon.pb.go on lines 2191..2201
pkg/daemon/rpc/daemon.pb.go on lines 2245..2255
pkg/daemon/rpc/daemon.pb.go on lines 2293..2303
pkg/daemon/rpc/daemon.pb.go on lines 2347..2357
pkg/daemon/rpc/daemon.pb.go on lines 2397..2407
pkg/daemon/rpc/daemon.pb.go on lines 2458..2468
pkg/daemon/rpc/daemon.pb.go on lines 2514..2524
pkg/daemon/rpc/daemon.pb.go on lines 2626..2636
pkg/daemon/rpc/daemon.pb.go on lines 2685..2695
pkg/daemon/rpc/daemon.pb.go on lines 2725..2735
pkg/webhook/rpc/dhcpserver.pb.go on lines 47..57
pkg/webhook/rpc/dhcpserver.pb.go on lines 102..112
pkg/webhook/rpc/dhcpserver.pb.go on lines 159..169
pkg/webhook/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 494..504
pkg/daemon/rpc/daemon.pb.go on lines 653..663
pkg/daemon/rpc/daemon.pb.go on lines 700..710
pkg/daemon/rpc/daemon.pb.go on lines 747..757
pkg/daemon/rpc/daemon.pb.go on lines 792..802
pkg/daemon/rpc/daemon.pb.go on lines 879..889
pkg/daemon/rpc/daemon.pb.go on lines 926..936
pkg/daemon/rpc/daemon.pb.go on lines 982..992
pkg/daemon/rpc/daemon.pb.go on lines 1097..1107
pkg/daemon/rpc/daemon.pb.go on lines 1183..1193
pkg/daemon/rpc/daemon.pb.go on lines 1263..1273
pkg/daemon/rpc/daemon.pb.go on lines 1350..1360
pkg/daemon/rpc/daemon.pb.go on lines 1430..1440
pkg/daemon/rpc/daemon.pb.go on lines 1470..1480
pkg/daemon/rpc/daemon.pb.go on lines 1520..1530
pkg/daemon/rpc/daemon.pb.go on lines 1581..1591
pkg/daemon/rpc/daemon.pb.go on lines 1628..1638
pkg/daemon/rpc/daemon.pb.go on lines 1675..1685
pkg/daemon/rpc/daemon.pb.go on lines 1722..1732
pkg/daemon/rpc/daemon.pb.go on lines 1770..1780
pkg/daemon/rpc/daemon.pb.go on lines 1825..1835
pkg/daemon/rpc/daemon.pb.go on lines 1879..1889
pkg/daemon/rpc/daemon.pb.go on lines 1926..1936
pkg/daemon/rpc/daemon.pb.go on lines 1971..1981
pkg/daemon/rpc/daemon.pb.go on lines 2011..2021
pkg/daemon/rpc/daemon.pb.go on lines 2058..2068
pkg/daemon/rpc/daemon.pb.go on lines 2103..2113
pkg/daemon/rpc/daemon.pb.go on lines 2143..2153
pkg/daemon/rpc/daemon.pb.go on lines 2191..2201
pkg/daemon/rpc/daemon.pb.go on lines 2245..2255
pkg/daemon/rpc/daemon.pb.go on lines 2293..2303
pkg/daemon/rpc/daemon.pb.go on lines 2347..2357
pkg/daemon/rpc/daemon.pb.go on lines 2397..2407
pkg/daemon/rpc/daemon.pb.go on lines 2458..2468
pkg/daemon/rpc/daemon.pb.go on lines 2514..2524
pkg/daemon/rpc/daemon.pb.go on lines 2626..2636
pkg/daemon/rpc/daemon.pb.go on lines 2685..2695
pkg/daemon/rpc/daemon.pb.go on lines 2725..2735
pkg/webhook/rpc/dhcpserver.pb.go on lines 47..57
pkg/webhook/rpc/dhcpserver.pb.go on lines 102..112
pkg/webhook/rpc/dhcpserver.pb.go on lines 159..169
pkg/webhook/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 *Status) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[14]
    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 494..504
pkg/daemon/rpc/daemon.pb.go on lines 653..663
pkg/daemon/rpc/daemon.pb.go on lines 700..710
pkg/daemon/rpc/daemon.pb.go on lines 747..757
pkg/daemon/rpc/daemon.pb.go on lines 792..802
pkg/daemon/rpc/daemon.pb.go on lines 832..842
pkg/daemon/rpc/daemon.pb.go on lines 879..889
pkg/daemon/rpc/daemon.pb.go on lines 926..936
pkg/daemon/rpc/daemon.pb.go on lines 1097..1107
pkg/daemon/rpc/daemon.pb.go on lines 1183..1193
pkg/daemon/rpc/daemon.pb.go on lines 1263..1273
pkg/daemon/rpc/daemon.pb.go on lines 1350..1360
pkg/daemon/rpc/daemon.pb.go on lines 1430..1440
pkg/daemon/rpc/daemon.pb.go on lines 1470..1480
pkg/daemon/rpc/daemon.pb.go on lines 1520..1530
pkg/daemon/rpc/daemon.pb.go on lines 1581..1591
pkg/daemon/rpc/daemon.pb.go on lines 1628..1638
pkg/daemon/rpc/daemon.pb.go on lines 1675..1685
pkg/daemon/rpc/daemon.pb.go on lines 1722..1732
pkg/daemon/rpc/daemon.pb.go on lines 1770..1780
pkg/daemon/rpc/daemon.pb.go on lines 1825..1835
pkg/daemon/rpc/daemon.pb.go on lines 1879..1889
pkg/daemon/rpc/daemon.pb.go on lines 1926..1936
pkg/daemon/rpc/daemon.pb.go on lines 1971..1981
pkg/daemon/rpc/daemon.pb.go on lines 2011..2021
pkg/daemon/rpc/daemon.pb.go on lines 2058..2068
pkg/daemon/rpc/daemon.pb.go on lines 2103..2113
pkg/daemon/rpc/daemon.pb.go on lines 2143..2153
pkg/daemon/rpc/daemon.pb.go on lines 2191..2201
pkg/daemon/rpc/daemon.pb.go on lines 2245..2255
pkg/daemon/rpc/daemon.pb.go on lines 2293..2303
pkg/daemon/rpc/daemon.pb.go on lines 2347..2357
pkg/daemon/rpc/daemon.pb.go on lines 2397..2407
pkg/daemon/rpc/daemon.pb.go on lines 2458..2468
pkg/daemon/rpc/daemon.pb.go on lines 2514..2524
pkg/daemon/rpc/daemon.pb.go on lines 2626..2636
pkg/daemon/rpc/daemon.pb.go on lines 2685..2695
pkg/daemon/rpc/daemon.pb.go on lines 2725..2735
pkg/webhook/rpc/dhcpserver.pb.go on lines 47..57
pkg/webhook/rpc/dhcpserver.pb.go on lines 102..112
pkg/webhook/rpc/dhcpserver.pb.go on lines 159..169
pkg/webhook/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 *ProxyRule) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[16]
    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 494..504
pkg/daemon/rpc/daemon.pb.go on lines 653..663
pkg/daemon/rpc/daemon.pb.go on lines 700..710
pkg/daemon/rpc/daemon.pb.go on lines 747..757
pkg/daemon/rpc/daemon.pb.go on lines 792..802
pkg/daemon/rpc/daemon.pb.go on lines 832..842
pkg/daemon/rpc/daemon.pb.go on lines 879..889
pkg/daemon/rpc/daemon.pb.go on lines 926..936
pkg/daemon/rpc/daemon.pb.go on lines 982..992
pkg/daemon/rpc/daemon.pb.go on lines 1097..1107
pkg/daemon/rpc/daemon.pb.go on lines 1263..1273
pkg/daemon/rpc/daemon.pb.go on lines 1350..1360
pkg/daemon/rpc/daemon.pb.go on lines 1430..1440
pkg/daemon/rpc/daemon.pb.go on lines 1470..1480
pkg/daemon/rpc/daemon.pb.go on lines 1520..1530
pkg/daemon/rpc/daemon.pb.go on lines 1581..1591
pkg/daemon/rpc/daemon.pb.go on lines 1628..1638
pkg/daemon/rpc/daemon.pb.go on lines 1675..1685
pkg/daemon/rpc/daemon.pb.go on lines 1722..1732
pkg/daemon/rpc/daemon.pb.go on lines 1770..1780
pkg/daemon/rpc/daemon.pb.go on lines 1825..1835
pkg/daemon/rpc/daemon.pb.go on lines 1879..1889
pkg/daemon/rpc/daemon.pb.go on lines 1926..1936
pkg/daemon/rpc/daemon.pb.go on lines 1971..1981
pkg/daemon/rpc/daemon.pb.go on lines 2011..2021
pkg/daemon/rpc/daemon.pb.go on lines 2058..2068
pkg/daemon/rpc/daemon.pb.go on lines 2103..2113
pkg/daemon/rpc/daemon.pb.go on lines 2143..2153
pkg/daemon/rpc/daemon.pb.go on lines 2191..2201
pkg/daemon/rpc/daemon.pb.go on lines 2245..2255
pkg/daemon/rpc/daemon.pb.go on lines 2293..2303
pkg/daemon/rpc/daemon.pb.go on lines 2347..2357
pkg/daemon/rpc/daemon.pb.go on lines 2397..2407
pkg/daemon/rpc/daemon.pb.go on lines 2458..2468
pkg/daemon/rpc/daemon.pb.go on lines 2514..2524
pkg/daemon/rpc/daemon.pb.go on lines 2626..2636
pkg/daemon/rpc/daemon.pb.go on lines 2685..2695
pkg/daemon/rpc/daemon.pb.go on lines 2725..2735
pkg/webhook/rpc/dhcpserver.pb.go on lines 47..57
pkg/webhook/rpc/dhcpserver.pb.go on lines 102..112
pkg/webhook/rpc/dhcpserver.pb.go on lines 159..169
pkg/webhook/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 *Clone) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[17]
    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 494..504
pkg/daemon/rpc/daemon.pb.go on lines 653..663
pkg/daemon/rpc/daemon.pb.go on lines 700..710
pkg/daemon/rpc/daemon.pb.go on lines 747..757
pkg/daemon/rpc/daemon.pb.go on lines 792..802
pkg/daemon/rpc/daemon.pb.go on lines 832..842
pkg/daemon/rpc/daemon.pb.go on lines 879..889
pkg/daemon/rpc/daemon.pb.go on lines 926..936
pkg/daemon/rpc/daemon.pb.go on lines 982..992
pkg/daemon/rpc/daemon.pb.go on lines 1097..1107
pkg/daemon/rpc/daemon.pb.go on lines 1183..1193
pkg/daemon/rpc/daemon.pb.go on lines 1350..1360
pkg/daemon/rpc/daemon.pb.go on lines 1430..1440
pkg/daemon/rpc/daemon.pb.go on lines 1470..1480
pkg/daemon/rpc/daemon.pb.go on lines 1520..1530
pkg/daemon/rpc/daemon.pb.go on lines 1581..1591
pkg/daemon/rpc/daemon.pb.go on lines 1628..1638
pkg/daemon/rpc/daemon.pb.go on lines 1675..1685
pkg/daemon/rpc/daemon.pb.go on lines 1722..1732
pkg/daemon/rpc/daemon.pb.go on lines 1770..1780
pkg/daemon/rpc/daemon.pb.go on lines 1825..1835
pkg/daemon/rpc/daemon.pb.go on lines 1879..1889
pkg/daemon/rpc/daemon.pb.go on lines 1926..1936
pkg/daemon/rpc/daemon.pb.go on lines 1971..1981
pkg/daemon/rpc/daemon.pb.go on lines 2011..2021
pkg/daemon/rpc/daemon.pb.go on lines 2058..2068
pkg/daemon/rpc/daemon.pb.go on lines 2103..2113
pkg/daemon/rpc/daemon.pb.go on lines 2143..2153
pkg/daemon/rpc/daemon.pb.go on lines 2191..2201
pkg/daemon/rpc/daemon.pb.go on lines 2245..2255
pkg/daemon/rpc/daemon.pb.go on lines 2293..2303
pkg/daemon/rpc/daemon.pb.go on lines 2347..2357
pkg/daemon/rpc/daemon.pb.go on lines 2397..2407
pkg/daemon/rpc/daemon.pb.go on lines 2458..2468
pkg/daemon/rpc/daemon.pb.go on lines 2514..2524
pkg/daemon/rpc/daemon.pb.go on lines 2626..2636
pkg/daemon/rpc/daemon.pb.go on lines 2685..2695
pkg/daemon/rpc/daemon.pb.go on lines 2725..2735
pkg/webhook/rpc/dhcpserver.pb.go on lines 47..57
pkg/webhook/rpc/dhcpserver.pb.go on lines 102..112
pkg/webhook/rpc/dhcpserver.pb.go on lines 159..169
pkg/webhook/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 *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 494..504
pkg/daemon/rpc/daemon.pb.go on lines 653..663
pkg/daemon/rpc/daemon.pb.go on lines 700..710
pkg/daemon/rpc/daemon.pb.go on lines 747..757
pkg/daemon/rpc/daemon.pb.go on lines 792..802
pkg/daemon/rpc/daemon.pb.go on lines 832..842
pkg/daemon/rpc/daemon.pb.go on lines 879..889
pkg/daemon/rpc/daemon.pb.go on lines 926..936
pkg/daemon/rpc/daemon.pb.go on lines 982..992
pkg/daemon/rpc/daemon.pb.go on lines 1097..1107
pkg/daemon/rpc/daemon.pb.go on lines 1183..1193
pkg/daemon/rpc/daemon.pb.go on lines 1263..1273
pkg/daemon/rpc/daemon.pb.go on lines 1430..1440
pkg/daemon/rpc/daemon.pb.go on lines 1470..1480
pkg/daemon/rpc/daemon.pb.go on lines 1520..1530
pkg/daemon/rpc/daemon.pb.go on lines 1581..1591
pkg/daemon/rpc/daemon.pb.go on lines 1628..1638
pkg/daemon/rpc/daemon.pb.go on lines 1675..1685
pkg/daemon/rpc/daemon.pb.go on lines 1722..1732
pkg/daemon/rpc/daemon.pb.go on lines 1770..1780
pkg/daemon/rpc/daemon.pb.go on lines 1825..1835
pkg/daemon/rpc/daemon.pb.go on lines 1879..1889
pkg/daemon/rpc/daemon.pb.go on lines 1926..1936
pkg/daemon/rpc/daemon.pb.go on lines 1971..1981
pkg/daemon/rpc/daemon.pb.go on lines 2011..2021
pkg/daemon/rpc/daemon.pb.go on lines 2058..2068
pkg/daemon/rpc/daemon.pb.go on lines 2103..2113
pkg/daemon/rpc/daemon.pb.go on lines 2143..2153
pkg/daemon/rpc/daemon.pb.go on lines 2191..2201
pkg/daemon/rpc/daemon.pb.go on lines 2245..2255
pkg/daemon/rpc/daemon.pb.go on lines 2293..2303
pkg/daemon/rpc/daemon.pb.go on lines 2347..2357
pkg/daemon/rpc/daemon.pb.go on lines 2397..2407
pkg/daemon/rpc/daemon.pb.go on lines 2458..2468
pkg/daemon/rpc/daemon.pb.go on lines 2514..2524
pkg/daemon/rpc/daemon.pb.go on lines 2626..2636
pkg/daemon/rpc/daemon.pb.go on lines 2685..2695
pkg/daemon/rpc/daemon.pb.go on lines 2725..2735
pkg/webhook/rpc/dhcpserver.pb.go on lines 47..57
pkg/webhook/rpc/dhcpserver.pb.go on lines 102..112
pkg/webhook/rpc/dhcpserver.pb.go on lines 159..169
pkg/webhook/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 494..504
pkg/daemon/rpc/daemon.pb.go on lines 653..663
pkg/daemon/rpc/daemon.pb.go on lines 700..710
pkg/daemon/rpc/daemon.pb.go on lines 747..757
pkg/daemon/rpc/daemon.pb.go on lines 792..802
pkg/daemon/rpc/daemon.pb.go on lines 832..842
pkg/daemon/rpc/daemon.pb.go on lines 879..889
pkg/daemon/rpc/daemon.pb.go on lines 926..936
pkg/daemon/rpc/daemon.pb.go on lines 982..992
pkg/daemon/rpc/daemon.pb.go on lines 1097..1107
pkg/daemon/rpc/daemon.pb.go on lines 1183..1193
pkg/daemon/rpc/daemon.pb.go on lines 1263..1273
pkg/daemon/rpc/daemon.pb.go on lines 1350..1360
pkg/daemon/rpc/daemon.pb.go on lines 1430..1440
pkg/daemon/rpc/daemon.pb.go on lines 1520..1530
pkg/daemon/rpc/daemon.pb.go on lines 1581..1591
pkg/daemon/rpc/daemon.pb.go on lines 1628..1638
pkg/daemon/rpc/daemon.pb.go on lines 1675..1685
pkg/daemon/rpc/daemon.pb.go on lines 1722..1732
pkg/daemon/rpc/daemon.pb.go on lines 1770..1780
pkg/daemon/rpc/daemon.pb.go on lines 1825..1835
pkg/daemon/rpc/daemon.pb.go on lines 1879..1889
pkg/daemon/rpc/daemon.pb.go on lines 1926..1936
pkg/daemon/rpc/daemon.pb.go on lines 1971..1981
pkg/daemon/rpc/daemon.pb.go on lines 2011..2021
pkg/daemon/rpc/daemon.pb.go on lines 2058..2068
pkg/daemon/rpc/daemon.pb.go on lines 2103..2113
pkg/daemon/rpc/daemon.pb.go on lines 2143..2153
pkg/daemon/rpc/daemon.pb.go on lines 2191..2201
pkg/daemon/rpc/daemon.pb.go on lines 2245..2255
pkg/daemon/rpc/daemon.pb.go on lines 2293..2303
pkg/daemon/rpc/daemon.pb.go on lines 2347..2357
pkg/daemon/rpc/daemon.pb.go on lines 2397..2407
pkg/daemon/rpc/daemon.pb.go on lines 2458..2468
pkg/daemon/rpc/daemon.pb.go on lines 2514..2524
pkg/daemon/rpc/daemon.pb.go on lines 2626..2636
pkg/daemon/rpc/daemon.pb.go on lines 2685..2695
pkg/daemon/rpc/daemon.pb.go on lines 2725..2735
pkg/webhook/rpc/dhcpserver.pb.go on lines 47..57
pkg/webhook/rpc/dhcpserver.pb.go on lines 102..112
pkg/webhook/rpc/dhcpserver.pb.go on lines 159..169
pkg/webhook/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 *SshStopRequest) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[24]
    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 494..504
pkg/daemon/rpc/daemon.pb.go on lines 653..663
pkg/daemon/rpc/daemon.pb.go on lines 700..710
pkg/daemon/rpc/daemon.pb.go on lines 747..757
pkg/daemon/rpc/daemon.pb.go on lines 792..802
pkg/daemon/rpc/daemon.pb.go on lines 832..842
pkg/daemon/rpc/daemon.pb.go on lines 879..889
pkg/daemon/rpc/daemon.pb.go on lines 926..936
pkg/daemon/rpc/daemon.pb.go on lines 982..992
pkg/daemon/rpc/daemon.pb.go on lines 1097..1107
pkg/daemon/rpc/daemon.pb.go on lines 1183..1193
pkg/daemon/rpc/daemon.pb.go on lines 1263..1273
pkg/daemon/rpc/daemon.pb.go on lines 1350..1360
pkg/daemon/rpc/daemon.pb.go on lines 1430..1440
pkg/daemon/rpc/daemon.pb.go on lines 1470..1480
pkg/daemon/rpc/daemon.pb.go on lines 1520..1530
pkg/daemon/rpc/daemon.pb.go on lines 1581..1591
pkg/daemon/rpc/daemon.pb.go on lines 1628..1638
pkg/daemon/rpc/daemon.pb.go on lines 1722..1732
pkg/daemon/rpc/daemon.pb.go on lines 1770..1780
pkg/daemon/rpc/daemon.pb.go on lines 1825..1835
pkg/daemon/rpc/daemon.pb.go on lines 1879..1889
pkg/daemon/rpc/daemon.pb.go on lines 1926..1936
pkg/daemon/rpc/daemon.pb.go on lines 1971..1981
pkg/daemon/rpc/daemon.pb.go on lines 2011..2021
pkg/daemon/rpc/daemon.pb.go on lines 2058..2068
pkg/daemon/rpc/daemon.pb.go on lines 2103..2113
pkg/daemon/rpc/daemon.pb.go on lines 2143..2153
pkg/daemon/rpc/daemon.pb.go on lines 2191..2201
pkg/daemon/rpc/daemon.pb.go on lines 2245..2255
pkg/daemon/rpc/daemon.pb.go on lines 2293..2303
pkg/daemon/rpc/daemon.pb.go on lines 2347..2357
pkg/daemon/rpc/daemon.pb.go on lines 2397..2407
pkg/daemon/rpc/daemon.pb.go on lines 2458..2468
pkg/daemon/rpc/daemon.pb.go on lines 2514..2524
pkg/daemon/rpc/daemon.pb.go on lines 2626..2636
pkg/daemon/rpc/daemon.pb.go on lines 2685..2695
pkg/daemon/rpc/daemon.pb.go on lines 2725..2735
pkg/webhook/rpc/dhcpserver.pb.go on lines 47..57
pkg/webhook/rpc/dhcpserver.pb.go on lines 102..112
pkg/webhook/rpc/dhcpserver.pb.go on lines 159..169
pkg/webhook/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 *ResetResponse) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[40]
    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 494..504
pkg/daemon/rpc/daemon.pb.go on lines 653..663
pkg/daemon/rpc/daemon.pb.go on lines 700..710
pkg/daemon/rpc/daemon.pb.go on lines 747..757
pkg/daemon/rpc/daemon.pb.go on lines 792..802
pkg/daemon/rpc/daemon.pb.go on lines 832..842
pkg/daemon/rpc/daemon.pb.go on lines 879..889
pkg/daemon/rpc/daemon.pb.go on lines 926..936
pkg/daemon/rpc/daemon.pb.go on lines 982..992
pkg/daemon/rpc/daemon.pb.go on lines 1097..1107
pkg/daemon/rpc/daemon.pb.go on lines 1183..1193
pkg/daemon/rpc/daemon.pb.go on lines 1263..1273
pkg/daemon/rpc/daemon.pb.go on lines 1350..1360
pkg/daemon/rpc/daemon.pb.go on lines 1430..1440
pkg/daemon/rpc/daemon.pb.go on lines 1470..1480
pkg/daemon/rpc/daemon.pb.go on lines 1520..1530
pkg/daemon/rpc/daemon.pb.go on lines 1581..1591
pkg/daemon/rpc/daemon.pb.go on lines 1628..1638
pkg/daemon/rpc/daemon.pb.go on lines 1675..1685
pkg/daemon/rpc/daemon.pb.go on lines 1722..1732
pkg/daemon/rpc/daemon.pb.go on lines 1770..1780
pkg/daemon/rpc/daemon.pb.go on lines 1825..1835
pkg/daemon/rpc/daemon.pb.go on lines 1879..1889
pkg/daemon/rpc/daemon.pb.go on lines 1926..1936
pkg/daemon/rpc/daemon.pb.go on lines 1971..1981
pkg/daemon/rpc/daemon.pb.go on lines 2011..2021
pkg/daemon/rpc/daemon.pb.go on lines 2058..2068
pkg/daemon/rpc/daemon.pb.go on lines 2103..2113
pkg/daemon/rpc/daemon.pb.go on lines 2143..2153
pkg/daemon/rpc/daemon.pb.go on lines 2191..2201
pkg/daemon/rpc/daemon.pb.go on lines 2245..2255
pkg/daemon/rpc/daemon.pb.go on lines 2293..2303
pkg/daemon/rpc/daemon.pb.go on lines 2347..2357
pkg/daemon/rpc/daemon.pb.go on lines 2397..2407
pkg/daemon/rpc/daemon.pb.go on lines 2514..2524
pkg/daemon/rpc/daemon.pb.go on lines 2626..2636
pkg/daemon/rpc/daemon.pb.go on lines 2685..2695
pkg/daemon/rpc/daemon.pb.go on lines 2725..2735
pkg/webhook/rpc/dhcpserver.pb.go on lines 47..57
pkg/webhook/rpc/dhcpserver.pb.go on lines 102..112
pkg/webhook/rpc/dhcpserver.pb.go on lines 159..169
pkg/webhook/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 *IdentifyRequest) ProtoReflect() protoreflect.Message {
    mi := &file_daemon_proto_msgTypes[43]
    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 494..504
pkg/daemon/rpc/daemon.pb.go on lines 653..663
pkg/daemon/rpc/daemon.pb.go on lines 700..710
pkg/daemon/rpc/daemon.pb.go on lines 747..757
pkg/daemon/rpc/daemon.pb.go on lines 792..802
pkg/daemon/rpc/daemon.pb.go on lines 832..842
pkg/daemon/rpc/daemon.pb.go on lines 879..889
pkg/daemon/rpc/daemon.pb.go on lines 926..936
pkg/daemon/rpc/daemon.pb.go on lines 982..992
pkg/daemon/rpc/daemon.pb.go on lines 1097..1107
pkg/daemon/rpc/daemon.pb.go on lines 1183..1193
pkg/daemon/rpc/daemon.pb.go on lines 1263..1273
pkg/daemon/rpc/daemon.pb.go on lines 1350..1360
pkg/daemon/rpc/daemon.pb.go on lines 1430..1440
pkg/daemon/rpc/daemon.pb.go on lines 1470..1480
pkg/daemon/rpc/daemon.pb.go on lines 1520..1530
pkg/daemon/rpc/daemon.pb.go on lines 1581..1591
pkg/daemon/rpc/daemon.pb.go on lines 1628..1638
pkg/daemon/rpc/daemon.pb.go on lines 1675..1685
pkg/daemon/rpc/daemon.pb.go on lines 1722..1732
pkg/daemon/rpc/daemon.pb.go on lines 1770..1780
pkg/daemon/rpc/daemon.pb.go on lines 1825..1835
pkg/daemon/rpc/daemon.pb.go on lines 1879..1889
pkg/daemon/rpc/daemon.pb.go on lines 1926..1936
pkg/daemon/rpc/daemon.pb.go on lines 1971..1981
pkg/daemon/rpc/daemon.pb.go on lines 2011..2021
pkg/daemon/rpc/daemon.pb.go on lines 2058..2068
pkg/daemon/rpc/daemon.pb.go on lines 2103..2113
pkg/daemon/rpc/daemon.pb.go on lines 2143..2153
pkg/daemon/rpc/daemon.pb.go on lines 2191..2201
pkg/daemon/rpc/daemon.pb.go on lines 2245..2255
pkg/daemon/rpc/daemon.pb.go on lines 2293..2303
pkg/daemon/rpc/daemon.pb.go on lines 2347..2357
pkg/daemon/rpc/daemon.pb.go on lines 2397..2407
pkg/daemon/rpc/daemon.pb.go on lines 2458..2468
pkg/daemon/rpc/daemon.pb.go on lines 2514..2524
pkg/daemon/rpc/daemon.pb.go on lines 2626..2636
pkg/daemon/rpc/daemon.pb.go on lines 2725..2735
pkg/webhook/rpc/dhcpserver.pb.go on lines 47..57
pkg/webhook/rpc/dhcpserver.pb.go on lines 102..112
pkg/webhook/rpc/dhcpserver.pb.go on lines 159..169
pkg/webhook/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

Severity
Category
Status
Source
Language