kubenetworks/kubevpn

View on GitHub

Showing 526 of 526 total issues

Method tcpKeepAliveListener.Accept has 5 return statements (exceeds 4 allowed).
Open

func (ln *tcpKeepAliveListener) Accept() (c net.Conn, err error) {
    conn, err := ln.AcceptTCP()
    if err != nil {
        return
    }
Severity: Major
Found in pkg/core/tcp.go - About 35 mins to fix

    Method Config.SetupDNS has 5 return statements (exceeds 4 allowed).
    Open

    func (c *Config) SetupDNS(ctx context.Context) error {
        config := c.Config
        tunName := c.TunName
        log.Debugf("Setting up DNS...")
        // TODO consider use https://wiki.debian.org/NetworkManager and nmcli to config DNS
    Severity: Major
    Found in pkg/dns/dns_linux.go - About 35 mins to fix

      Method Config.watchServiceToAddHosts has 5 return statements (exceeds 4 allowed).
      Open

      func (c *Config) watchServiceToAddHosts(ctx context.Context, serviceInterface v13.ServiceInterface, hosts []Entry) {
          ticker := time.NewTicker(time.Second * 15)
          defer ticker.Stop()
          immediate := make(chan struct{}, 1)
          immediate <- struct{}{}
      Severity: Major
      Found in pkg/dns/dns.go - About 35 mins to fix

        Method Config.generateAppendHosts has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring.
        Open

        func (c *Config) generateAppendHosts(serviceList []v12.Service, hosts []Entry) []Entry {
            const ServiceKubernetes = "kubernetes"
            var entryList = sets.New[Entry]().Insert(c.Hosts...).Insert(hosts...).UnsortedList()
        
            // 1) add only if not exist
        Severity: Minor
        Found in pkg/dns/dns.go - About 35 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function CleanupHosts has 5 return statements (exceeds 4 allowed).
        Open

        func CleanupHosts() error {
            path := GetHostFile()
            content, err2 := os.ReadFile(path)
            if err2 != nil {
                return err2
        Severity: Major
        Found in pkg/dns/dns.go - About 35 mins to fix

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

              var howToGetSecret = func(name string) {
                  if configmapMap[name] == nil {
                      secret, err := d.clientset.CoreV1().Secrets(d.Namespace).Get(context.Background(), name, metav1.GetOptions{})
                      if err == nil {
                          secretMap[name] = secret
          Severity: Minor
          Found in pkg/handler/clone.go and 1 other location - About 35 mins to fix
          pkg/handler/clone.go on lines 696..703

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

          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 howToGetCm = func(name string) {
                  if configmapMap[name] == nil {
                      cm, err := d.clientset.CoreV1().ConfigMaps(d.Namespace).Get(context.Background(), name, metav1.GetOptions{})
                      if err == nil {
                          configmapMap[name] = cm
          Severity: Minor
          Found in pkg/handler/clone.go and 1 other location - About 35 mins to fix
          pkg/handler/clone.go on lines 704..711

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

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

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

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

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

          Refactorings

          Further Reading

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

          func backoff(min, max time.Duration, attemptNum int) time.Duration {
              mult := math.Pow(2, float64(attemptNum)) * float64(min)
              sleep := time.Duration(mult)
              if float64(sleep) != mult || sleep > max {
                  sleep = max
          Severity: Minor
          Found in pkg/util/file.go and 1 other location - About 35 mins to fix
          pkg/util/krew/http.go on lines 51..58

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

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

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

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

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

          Refactorings

          Further Reading

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

          func backoff(min, max time.Duration, attemptNum int) time.Duration {
              mult := math.Pow(2, float64(attemptNum)) * float64(min)
              sleep := time.Duration(mult)
              if float64(sleep) != mult || sleep > max {
                  sleep = max
          Severity: Minor
          Found in pkg/util/krew/http.go and 1 other location - About 35 mins to fix
          pkg/util/file.go on lines 100..107

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

          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

                  file_daemon_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*UpgradeResponse); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 35 mins to fix
          pkg/daemon/rpc/daemon.pb.go on lines 3319..3330
          pkg/daemon/rpc/daemon.pb.go on lines 3331..3342
          pkg/daemon/rpc/daemon.pb.go on lines 3343..3354
          pkg/daemon/rpc/daemon.pb.go on lines 3355..3366
          pkg/daemon/rpc/daemon.pb.go on lines 3367..3378
          pkg/daemon/rpc/daemon.pb.go on lines 3379..3390
          pkg/daemon/rpc/daemon.pb.go on lines 3391..3402
          pkg/daemon/rpc/daemon.pb.go on lines 3403..3414
          pkg/daemon/rpc/daemon.pb.go on lines 3415..3426
          pkg/daemon/rpc/daemon.pb.go on lines 3427..3438
          pkg/daemon/rpc/daemon.pb.go on lines 3439..3450
          pkg/daemon/rpc/daemon.pb.go on lines 3451..3462
          pkg/daemon/rpc/daemon.pb.go on lines 3463..3474
          pkg/daemon/rpc/daemon.pb.go on lines 3475..3486
          pkg/daemon/rpc/daemon.pb.go on lines 3487..3498
          pkg/daemon/rpc/daemon.pb.go on lines 3499..3510
          pkg/daemon/rpc/daemon.pb.go on lines 3511..3522
          pkg/daemon/rpc/daemon.pb.go on lines 3523..3534
          pkg/daemon/rpc/daemon.pb.go on lines 3535..3546
          pkg/daemon/rpc/daemon.pb.go on lines 3547..3558
          pkg/daemon/rpc/daemon.pb.go on lines 3559..3570
          pkg/daemon/rpc/daemon.pb.go on lines 3571..3582
          pkg/daemon/rpc/daemon.pb.go on lines 3583..3594
          pkg/daemon/rpc/daemon.pb.go on lines 3595..3606
          pkg/daemon/rpc/daemon.pb.go on lines 3607..3618
          pkg/daemon/rpc/daemon.pb.go on lines 3619..3630
          pkg/daemon/rpc/daemon.pb.go on lines 3631..3642
          pkg/daemon/rpc/daemon.pb.go on lines 3643..3654
          pkg/daemon/rpc/daemon.pb.go on lines 3655..3666
          pkg/daemon/rpc/daemon.pb.go on lines 3667..3678
          pkg/daemon/rpc/daemon.pb.go on lines 3679..3690
          pkg/daemon/rpc/daemon.pb.go on lines 3691..3702
          pkg/daemon/rpc/daemon.pb.go on lines 3703..3714
          pkg/daemon/rpc/daemon.pb.go on lines 3715..3726
          pkg/daemon/rpc/daemon.pb.go on lines 3727..3738
          pkg/daemon/rpc/daemon.pb.go on lines 3739..3750
          pkg/daemon/rpc/daemon.pb.go on lines 3751..3762
          pkg/daemon/rpc/daemon.pb.go on lines 3763..3774
          pkg/daemon/rpc/daemon.pb.go on lines 3787..3798
          pkg/daemon/rpc/daemon.pb.go on lines 3799..3810
          pkg/daemon/rpc/daemon.pb.go on lines 3811..3822
          pkg/daemon/rpc/daemon.pb.go on lines 3823..3834
          pkg/daemon/rpc/daemon.pb.go on lines 3835..3846
          pkg/daemon/rpc/daemon.pb.go on lines 3847..3858
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 325..336
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 337..348
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 349..360
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 361..372

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

          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

                  file_daemon_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*VersionRequest); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 35 mins to fix
          pkg/daemon/rpc/daemon.pb.go on lines 3319..3330
          pkg/daemon/rpc/daemon.pb.go on lines 3331..3342
          pkg/daemon/rpc/daemon.pb.go on lines 3343..3354
          pkg/daemon/rpc/daemon.pb.go on lines 3355..3366
          pkg/daemon/rpc/daemon.pb.go on lines 3367..3378
          pkg/daemon/rpc/daemon.pb.go on lines 3379..3390
          pkg/daemon/rpc/daemon.pb.go on lines 3391..3402
          pkg/daemon/rpc/daemon.pb.go on lines 3403..3414
          pkg/daemon/rpc/daemon.pb.go on lines 3415..3426
          pkg/daemon/rpc/daemon.pb.go on lines 3427..3438
          pkg/daemon/rpc/daemon.pb.go on lines 3439..3450
          pkg/daemon/rpc/daemon.pb.go on lines 3451..3462
          pkg/daemon/rpc/daemon.pb.go on lines 3463..3474
          pkg/daemon/rpc/daemon.pb.go on lines 3475..3486
          pkg/daemon/rpc/daemon.pb.go on lines 3487..3498
          pkg/daemon/rpc/daemon.pb.go on lines 3499..3510
          pkg/daemon/rpc/daemon.pb.go on lines 3511..3522
          pkg/daemon/rpc/daemon.pb.go on lines 3523..3534
          pkg/daemon/rpc/daemon.pb.go on lines 3535..3546
          pkg/daemon/rpc/daemon.pb.go on lines 3559..3570
          pkg/daemon/rpc/daemon.pb.go on lines 3571..3582
          pkg/daemon/rpc/daemon.pb.go on lines 3583..3594
          pkg/daemon/rpc/daemon.pb.go on lines 3595..3606
          pkg/daemon/rpc/daemon.pb.go on lines 3607..3618
          pkg/daemon/rpc/daemon.pb.go on lines 3619..3630
          pkg/daemon/rpc/daemon.pb.go on lines 3631..3642
          pkg/daemon/rpc/daemon.pb.go on lines 3643..3654
          pkg/daemon/rpc/daemon.pb.go on lines 3655..3666
          pkg/daemon/rpc/daemon.pb.go on lines 3667..3678
          pkg/daemon/rpc/daemon.pb.go on lines 3679..3690
          pkg/daemon/rpc/daemon.pb.go on lines 3691..3702
          pkg/daemon/rpc/daemon.pb.go on lines 3703..3714
          pkg/daemon/rpc/daemon.pb.go on lines 3715..3726
          pkg/daemon/rpc/daemon.pb.go on lines 3727..3738
          pkg/daemon/rpc/daemon.pb.go on lines 3739..3750
          pkg/daemon/rpc/daemon.pb.go on lines 3751..3762
          pkg/daemon/rpc/daemon.pb.go on lines 3763..3774
          pkg/daemon/rpc/daemon.pb.go on lines 3775..3786
          pkg/daemon/rpc/daemon.pb.go on lines 3787..3798
          pkg/daemon/rpc/daemon.pb.go on lines 3799..3810
          pkg/daemon/rpc/daemon.pb.go on lines 3811..3822
          pkg/daemon/rpc/daemon.pb.go on lines 3823..3834
          pkg/daemon/rpc/daemon.pb.go on lines 3835..3846
          pkg/daemon/rpc/daemon.pb.go on lines 3847..3858
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 325..336
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 337..348
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 349..360
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 361..372

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

          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

                  file_daemon_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*SshStopRequest); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 35 mins to fix
          pkg/daemon/rpc/daemon.pb.go on lines 3319..3330
          pkg/daemon/rpc/daemon.pb.go on lines 3331..3342
          pkg/daemon/rpc/daemon.pb.go on lines 3343..3354
          pkg/daemon/rpc/daemon.pb.go on lines 3355..3366
          pkg/daemon/rpc/daemon.pb.go on lines 3367..3378
          pkg/daemon/rpc/daemon.pb.go on lines 3379..3390
          pkg/daemon/rpc/daemon.pb.go on lines 3391..3402
          pkg/daemon/rpc/daemon.pb.go on lines 3403..3414
          pkg/daemon/rpc/daemon.pb.go on lines 3415..3426
          pkg/daemon/rpc/daemon.pb.go on lines 3427..3438
          pkg/daemon/rpc/daemon.pb.go on lines 3439..3450
          pkg/daemon/rpc/daemon.pb.go on lines 3451..3462
          pkg/daemon/rpc/daemon.pb.go on lines 3463..3474
          pkg/daemon/rpc/daemon.pb.go on lines 3475..3486
          pkg/daemon/rpc/daemon.pb.go on lines 3487..3498
          pkg/daemon/rpc/daemon.pb.go on lines 3499..3510
          pkg/daemon/rpc/daemon.pb.go on lines 3511..3522
          pkg/daemon/rpc/daemon.pb.go on lines 3523..3534
          pkg/daemon/rpc/daemon.pb.go on lines 3535..3546
          pkg/daemon/rpc/daemon.pb.go on lines 3547..3558
          pkg/daemon/rpc/daemon.pb.go on lines 3559..3570
          pkg/daemon/rpc/daemon.pb.go on lines 3571..3582
          pkg/daemon/rpc/daemon.pb.go on lines 3583..3594
          pkg/daemon/rpc/daemon.pb.go on lines 3595..3606
          pkg/daemon/rpc/daemon.pb.go on lines 3619..3630
          pkg/daemon/rpc/daemon.pb.go on lines 3631..3642
          pkg/daemon/rpc/daemon.pb.go on lines 3643..3654
          pkg/daemon/rpc/daemon.pb.go on lines 3655..3666
          pkg/daemon/rpc/daemon.pb.go on lines 3667..3678
          pkg/daemon/rpc/daemon.pb.go on lines 3679..3690
          pkg/daemon/rpc/daemon.pb.go on lines 3691..3702
          pkg/daemon/rpc/daemon.pb.go on lines 3703..3714
          pkg/daemon/rpc/daemon.pb.go on lines 3715..3726
          pkg/daemon/rpc/daemon.pb.go on lines 3727..3738
          pkg/daemon/rpc/daemon.pb.go on lines 3739..3750
          pkg/daemon/rpc/daemon.pb.go on lines 3751..3762
          pkg/daemon/rpc/daemon.pb.go on lines 3763..3774
          pkg/daemon/rpc/daemon.pb.go on lines 3775..3786
          pkg/daemon/rpc/daemon.pb.go on lines 3787..3798
          pkg/daemon/rpc/daemon.pb.go on lines 3799..3810
          pkg/daemon/rpc/daemon.pb.go on lines 3811..3822
          pkg/daemon/rpc/daemon.pb.go on lines 3823..3834
          pkg/daemon/rpc/daemon.pb.go on lines 3835..3846
          pkg/daemon/rpc/daemon.pb.go on lines 3847..3858
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 325..336
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 337..348
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 349..360
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 361..372

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

          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

                  file_daemon_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*IdentifyRequest); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 35 mins to fix
          pkg/daemon/rpc/daemon.pb.go on lines 3319..3330
          pkg/daemon/rpc/daemon.pb.go on lines 3331..3342
          pkg/daemon/rpc/daemon.pb.go on lines 3343..3354
          pkg/daemon/rpc/daemon.pb.go on lines 3355..3366
          pkg/daemon/rpc/daemon.pb.go on lines 3367..3378
          pkg/daemon/rpc/daemon.pb.go on lines 3379..3390
          pkg/daemon/rpc/daemon.pb.go on lines 3391..3402
          pkg/daemon/rpc/daemon.pb.go on lines 3403..3414
          pkg/daemon/rpc/daemon.pb.go on lines 3415..3426
          pkg/daemon/rpc/daemon.pb.go on lines 3427..3438
          pkg/daemon/rpc/daemon.pb.go on lines 3439..3450
          pkg/daemon/rpc/daemon.pb.go on lines 3451..3462
          pkg/daemon/rpc/daemon.pb.go on lines 3463..3474
          pkg/daemon/rpc/daemon.pb.go on lines 3475..3486
          pkg/daemon/rpc/daemon.pb.go on lines 3487..3498
          pkg/daemon/rpc/daemon.pb.go on lines 3499..3510
          pkg/daemon/rpc/daemon.pb.go on lines 3511..3522
          pkg/daemon/rpc/daemon.pb.go on lines 3523..3534
          pkg/daemon/rpc/daemon.pb.go on lines 3535..3546
          pkg/daemon/rpc/daemon.pb.go on lines 3547..3558
          pkg/daemon/rpc/daemon.pb.go on lines 3559..3570
          pkg/daemon/rpc/daemon.pb.go on lines 3571..3582
          pkg/daemon/rpc/daemon.pb.go on lines 3583..3594
          pkg/daemon/rpc/daemon.pb.go on lines 3595..3606
          pkg/daemon/rpc/daemon.pb.go on lines 3607..3618
          pkg/daemon/rpc/daemon.pb.go on lines 3619..3630
          pkg/daemon/rpc/daemon.pb.go on lines 3631..3642
          pkg/daemon/rpc/daemon.pb.go on lines 3643..3654
          pkg/daemon/rpc/daemon.pb.go on lines 3655..3666
          pkg/daemon/rpc/daemon.pb.go on lines 3667..3678
          pkg/daemon/rpc/daemon.pb.go on lines 3679..3690
          pkg/daemon/rpc/daemon.pb.go on lines 3691..3702
          pkg/daemon/rpc/daemon.pb.go on lines 3703..3714
          pkg/daemon/rpc/daemon.pb.go on lines 3715..3726
          pkg/daemon/rpc/daemon.pb.go on lines 3727..3738
          pkg/daemon/rpc/daemon.pb.go on lines 3739..3750
          pkg/daemon/rpc/daemon.pb.go on lines 3751..3762
          pkg/daemon/rpc/daemon.pb.go on lines 3763..3774
          pkg/daemon/rpc/daemon.pb.go on lines 3775..3786
          pkg/daemon/rpc/daemon.pb.go on lines 3787..3798
          pkg/daemon/rpc/daemon.pb.go on lines 3799..3810
          pkg/daemon/rpc/daemon.pb.go on lines 3811..3822
          pkg/daemon/rpc/daemon.pb.go on lines 3823..3834
          pkg/daemon/rpc/daemon.pb.go on lines 3847..3858
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 325..336
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 337..348
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 349..360
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 361..372

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

          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

                  file_daemon_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*SshStartResponse); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 35 mins to fix
          pkg/daemon/rpc/daemon.pb.go on lines 3319..3330
          pkg/daemon/rpc/daemon.pb.go on lines 3331..3342
          pkg/daemon/rpc/daemon.pb.go on lines 3343..3354
          pkg/daemon/rpc/daemon.pb.go on lines 3355..3366
          pkg/daemon/rpc/daemon.pb.go on lines 3367..3378
          pkg/daemon/rpc/daemon.pb.go on lines 3379..3390
          pkg/daemon/rpc/daemon.pb.go on lines 3391..3402
          pkg/daemon/rpc/daemon.pb.go on lines 3403..3414
          pkg/daemon/rpc/daemon.pb.go on lines 3415..3426
          pkg/daemon/rpc/daemon.pb.go on lines 3427..3438
          pkg/daemon/rpc/daemon.pb.go on lines 3439..3450
          pkg/daemon/rpc/daemon.pb.go on lines 3451..3462
          pkg/daemon/rpc/daemon.pb.go on lines 3463..3474
          pkg/daemon/rpc/daemon.pb.go on lines 3475..3486
          pkg/daemon/rpc/daemon.pb.go on lines 3487..3498
          pkg/daemon/rpc/daemon.pb.go on lines 3499..3510
          pkg/daemon/rpc/daemon.pb.go on lines 3511..3522
          pkg/daemon/rpc/daemon.pb.go on lines 3523..3534
          pkg/daemon/rpc/daemon.pb.go on lines 3535..3546
          pkg/daemon/rpc/daemon.pb.go on lines 3547..3558
          pkg/daemon/rpc/daemon.pb.go on lines 3559..3570
          pkg/daemon/rpc/daemon.pb.go on lines 3571..3582
          pkg/daemon/rpc/daemon.pb.go on lines 3583..3594
          pkg/daemon/rpc/daemon.pb.go on lines 3607..3618
          pkg/daemon/rpc/daemon.pb.go on lines 3619..3630
          pkg/daemon/rpc/daemon.pb.go on lines 3631..3642
          pkg/daemon/rpc/daemon.pb.go on lines 3643..3654
          pkg/daemon/rpc/daemon.pb.go on lines 3655..3666
          pkg/daemon/rpc/daemon.pb.go on lines 3667..3678
          pkg/daemon/rpc/daemon.pb.go on lines 3679..3690
          pkg/daemon/rpc/daemon.pb.go on lines 3691..3702
          pkg/daemon/rpc/daemon.pb.go on lines 3703..3714
          pkg/daemon/rpc/daemon.pb.go on lines 3715..3726
          pkg/daemon/rpc/daemon.pb.go on lines 3727..3738
          pkg/daemon/rpc/daemon.pb.go on lines 3739..3750
          pkg/daemon/rpc/daemon.pb.go on lines 3751..3762
          pkg/daemon/rpc/daemon.pb.go on lines 3763..3774
          pkg/daemon/rpc/daemon.pb.go on lines 3775..3786
          pkg/daemon/rpc/daemon.pb.go on lines 3787..3798
          pkg/daemon/rpc/daemon.pb.go on lines 3799..3810
          pkg/daemon/rpc/daemon.pb.go on lines 3811..3822
          pkg/daemon/rpc/daemon.pb.go on lines 3823..3834
          pkg/daemon/rpc/daemon.pb.go on lines 3835..3846
          pkg/daemon/rpc/daemon.pb.go on lines 3847..3858
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 325..336
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 337..348
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 349..360
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 361..372

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

          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

                  file_daemon_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*GetRequest); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 35 mins to fix
          pkg/daemon/rpc/daemon.pb.go on lines 3319..3330
          pkg/daemon/rpc/daemon.pb.go on lines 3331..3342
          pkg/daemon/rpc/daemon.pb.go on lines 3343..3354
          pkg/daemon/rpc/daemon.pb.go on lines 3355..3366
          pkg/daemon/rpc/daemon.pb.go on lines 3367..3378
          pkg/daemon/rpc/daemon.pb.go on lines 3379..3390
          pkg/daemon/rpc/daemon.pb.go on lines 3391..3402
          pkg/daemon/rpc/daemon.pb.go on lines 3403..3414
          pkg/daemon/rpc/daemon.pb.go on lines 3415..3426
          pkg/daemon/rpc/daemon.pb.go on lines 3427..3438
          pkg/daemon/rpc/daemon.pb.go on lines 3439..3450
          pkg/daemon/rpc/daemon.pb.go on lines 3451..3462
          pkg/daemon/rpc/daemon.pb.go on lines 3463..3474
          pkg/daemon/rpc/daemon.pb.go on lines 3475..3486
          pkg/daemon/rpc/daemon.pb.go on lines 3487..3498
          pkg/daemon/rpc/daemon.pb.go on lines 3499..3510
          pkg/daemon/rpc/daemon.pb.go on lines 3511..3522
          pkg/daemon/rpc/daemon.pb.go on lines 3523..3534
          pkg/daemon/rpc/daemon.pb.go on lines 3535..3546
          pkg/daemon/rpc/daemon.pb.go on lines 3547..3558
          pkg/daemon/rpc/daemon.pb.go on lines 3559..3570
          pkg/daemon/rpc/daemon.pb.go on lines 3571..3582
          pkg/daemon/rpc/daemon.pb.go on lines 3583..3594
          pkg/daemon/rpc/daemon.pb.go on lines 3595..3606
          pkg/daemon/rpc/daemon.pb.go on lines 3607..3618
          pkg/daemon/rpc/daemon.pb.go on lines 3619..3630
          pkg/daemon/rpc/daemon.pb.go on lines 3631..3642
          pkg/daemon/rpc/daemon.pb.go on lines 3643..3654
          pkg/daemon/rpc/daemon.pb.go on lines 3655..3666
          pkg/daemon/rpc/daemon.pb.go on lines 3667..3678
          pkg/daemon/rpc/daemon.pb.go on lines 3679..3690
          pkg/daemon/rpc/daemon.pb.go on lines 3691..3702
          pkg/daemon/rpc/daemon.pb.go on lines 3703..3714
          pkg/daemon/rpc/daemon.pb.go on lines 3715..3726
          pkg/daemon/rpc/daemon.pb.go on lines 3727..3738
          pkg/daemon/rpc/daemon.pb.go on lines 3751..3762
          pkg/daemon/rpc/daemon.pb.go on lines 3763..3774
          pkg/daemon/rpc/daemon.pb.go on lines 3775..3786
          pkg/daemon/rpc/daemon.pb.go on lines 3787..3798
          pkg/daemon/rpc/daemon.pb.go on lines 3799..3810
          pkg/daemon/rpc/daemon.pb.go on lines 3811..3822
          pkg/daemon/rpc/daemon.pb.go on lines 3823..3834
          pkg/daemon/rpc/daemon.pb.go on lines 3835..3846
          pkg/daemon/rpc/daemon.pb.go on lines 3847..3858
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 325..336
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 337..348
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 349..360
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 361..372

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

          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

                  file_daemon_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*ExtraRoute); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 35 mins to fix
          pkg/daemon/rpc/daemon.pb.go on lines 3319..3330
          pkg/daemon/rpc/daemon.pb.go on lines 3331..3342
          pkg/daemon/rpc/daemon.pb.go on lines 3343..3354
          pkg/daemon/rpc/daemon.pb.go on lines 3355..3366
          pkg/daemon/rpc/daemon.pb.go on lines 3367..3378
          pkg/daemon/rpc/daemon.pb.go on lines 3379..3390
          pkg/daemon/rpc/daemon.pb.go on lines 3391..3402
          pkg/daemon/rpc/daemon.pb.go on lines 3403..3414
          pkg/daemon/rpc/daemon.pb.go on lines 3415..3426
          pkg/daemon/rpc/daemon.pb.go on lines 3427..3438
          pkg/daemon/rpc/daemon.pb.go on lines 3439..3450
          pkg/daemon/rpc/daemon.pb.go on lines 3451..3462
          pkg/daemon/rpc/daemon.pb.go on lines 3463..3474
          pkg/daemon/rpc/daemon.pb.go on lines 3475..3486
          pkg/daemon/rpc/daemon.pb.go on lines 3487..3498
          pkg/daemon/rpc/daemon.pb.go on lines 3499..3510
          pkg/daemon/rpc/daemon.pb.go on lines 3511..3522
          pkg/daemon/rpc/daemon.pb.go on lines 3523..3534
          pkg/daemon/rpc/daemon.pb.go on lines 3535..3546
          pkg/daemon/rpc/daemon.pb.go on lines 3547..3558
          pkg/daemon/rpc/daemon.pb.go on lines 3559..3570
          pkg/daemon/rpc/daemon.pb.go on lines 3571..3582
          pkg/daemon/rpc/daemon.pb.go on lines 3583..3594
          pkg/daemon/rpc/daemon.pb.go on lines 3595..3606
          pkg/daemon/rpc/daemon.pb.go on lines 3607..3618
          pkg/daemon/rpc/daemon.pb.go on lines 3619..3630
          pkg/daemon/rpc/daemon.pb.go on lines 3631..3642
          pkg/daemon/rpc/daemon.pb.go on lines 3643..3654
          pkg/daemon/rpc/daemon.pb.go on lines 3655..3666
          pkg/daemon/rpc/daemon.pb.go on lines 3667..3678
          pkg/daemon/rpc/daemon.pb.go on lines 3679..3690
          pkg/daemon/rpc/daemon.pb.go on lines 3691..3702
          pkg/daemon/rpc/daemon.pb.go on lines 3703..3714
          pkg/daemon/rpc/daemon.pb.go on lines 3715..3726
          pkg/daemon/rpc/daemon.pb.go on lines 3727..3738
          pkg/daemon/rpc/daemon.pb.go on lines 3739..3750
          pkg/daemon/rpc/daemon.pb.go on lines 3751..3762
          pkg/daemon/rpc/daemon.pb.go on lines 3763..3774
          pkg/daemon/rpc/daemon.pb.go on lines 3775..3786
          pkg/daemon/rpc/daemon.pb.go on lines 3787..3798
          pkg/daemon/rpc/daemon.pb.go on lines 3799..3810
          pkg/daemon/rpc/daemon.pb.go on lines 3811..3822
          pkg/daemon/rpc/daemon.pb.go on lines 3835..3846
          pkg/daemon/rpc/daemon.pb.go on lines 3847..3858
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 325..336
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 337..348
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 349..360
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 361..372

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

          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

                  file_daemon_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*SshStartRequest); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 35 mins to fix
          pkg/daemon/rpc/daemon.pb.go on lines 3319..3330
          pkg/daemon/rpc/daemon.pb.go on lines 3331..3342
          pkg/daemon/rpc/daemon.pb.go on lines 3343..3354
          pkg/daemon/rpc/daemon.pb.go on lines 3355..3366
          pkg/daemon/rpc/daemon.pb.go on lines 3367..3378
          pkg/daemon/rpc/daemon.pb.go on lines 3379..3390
          pkg/daemon/rpc/daemon.pb.go on lines 3391..3402
          pkg/daemon/rpc/daemon.pb.go on lines 3403..3414
          pkg/daemon/rpc/daemon.pb.go on lines 3415..3426
          pkg/daemon/rpc/daemon.pb.go on lines 3427..3438
          pkg/daemon/rpc/daemon.pb.go on lines 3439..3450
          pkg/daemon/rpc/daemon.pb.go on lines 3451..3462
          pkg/daemon/rpc/daemon.pb.go on lines 3463..3474
          pkg/daemon/rpc/daemon.pb.go on lines 3475..3486
          pkg/daemon/rpc/daemon.pb.go on lines 3487..3498
          pkg/daemon/rpc/daemon.pb.go on lines 3499..3510
          pkg/daemon/rpc/daemon.pb.go on lines 3511..3522
          pkg/daemon/rpc/daemon.pb.go on lines 3523..3534
          pkg/daemon/rpc/daemon.pb.go on lines 3535..3546
          pkg/daemon/rpc/daemon.pb.go on lines 3547..3558
          pkg/daemon/rpc/daemon.pb.go on lines 3559..3570
          pkg/daemon/rpc/daemon.pb.go on lines 3571..3582
          pkg/daemon/rpc/daemon.pb.go on lines 3595..3606
          pkg/daemon/rpc/daemon.pb.go on lines 3607..3618
          pkg/daemon/rpc/daemon.pb.go on lines 3619..3630
          pkg/daemon/rpc/daemon.pb.go on lines 3631..3642
          pkg/daemon/rpc/daemon.pb.go on lines 3643..3654
          pkg/daemon/rpc/daemon.pb.go on lines 3655..3666
          pkg/daemon/rpc/daemon.pb.go on lines 3667..3678
          pkg/daemon/rpc/daemon.pb.go on lines 3679..3690
          pkg/daemon/rpc/daemon.pb.go on lines 3691..3702
          pkg/daemon/rpc/daemon.pb.go on lines 3703..3714
          pkg/daemon/rpc/daemon.pb.go on lines 3715..3726
          pkg/daemon/rpc/daemon.pb.go on lines 3727..3738
          pkg/daemon/rpc/daemon.pb.go on lines 3739..3750
          pkg/daemon/rpc/daemon.pb.go on lines 3751..3762
          pkg/daemon/rpc/daemon.pb.go on lines 3763..3774
          pkg/daemon/rpc/daemon.pb.go on lines 3775..3786
          pkg/daemon/rpc/daemon.pb.go on lines 3787..3798
          pkg/daemon/rpc/daemon.pb.go on lines 3799..3810
          pkg/daemon/rpc/daemon.pb.go on lines 3811..3822
          pkg/daemon/rpc/daemon.pb.go on lines 3823..3834
          pkg/daemon/rpc/daemon.pb.go on lines 3835..3846
          pkg/daemon/rpc/daemon.pb.go on lines 3847..3858
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 325..336
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 337..348
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 349..360
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 361..372

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

          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

                  file_daemon_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*SshConnectRequest); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 35 mins to fix
          pkg/daemon/rpc/daemon.pb.go on lines 3319..3330
          pkg/daemon/rpc/daemon.pb.go on lines 3331..3342
          pkg/daemon/rpc/daemon.pb.go on lines 3343..3354
          pkg/daemon/rpc/daemon.pb.go on lines 3355..3366
          pkg/daemon/rpc/daemon.pb.go on lines 3367..3378
          pkg/daemon/rpc/daemon.pb.go on lines 3379..3390
          pkg/daemon/rpc/daemon.pb.go on lines 3391..3402
          pkg/daemon/rpc/daemon.pb.go on lines 3403..3414
          pkg/daemon/rpc/daemon.pb.go on lines 3415..3426
          pkg/daemon/rpc/daemon.pb.go on lines 3427..3438
          pkg/daemon/rpc/daemon.pb.go on lines 3439..3450
          pkg/daemon/rpc/daemon.pb.go on lines 3451..3462
          pkg/daemon/rpc/daemon.pb.go on lines 3463..3474
          pkg/daemon/rpc/daemon.pb.go on lines 3475..3486
          pkg/daemon/rpc/daemon.pb.go on lines 3487..3498
          pkg/daemon/rpc/daemon.pb.go on lines 3499..3510
          pkg/daemon/rpc/daemon.pb.go on lines 3511..3522
          pkg/daemon/rpc/daemon.pb.go on lines 3523..3534
          pkg/daemon/rpc/daemon.pb.go on lines 3535..3546
          pkg/daemon/rpc/daemon.pb.go on lines 3547..3558
          pkg/daemon/rpc/daemon.pb.go on lines 3559..3570
          pkg/daemon/rpc/daemon.pb.go on lines 3571..3582
          pkg/daemon/rpc/daemon.pb.go on lines 3583..3594
          pkg/daemon/rpc/daemon.pb.go on lines 3595..3606
          pkg/daemon/rpc/daemon.pb.go on lines 3607..3618
          pkg/daemon/rpc/daemon.pb.go on lines 3619..3630
          pkg/daemon/rpc/daemon.pb.go on lines 3643..3654
          pkg/daemon/rpc/daemon.pb.go on lines 3655..3666
          pkg/daemon/rpc/daemon.pb.go on lines 3667..3678
          pkg/daemon/rpc/daemon.pb.go on lines 3679..3690
          pkg/daemon/rpc/daemon.pb.go on lines 3691..3702
          pkg/daemon/rpc/daemon.pb.go on lines 3703..3714
          pkg/daemon/rpc/daemon.pb.go on lines 3715..3726
          pkg/daemon/rpc/daemon.pb.go on lines 3727..3738
          pkg/daemon/rpc/daemon.pb.go on lines 3739..3750
          pkg/daemon/rpc/daemon.pb.go on lines 3751..3762
          pkg/daemon/rpc/daemon.pb.go on lines 3763..3774
          pkg/daemon/rpc/daemon.pb.go on lines 3775..3786
          pkg/daemon/rpc/daemon.pb.go on lines 3787..3798
          pkg/daemon/rpc/daemon.pb.go on lines 3799..3810
          pkg/daemon/rpc/daemon.pb.go on lines 3811..3822
          pkg/daemon/rpc/daemon.pb.go on lines 3823..3834
          pkg/daemon/rpc/daemon.pb.go on lines 3835..3846
          pkg/daemon/rpc/daemon.pb.go on lines 3847..3858
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 325..336
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 337..348
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 349..360
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 361..372

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

          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

                  file_daemon_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*LeaveRequest); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 35 mins to fix
          pkg/daemon/rpc/daemon.pb.go on lines 3319..3330
          pkg/daemon/rpc/daemon.pb.go on lines 3331..3342
          pkg/daemon/rpc/daemon.pb.go on lines 3343..3354
          pkg/daemon/rpc/daemon.pb.go on lines 3355..3366
          pkg/daemon/rpc/daemon.pb.go on lines 3379..3390
          pkg/daemon/rpc/daemon.pb.go on lines 3391..3402
          pkg/daemon/rpc/daemon.pb.go on lines 3403..3414
          pkg/daemon/rpc/daemon.pb.go on lines 3415..3426
          pkg/daemon/rpc/daemon.pb.go on lines 3427..3438
          pkg/daemon/rpc/daemon.pb.go on lines 3439..3450
          pkg/daemon/rpc/daemon.pb.go on lines 3451..3462
          pkg/daemon/rpc/daemon.pb.go on lines 3463..3474
          pkg/daemon/rpc/daemon.pb.go on lines 3475..3486
          pkg/daemon/rpc/daemon.pb.go on lines 3487..3498
          pkg/daemon/rpc/daemon.pb.go on lines 3499..3510
          pkg/daemon/rpc/daemon.pb.go on lines 3511..3522
          pkg/daemon/rpc/daemon.pb.go on lines 3523..3534
          pkg/daemon/rpc/daemon.pb.go on lines 3535..3546
          pkg/daemon/rpc/daemon.pb.go on lines 3547..3558
          pkg/daemon/rpc/daemon.pb.go on lines 3559..3570
          pkg/daemon/rpc/daemon.pb.go on lines 3571..3582
          pkg/daemon/rpc/daemon.pb.go on lines 3583..3594
          pkg/daemon/rpc/daemon.pb.go on lines 3595..3606
          pkg/daemon/rpc/daemon.pb.go on lines 3607..3618
          pkg/daemon/rpc/daemon.pb.go on lines 3619..3630
          pkg/daemon/rpc/daemon.pb.go on lines 3631..3642
          pkg/daemon/rpc/daemon.pb.go on lines 3643..3654
          pkg/daemon/rpc/daemon.pb.go on lines 3655..3666
          pkg/daemon/rpc/daemon.pb.go on lines 3667..3678
          pkg/daemon/rpc/daemon.pb.go on lines 3679..3690
          pkg/daemon/rpc/daemon.pb.go on lines 3691..3702
          pkg/daemon/rpc/daemon.pb.go on lines 3703..3714
          pkg/daemon/rpc/daemon.pb.go on lines 3715..3726
          pkg/daemon/rpc/daemon.pb.go on lines 3727..3738
          pkg/daemon/rpc/daemon.pb.go on lines 3739..3750
          pkg/daemon/rpc/daemon.pb.go on lines 3751..3762
          pkg/daemon/rpc/daemon.pb.go on lines 3763..3774
          pkg/daemon/rpc/daemon.pb.go on lines 3775..3786
          pkg/daemon/rpc/daemon.pb.go on lines 3787..3798
          pkg/daemon/rpc/daemon.pb.go on lines 3799..3810
          pkg/daemon/rpc/daemon.pb.go on lines 3811..3822
          pkg/daemon/rpc/daemon.pb.go on lines 3823..3834
          pkg/daemon/rpc/daemon.pb.go on lines 3835..3846
          pkg/daemon/rpc/daemon.pb.go on lines 3847..3858
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 325..336
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 337..348
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 349..360
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 361..372

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

          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

                  file_daemon_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
                      switch v := v.(*Proxy); i {
                      case 0:
                          return &v.state
                      case 1:
          Severity: Major
          Found in pkg/daemon/rpc/daemon.pb.go and 48 other locations - About 35 mins to fix
          pkg/daemon/rpc/daemon.pb.go on lines 3319..3330
          pkg/daemon/rpc/daemon.pb.go on lines 3331..3342
          pkg/daemon/rpc/daemon.pb.go on lines 3343..3354
          pkg/daemon/rpc/daemon.pb.go on lines 3355..3366
          pkg/daemon/rpc/daemon.pb.go on lines 3367..3378
          pkg/daemon/rpc/daemon.pb.go on lines 3379..3390
          pkg/daemon/rpc/daemon.pb.go on lines 3391..3402
          pkg/daemon/rpc/daemon.pb.go on lines 3403..3414
          pkg/daemon/rpc/daemon.pb.go on lines 3415..3426
          pkg/daemon/rpc/daemon.pb.go on lines 3427..3438
          pkg/daemon/rpc/daemon.pb.go on lines 3439..3450
          pkg/daemon/rpc/daemon.pb.go on lines 3451..3462
          pkg/daemon/rpc/daemon.pb.go on lines 3463..3474
          pkg/daemon/rpc/daemon.pb.go on lines 3475..3486
          pkg/daemon/rpc/daemon.pb.go on lines 3487..3498
          pkg/daemon/rpc/daemon.pb.go on lines 3511..3522
          pkg/daemon/rpc/daemon.pb.go on lines 3523..3534
          pkg/daemon/rpc/daemon.pb.go on lines 3535..3546
          pkg/daemon/rpc/daemon.pb.go on lines 3547..3558
          pkg/daemon/rpc/daemon.pb.go on lines 3559..3570
          pkg/daemon/rpc/daemon.pb.go on lines 3571..3582
          pkg/daemon/rpc/daemon.pb.go on lines 3583..3594
          pkg/daemon/rpc/daemon.pb.go on lines 3595..3606
          pkg/daemon/rpc/daemon.pb.go on lines 3607..3618
          pkg/daemon/rpc/daemon.pb.go on lines 3619..3630
          pkg/daemon/rpc/daemon.pb.go on lines 3631..3642
          pkg/daemon/rpc/daemon.pb.go on lines 3643..3654
          pkg/daemon/rpc/daemon.pb.go on lines 3655..3666
          pkg/daemon/rpc/daemon.pb.go on lines 3667..3678
          pkg/daemon/rpc/daemon.pb.go on lines 3679..3690
          pkg/daemon/rpc/daemon.pb.go on lines 3691..3702
          pkg/daemon/rpc/daemon.pb.go on lines 3703..3714
          pkg/daemon/rpc/daemon.pb.go on lines 3715..3726
          pkg/daemon/rpc/daemon.pb.go on lines 3727..3738
          pkg/daemon/rpc/daemon.pb.go on lines 3739..3750
          pkg/daemon/rpc/daemon.pb.go on lines 3751..3762
          pkg/daemon/rpc/daemon.pb.go on lines 3763..3774
          pkg/daemon/rpc/daemon.pb.go on lines 3775..3786
          pkg/daemon/rpc/daemon.pb.go on lines 3787..3798
          pkg/daemon/rpc/daemon.pb.go on lines 3799..3810
          pkg/daemon/rpc/daemon.pb.go on lines 3811..3822
          pkg/daemon/rpc/daemon.pb.go on lines 3823..3834
          pkg/daemon/rpc/daemon.pb.go on lines 3835..3846
          pkg/daemon/rpc/daemon.pb.go on lines 3847..3858
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 325..336
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 337..348
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 349..360
          pkg/dhcp/rpc/dhcpserver.pb.go on lines 361..372

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

          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