docker/swarmkit

View on GitHub
api/objects.pb.go

Summary

Maintainability
F
5 mos
Test Coverage

File objects.pb.go has 9355 lines of code (exceeds 500 allowed). Consider refactoring.
Open

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/docker/swarmkit/api/objects.proto

package api

Severity: Major
Found in api/objects.pb.go - About 3 wks to fix

    Method Task.Unmarshal has a Cognitive Complexity of 518 (exceeds 20 allowed). Consider refactoring.
    Open

    func (m *Task) Unmarshal(dAtA []byte) error {
        l := len(dAtA)
        iNdEx := 0
        for iNdEx < l {
            preIndex := iNdEx
    Severity: Minor
    Found in api/objects.pb.go - About 1 wk 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

    Method Cluster.Unmarshal has a Cognitive Complexity of 460 (exceeds 20 allowed). Consider refactoring.
    Open

    func (m *Cluster) Unmarshal(dAtA []byte) error {
        l := len(dAtA)
        iNdEx := 0
        for iNdEx < l {
            preIndex := iNdEx
    Severity: Minor
    Found in api/objects.pb.go - About 1 wk 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

    Method Node.Unmarshal has a Cognitive Complexity of 341 (exceeds 20 allowed). Consider refactoring.
    Open

    func (m *Node) Unmarshal(dAtA []byte) error {
        l := len(dAtA)
        iNdEx := 0
        for iNdEx < l {
            preIndex := iNdEx
    Severity: Minor
    Found in api/objects.pb.go - About 6 days 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

    Method Service.Unmarshal has a Cognitive Complexity of 332 (exceeds 20 allowed). Consider refactoring.
    Open

    func (m *Service) Unmarshal(dAtA []byte) error {
        l := len(dAtA)
        iNdEx := 0
        for iNdEx < l {
            preIndex := iNdEx
    Severity: Minor
    Found in api/objects.pb.go - About 6 days 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

    Method NetworkAttachment.Unmarshal has a Cognitive Complexity of 266 (exceeds 20 allowed). Consider refactoring.
    Open

    func (m *NetworkAttachment) Unmarshal(dAtA []byte) error {
        l := len(dAtA)
        iNdEx := 0
        for iNdEx < l {
            preIndex := iNdEx
    Severity: Minor
    Found in api/objects.pb.go - About 5 days 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

    Method Network.Unmarshal has a Cognitive Complexity of 200 (exceeds 20 allowed). Consider refactoring.
    Open

    func (m *Network) Unmarshal(dAtA []byte) error {
        l := len(dAtA)
        iNdEx := 0
        for iNdEx < l {
            preIndex := iNdEx
    Severity: Minor
    Found in api/objects.pb.go - About 3 days 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

    Method Volume.Unmarshal has a Cognitive Complexity of 197 (exceeds 20 allowed). Consider refactoring.
    Open

    func (m *Volume) Unmarshal(dAtA []byte) error {
        l := len(dAtA)
        iNdEx := 0
        for iNdEx < l {
            preIndex := iNdEx
    Severity: Minor
    Found in api/objects.pb.go - About 3 days 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

    Method Resource.Unmarshal has a Cognitive Complexity of 176 (exceeds 20 allowed). Consider refactoring.
    Open

    func (m *Resource) Unmarshal(dAtA []byte) error {
        l := len(dAtA)
        iNdEx := 0
        for iNdEx < l {
            preIndex := iNdEx
    Severity: Minor
    Found in api/objects.pb.go - About 3 days 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

    Method Task.Unmarshal has 592 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (m *Task) Unmarshal(dAtA []byte) error {
        l := len(dAtA)
        iNdEx := 0
        for iNdEx < l {
            preIndex := iNdEx
    Severity: Major
    Found in api/objects.pb.go - About 2 days to fix

      Method Extension.Unmarshal has a Cognitive Complexity of 143 (exceeds 20 allowed). Consider refactoring.
      Open

      func (m *Extension) Unmarshal(dAtA []byte) error {
          l := len(dAtA)
          iNdEx := 0
          for iNdEx < l {
              preIndex := iNdEx
      Severity: Minor
      Found in api/objects.pb.go - About 2 days 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

      Method Secret.Unmarshal has a Cognitive Complexity of 134 (exceeds 20 allowed). Consider refactoring.
      Open

      func (m *Secret) Unmarshal(dAtA []byte) error {
          l := len(dAtA)
          iNdEx := 0
          for iNdEx < l {
              preIndex := iNdEx
      Severity: Minor
      Found in api/objects.pb.go - About 2 days 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

      Method Cluster.Unmarshal has 484 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (m *Cluster) Unmarshal(dAtA []byte) error {
          l := len(dAtA)
          iNdEx := 0
          for iNdEx < l {
              preIndex := iNdEx
      Severity: Major
      Found in api/objects.pb.go - About 2 days to fix

        Method Meta.Unmarshal has a Cognitive Complexity of 125 (exceeds 20 allowed). Consider refactoring.
        Open

        func (m *Meta) Unmarshal(dAtA []byte) error {
            l := len(dAtA)
            iNdEx := 0
            for iNdEx < l {
                preIndex := iNdEx
        Severity: Minor
        Found in api/objects.pb.go - About 2 days 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

        Method Endpoint.Unmarshal has a Cognitive Complexity of 122 (exceeds 20 allowed). Consider refactoring.
        Open

        func (m *Endpoint) Unmarshal(dAtA []byte) error {
            l := len(dAtA)
            iNdEx := 0
            for iNdEx < l {
                preIndex := iNdEx
        Severity: Minor
        Found in api/objects.pb.go - About 2 days 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

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

        func (m *Config) Unmarshal(dAtA []byte) error {
            l := len(dAtA)
            iNdEx := 0
            for iNdEx < l {
                preIndex := iNdEx
        Severity: Minor
        Found in api/objects.pb.go - About 2 days 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

        Method Node.Unmarshal has 391 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (m *Node) Unmarshal(dAtA []byte) error {
            l := len(dAtA)
            iNdEx := 0
            for iNdEx < l {
                preIndex := iNdEx
        Severity: Major
        Found in api/objects.pb.go - About 1 day to fix

          Method Service.Unmarshal has 381 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func (m *Service) Unmarshal(dAtA []byte) error {
              l := len(dAtA)
              iNdEx := 0
              for iNdEx < l {
                  preIndex := iNdEx
          Severity: Major
          Found in api/objects.pb.go - About 1 day to fix

            Method Endpoint_VirtualIP.Unmarshal has a Cognitive Complexity of 83 (exceeds 20 allowed). Consider refactoring.
            Open

            func (m *Endpoint_VirtualIP) Unmarshal(dAtA []byte) error {
                l := len(dAtA)
                iNdEx := 0
                for iNdEx < l {
                    preIndex := iNdEx
            Severity: Minor
            Found in api/objects.pb.go - About 1 day 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

            Method NetworkAttachment.Unmarshal has 274 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func (m *NetworkAttachment) Unmarshal(dAtA []byte) error {
                l := len(dAtA)
                iNdEx := 0
                for iNdEx < l {
                    preIndex := iNdEx
            Severity: Major
            Found in api/objects.pb.go - About 1 day to fix

              Method Task.Unmarshal has 117 return statements (exceeds 4 allowed).
              Open

              func (m *Task) Unmarshal(dAtA []byte) error {
                  l := len(dAtA)
                  iNdEx := 0
                  for iNdEx < l {
                      preIndex := iNdEx
              Severity: Major
              Found in api/objects.pb.go - About 1 day to fix

                Method Network.Unmarshal has 237 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

                func (m *Network) Unmarshal(dAtA []byte) error {
                    l := len(dAtA)
                    iNdEx := 0
                    for iNdEx < l {
                        preIndex := iNdEx
                Severity: Major
                Found in api/objects.pb.go - About 1 day to fix

                  Method Volume.Unmarshal has 235 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

                  func (m *Volume) Unmarshal(dAtA []byte) error {
                      l := len(dAtA)
                      iNdEx := 0
                      for iNdEx < l {
                          preIndex := iNdEx
                  Severity: Major
                  Found in api/objects.pb.go - About 1 day to fix

                    Method Cluster.Unmarshal has 90 return statements (exceeds 4 allowed).
                    Open

                    func (m *Cluster) Unmarshal(dAtA []byte) error {
                        l := len(dAtA)
                        iNdEx := 0
                        for iNdEx < l {
                            preIndex := iNdEx
                    Severity: Major
                    Found in api/objects.pb.go - About 7 hrs to fix

                      Method Resource.Unmarshal has 213 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func (m *Resource) Unmarshal(dAtA []byte) error {
                          l := len(dAtA)
                          iNdEx := 0
                          for iNdEx < l {
                              preIndex := iNdEx
                      Severity: Major
                      Found in api/objects.pb.go - About 7 hrs to fix

                        Function EventFromStoreAction has a Cognitive Complexity of 61 (exceeds 20 allowed). Consider refactoring.
                        Open

                        func EventFromStoreAction(sa StoreAction, oldObject StoreObject) (Event, error) {
                            switch v := sa.Target.(type) {
                            case *StoreAction_Node:
                                switch sa.Action {
                                case StoreActionKindCreate:
                        Severity: Minor
                        Found in api/objects.pb.go - About 7 hrs 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

                        Method Node.Unmarshal has 77 return statements (exceeds 4 allowed).
                        Open

                        func (m *Node) Unmarshal(dAtA []byte) error {
                            l := len(dAtA)
                            iNdEx := 0
                            for iNdEx < l {
                                preIndex := iNdEx
                        Severity: Major
                        Found in api/objects.pb.go - About 6 hrs to fix

                          Method Service.Unmarshal has 74 return statements (exceeds 4 allowed).
                          Open

                          func (m *Service) Unmarshal(dAtA []byte) error {
                              l := len(dAtA)
                              iNdEx := 0
                              for iNdEx < l {
                                  preIndex := iNdEx
                          Severity: Major
                          Found in api/objects.pb.go - About 6 hrs to fix

                            Method Task.MarshalToSizedBuffer has 180 lines of code (exceeds 50 allowed). Consider refactoring.
                            Open

                            func (m *Task) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                i := len(dAtA)
                                _ = i
                                var l int
                                _ = l
                            Severity: Major
                            Found in api/objects.pb.go - About 6 hrs to fix

                              Method Extension.Unmarshal has 177 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

                              func (m *Extension) Unmarshal(dAtA []byte) error {
                                  l := len(dAtA)
                                  iNdEx := 0
                                  for iNdEx < l {
                                      preIndex := iNdEx
                              Severity: Major
                              Found in api/objects.pb.go - About 6 hrs to fix

                                Function skipObjects has a Cognitive Complexity of 54 (exceeds 20 allowed). Consider refactoring.
                                Open

                                func skipObjects(dAtA []byte) (n int, err error) {
                                    l := len(dAtA)
                                    iNdEx := 0
                                    depth := 0
                                    for iNdEx < l {
                                Severity: Minor
                                Found in api/objects.pb.go - About 5 hrs 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

                                Method Secret.Unmarshal has 165 lines of code (exceeds 50 allowed). Consider refactoring.
                                Open

                                func (m *Secret) Unmarshal(dAtA []byte) error {
                                    l := len(dAtA)
                                    iNdEx := 0
                                    for iNdEx < l {
                                        preIndex := iNdEx
                                Severity: Major
                                Found in api/objects.pb.go - About 5 hrs to fix

                                  Method Meta.Unmarshal has 152 lines of code (exceeds 50 allowed). Consider refactoring.
                                  Open

                                  func (m *Meta) Unmarshal(dAtA []byte) error {
                                      l := len(dAtA)
                                      iNdEx := 0
                                      for iNdEx < l {
                                          preIndex := iNdEx
                                  Severity: Major
                                  Found in api/objects.pb.go - About 5 hrs to fix

                                    Method Endpoint.Unmarshal has 151 lines of code (exceeds 50 allowed). Consider refactoring.
                                    Open

                                    func (m *Endpoint) Unmarshal(dAtA []byte) error {
                                        l := len(dAtA)
                                        iNdEx := 0
                                        for iNdEx < l {
                                            preIndex := iNdEx
                                    Severity: Major
                                    Found in api/objects.pb.go - About 5 hrs to fix

                                      Method Config.Unmarshal has 145 lines of code (exceeds 50 allowed). Consider refactoring.
                                      Open

                                      func (m *Config) Unmarshal(dAtA []byte) error {
                                          l := len(dAtA)
                                          iNdEx := 0
                                          for iNdEx < l {
                                              preIndex := iNdEx
                                      Severity: Major
                                      Found in api/objects.pb.go - About 4 hrs to fix

                                        Function EventFromStoreAction has 133 lines of code (exceeds 50 allowed). Consider refactoring.
                                        Open

                                        func EventFromStoreAction(sa StoreAction, oldObject StoreObject) (Event, error) {
                                            switch v := sa.Target.(type) {
                                            case *StoreAction_Node:
                                                switch sa.Action {
                                                case StoreActionKindCreate:
                                        Severity: Major
                                        Found in api/objects.pb.go - About 4 hrs to fix

                                          Method NetworkAttachment.Unmarshal has 49 return statements (exceeds 4 allowed).
                                          Open

                                          func (m *NetworkAttachment) Unmarshal(dAtA []byte) error {
                                              l := len(dAtA)
                                              iNdEx := 0
                                              for iNdEx < l {
                                                  preIndex := iNdEx
                                          Severity: Major
                                          Found in api/objects.pb.go - About 4 hrs to fix

                                            Method Cluster.MarshalToSizedBuffer has 130 lines of code (exceeds 50 allowed). Consider refactoring.
                                            Open

                                            func (m *Cluster) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                i := len(dAtA)
                                                _ = i
                                                var l int
                                                _ = l
                                            Severity: Major
                                            Found in api/objects.pb.go - About 4 hrs to fix

                                              Method Network.Unmarshal has 46 return statements (exceeds 4 allowed).
                                              Open

                                              func (m *Network) Unmarshal(dAtA []byte) error {
                                                  l := len(dAtA)
                                                  iNdEx := 0
                                                  for iNdEx < l {
                                                      preIndex := iNdEx
                                              Severity: Major
                                              Found in api/objects.pb.go - About 4 hrs to fix

                                                Method Volume.Unmarshal has 46 return statements (exceeds 4 allowed).
                                                Open

                                                func (m *Volume) Unmarshal(dAtA []byte) error {
                                                    l := len(dAtA)
                                                    iNdEx := 0
                                                    for iNdEx < l {
                                                        preIndex := iNdEx
                                                Severity: Major
                                                Found in api/objects.pb.go - About 4 hrs to fix

                                                  Method Resource.Unmarshal has 42 return statements (exceeds 4 allowed).
                                                  Open

                                                  func (m *Resource) Unmarshal(dAtA []byte) error {
                                                      l := len(dAtA)
                                                      iNdEx := 0
                                                      for iNdEx < l {
                                                          preIndex := iNdEx
                                                  Severity: Major
                                                  Found in api/objects.pb.go - About 3 hrs to fix

                                                    Method Task.MarshalToSizedBuffer has a Cognitive Complexity of 40 (exceeds 20 allowed). Consider refactoring.
                                                    Open

                                                    func (m *Task) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                        i := len(dAtA)
                                                        _ = i
                                                        var l int
                                                        _ = l
                                                    Severity: Minor
                                                    Found in api/objects.pb.go - About 3 hrs 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

                                                    Method Service.MarshalToSizedBuffer has 114 lines of code (exceeds 50 allowed). Consider refactoring.
                                                    Open

                                                    func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                        i := len(dAtA)
                                                        _ = i
                                                        var l int
                                                        _ = l
                                                    Severity: Major
                                                    Found in api/objects.pb.go - About 3 hrs to fix

                                                      Method Node.MarshalToSizedBuffer has 112 lines of code (exceeds 50 allowed). Consider refactoring.
                                                      Open

                                                      func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                          i := len(dAtA)
                                                          _ = i
                                                          var l int
                                                          _ = l
                                                      Severity: Major
                                                      Found in api/objects.pb.go - About 3 hrs to fix

                                                        Method Endpoint_VirtualIP.Unmarshal has 111 lines of code (exceeds 50 allowed). Consider refactoring.
                                                        Open

                                                        func (m *Endpoint_VirtualIP) Unmarshal(dAtA []byte) error {
                                                            l := len(dAtA)
                                                            iNdEx := 0
                                                            for iNdEx < l {
                                                                preIndex := iNdEx
                                                        Severity: Major
                                                        Found in api/objects.pb.go - About 3 hrs to fix

                                                          Function ConvertTaskWatch has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring.
                                                          Open

                                                          func ConvertTaskWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                              var (
                                                                  m               Task
                                                                  checkFuncs      []TaskCheckFunc
                                                                  hasDesiredState bool
                                                          Severity: Minor
                                                          Found in api/objects.pb.go - About 3 hrs 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 WatchMessageEvent has 103 lines of code (exceeds 50 allowed). Consider refactoring.
                                                          Open

                                                          func WatchMessageEvent(c Event) *WatchMessage_Event {
                                                              switch v := c.(type) {
                                                              case EventCreateNode:
                                                                  return &WatchMessage_Event{Action: WatchActionKindCreate, Object: &Object{Object: &Object_Node{Node: v.Node}}}
                                                              case EventUpdateNode:
                                                          Severity: Major
                                                          Found in api/objects.pb.go - About 3 hrs to fix

                                                            Method Extension.Unmarshal has 35 return statements (exceeds 4 allowed).
                                                            Open

                                                            func (m *Extension) Unmarshal(dAtA []byte) error {
                                                                l := len(dAtA)
                                                                iNdEx := 0
                                                                for iNdEx < l {
                                                                    preIndex := iNdEx
                                                            Severity: Major
                                                            Found in api/objects.pb.go - About 3 hrs to fix

                                                              Method Cluster.MarshalToSizedBuffer has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
                                                              Open

                                                              func (m *Cluster) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                  i := len(dAtA)
                                                                  _ = i
                                                                  var l int
                                                                  _ = l
                                                              Severity: Minor
                                                              Found in api/objects.pb.go - About 2 hrs 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 NewStoreAction has 96 lines of code (exceeds 50 allowed). Consider refactoring.
                                                              Open

                                                              func NewStoreAction(c Event) (StoreAction, error) {
                                                                  var sa StoreAction
                                                                  switch v := c.(type) {
                                                                  case EventCreateNode:
                                                                      sa.Action = StoreActionKindCreate
                                                              Severity: Major
                                                              Found in api/objects.pb.go - About 2 hrs to fix

                                                                Method Secret.Unmarshal has 32 return statements (exceeds 4 allowed).
                                                                Open

                                                                func (m *Secret) Unmarshal(dAtA []byte) error {
                                                                    l := len(dAtA)
                                                                    iNdEx := 0
                                                                    for iNdEx < l {
                                                                        preIndex := iNdEx
                                                                Severity: Major
                                                                Found in api/objects.pb.go - About 2 hrs to fix

                                                                  Method Meta.Unmarshal has 30 return statements (exceeds 4 allowed).
                                                                  Open

                                                                  func (m *Meta) Unmarshal(dAtA []byte) error {
                                                                      l := len(dAtA)
                                                                      iNdEx := 0
                                                                      for iNdEx < l {
                                                                          preIndex := iNdEx
                                                                  Severity: Major
                                                                  Found in api/objects.pb.go - About 2 hrs to fix

                                                                    Method Endpoint.Unmarshal has 30 return statements (exceeds 4 allowed).
                                                                    Open

                                                                    func (m *Endpoint) Unmarshal(dAtA []byte) error {
                                                                        l := len(dAtA)
                                                                        iNdEx := 0
                                                                        for iNdEx < l {
                                                                            preIndex := iNdEx
                                                                    Severity: Major
                                                                    Found in api/objects.pb.go - About 2 hrs to fix

                                                                      Method Config.Unmarshal has 29 return statements (exceeds 4 allowed).
                                                                      Open

                                                                      func (m *Config) Unmarshal(dAtA []byte) error {
                                                                          l := len(dAtA)
                                                                          iNdEx := 0
                                                                          for iNdEx < l {
                                                                              preIndex := iNdEx
                                                                      Severity: Major
                                                                      Found in api/objects.pb.go - About 2 hrs to fix

                                                                        Service has 23 methods (exceeds 20 allowed). Consider refactoring.
                                                                        Open

                                                                        type Service struct {
                                                                            ID   string      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
                                                                            Meta Meta        `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
                                                                            Spec ServiceSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec"`
                                                                            // SpecVersion versions Spec, to identify changes in the spec. Note that
                                                                        Severity: Minor
                                                                        Found in api/objects.pb.go - About 2 hrs to fix

                                                                          Extension has 23 methods (exceeds 20 allowed). Consider refactoring.
                                                                          Open

                                                                          type Extension struct {
                                                                              ID          string      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
                                                                              Meta        Meta        `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
                                                                              Annotations Annotations `protobuf:"bytes,3,opt,name=annotations,proto3" json:"annotations"`
                                                                              Description string      `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
                                                                          Severity: Minor
                                                                          Found in api/objects.pb.go - About 2 hrs to fix

                                                                            Secret has 23 methods (exceeds 20 allowed). Consider refactoring.
                                                                            Open

                                                                            type Secret struct {
                                                                                ID   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
                                                                                Meta Meta   `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
                                                                                // Spec contains the actual secret data, as well as any context around the
                                                                                // secret data that the user provides.
                                                                            Severity: Minor
                                                                            Found in api/objects.pb.go - About 2 hrs to fix

                                                                              Task has 23 methods (exceeds 20 allowed). Consider refactoring.
                                                                              Open

                                                                              type Task struct {
                                                                                  ID   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
                                                                                  Meta Meta   `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
                                                                                  // Spec defines the desired state of the task as specified by the user.
                                                                                  // The system will honor this and will *never* modify it.
                                                                              Severity: Minor
                                                                              Found in api/objects.pb.go - About 2 hrs to fix

                                                                                Volume has 23 methods (exceeds 20 allowed). Consider refactoring.
                                                                                Open

                                                                                type Volume struct {
                                                                                    // ID is the swarmkit-internal ID for this volume object. This has no
                                                                                    // relation to the CSI volume identifier provided by the CSI Plugin.
                                                                                    ID   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
                                                                                    Meta Meta   `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
                                                                                Severity: Minor
                                                                                Found in api/objects.pb.go - About 2 hrs to fix

                                                                                  Node has 23 methods (exceeds 20 allowed). Consider refactoring.
                                                                                  Open

                                                                                  type Node struct {
                                                                                      // ID specifies the identity of the node.
                                                                                      ID   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
                                                                                      Meta Meta   `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
                                                                                      // Spec defines the desired state of the node as specified by the user.
                                                                                  Severity: Minor
                                                                                  Found in api/objects.pb.go - About 2 hrs to fix

                                                                                    Cluster has 23 methods (exceeds 20 allowed). Consider refactoring.
                                                                                    Open

                                                                                    type Cluster struct {
                                                                                        ID   string      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
                                                                                        Meta Meta        `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
                                                                                        Spec ClusterSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec"`
                                                                                        // RootCA contains key material for the root CA.
                                                                                    Severity: Minor
                                                                                    Found in api/objects.pb.go - About 2 hrs to fix

                                                                                      Resource has 23 methods (exceeds 20 allowed). Consider refactoring.
                                                                                      Open

                                                                                      type Resource struct {
                                                                                          ID          string      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
                                                                                          Meta        Meta        `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
                                                                                          Annotations Annotations `protobuf:"bytes,3,opt,name=annotations,proto3" json:"annotations"`
                                                                                          // Kind identifies this class of object. It is essentially a namespace
                                                                                      Severity: Minor
                                                                                      Found in api/objects.pb.go - About 2 hrs to fix

                                                                                        Network has 23 methods (exceeds 20 allowed). Consider refactoring.
                                                                                        Open

                                                                                        type Network struct {
                                                                                            ID   string      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
                                                                                            Meta Meta        `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
                                                                                            Spec NetworkSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec"`
                                                                                            // Driver specific operational state provided by the network driver.
                                                                                        Severity: Minor
                                                                                        Found in api/objects.pb.go - About 2 hrs to fix

                                                                                          Config has 23 methods (exceeds 20 allowed). Consider refactoring.
                                                                                          Open

                                                                                          type Config struct {
                                                                                              ID   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
                                                                                              Meta Meta   `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
                                                                                              // Spec contains the actual config data, as well as any context around the
                                                                                              // config data that the user provides.
                                                                                          Severity: Minor
                                                                                          Found in api/objects.pb.go - About 2 hrs to fix

                                                                                            Function ConvertTaskWatch has 85 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                            Open

                                                                                            func ConvertTaskWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                var (
                                                                                                    m               Task
                                                                                                    checkFuncs      []TaskCheckFunc
                                                                                                    hasDesiredState bool
                                                                                            Severity: Major
                                                                                            Found in api/objects.pb.go - About 2 hrs to fix

                                                                                              Function ConvertNodeWatch has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring.
                                                                                              Open

                                                                                              func ConvertNodeWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                  var (
                                                                                                      m             Node
                                                                                                      checkFuncs    []NodeCheckFunc
                                                                                                      hasRole       bool
                                                                                              Severity: Minor
                                                                                              Found in api/objects.pb.go - About 2 hrs 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 WatchMessageEvent has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring.
                                                                                              Open

                                                                                              func WatchMessageEvent(c Event) *WatchMessage_Event {
                                                                                                  switch v := c.(type) {
                                                                                                  case EventCreateNode:
                                                                                                      return &WatchMessage_Event{Action: WatchActionKindCreate, Object: &Object{Object: &Object_Node{Node: v.Node}}}
                                                                                                  case EventUpdateNode:
                                                                                              Severity: Minor
                                                                                              Found in api/objects.pb.go - About 2 hrs 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 skipObjects has 76 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                              Open

                                                                                              func skipObjects(dAtA []byte) (n int, err error) {
                                                                                                  l := len(dAtA)
                                                                                                  iNdEx := 0
                                                                                                  depth := 0
                                                                                                  for iNdEx < l {
                                                                                              Severity: Major
                                                                                              Found in api/objects.pb.go - About 2 hrs to fix

                                                                                                Function ConvertNodeWatch has 74 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                Open

                                                                                                func ConvertNodeWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                    var (
                                                                                                        m             Node
                                                                                                        checkFuncs    []NodeCheckFunc
                                                                                                        hasRole       bool
                                                                                                Severity: Minor
                                                                                                Found in api/objects.pb.go - About 1 hr to fix

                                                                                                  Method Endpoint_VirtualIP.Unmarshal has 21 return statements (exceeds 4 allowed).
                                                                                                  Open

                                                                                                  func (m *Endpoint_VirtualIP) Unmarshal(dAtA []byte) error {
                                                                                                      l := len(dAtA)
                                                                                                      iNdEx := 0
                                                                                                      for iNdEx < l {
                                                                                                          preIndex := iNdEx
                                                                                                  Severity: Major
                                                                                                  Found in api/objects.pb.go - About 1 hr to fix

                                                                                                    Function WatchMessageEvent has 21 return statements (exceeds 4 allowed).
                                                                                                    Open

                                                                                                    func WatchMessageEvent(c Event) *WatchMessage_Event {
                                                                                                        switch v := c.(type) {
                                                                                                        case EventCreateNode:
                                                                                                            return &WatchMessage_Event{Action: WatchActionKindCreate, Object: &Object{Object: &Object_Node{Node: v.Node}}}
                                                                                                        case EventUpdateNode:
                                                                                                    Severity: Major
                                                                                                    Found in api/objects.pb.go - About 1 hr to fix

                                                                                                      Function EventFromStoreAction has 21 return statements (exceeds 4 allowed).
                                                                                                      Open

                                                                                                      func EventFromStoreAction(sa StoreAction, oldObject StoreObject) (Event, error) {
                                                                                                          switch v := sa.Target.(type) {
                                                                                                          case *StoreAction_Node:
                                                                                                              switch sa.Action {
                                                                                                              case StoreActionKindCreate:
                                                                                                      Severity: Major
                                                                                                      Found in api/objects.pb.go - About 1 hr to fix

                                                                                                        Method Volume.MarshalToSizedBuffer has 68 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                        func (m *Volume) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                            i := len(dAtA)
                                                                                                            _ = i
                                                                                                            var l int
                                                                                                            _ = l
                                                                                                        Severity: Minor
                                                                                                        Found in api/objects.pb.go - About 1 hr to fix

                                                                                                          Method Task.Size has 68 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                          func (m *Task) Size() (n int) {
                                                                                                              if m == nil {
                                                                                                                  return 0
                                                                                                              }
                                                                                                              var l int
                                                                                                          Severity: Minor
                                                                                                          Found in api/objects.pb.go - About 1 hr to fix

                                                                                                            Method Network.MarshalToSizedBuffer has 66 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                            func (m *Network) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                i := len(dAtA)
                                                                                                                _ = i
                                                                                                                var l int
                                                                                                                _ = l
                                                                                                            Severity: Minor
                                                                                                            Found in api/objects.pb.go - About 1 hr to fix

                                                                                                              Function ConvertResourceWatch has 60 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                              func ConvertResourceWatch(action WatchActionKind, filters []*SelectBy, kind string) ([]Event, error) {
                                                                                                                  var (
                                                                                                                      m          Resource
                                                                                                                      checkFuncs []ResourceCheckFunc
                                                                                                                  )
                                                                                                              Severity: Minor
                                                                                                              Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                Method Cluster.Size has 59 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                func (m *Cluster) Size() (n int) {
                                                                                                                    if m == nil {
                                                                                                                        return 0
                                                                                                                    }
                                                                                                                    var l int
                                                                                                                Severity: Minor
                                                                                                                Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                  Function ConvertSecretWatch has 58 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                  func ConvertSecretWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                      var (
                                                                                                                          m          Secret
                                                                                                                          checkFuncs []SecretCheckFunc
                                                                                                                      )
                                                                                                                  Severity: Minor
                                                                                                                  Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                    Function ConvertConfigWatch has 58 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                    func ConvertConfigWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                        var (
                                                                                                                            m          Config
                                                                                                                            checkFuncs []ConfigCheckFunc
                                                                                                                        )
                                                                                                                    Severity: Minor
                                                                                                                    Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                      Function ConvertServiceWatch has 58 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                                      Open

                                                                                                                      func ConvertServiceWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                          var (
                                                                                                                              m          Service
                                                                                                                              checkFuncs []ServiceCheckFunc
                                                                                                                          )
                                                                                                                      Severity: Minor
                                                                                                                      Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                        Function ConvertVolumeWatch has 58 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        func ConvertVolumeWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                            var (
                                                                                                                                m          Volume
                                                                                                                                checkFuncs []VolumeCheckFunc
                                                                                                                            )
                                                                                                                        Severity: Minor
                                                                                                                        Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                          Function ConvertExtensionWatch has 58 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                                          Open

                                                                                                                          func ConvertExtensionWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                              var (
                                                                                                                                  m          Extension
                                                                                                                                  checkFuncs []ExtensionCheckFunc
                                                                                                                              )
                                                                                                                          Severity: Minor
                                                                                                                          Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                            Function ConvertNetworkWatch has 58 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                                            Open

                                                                                                                            func ConvertNetworkWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                var (
                                                                                                                                    m          Network
                                                                                                                                    checkFuncs []NetworkCheckFunc
                                                                                                                                )
                                                                                                                            Severity: Minor
                                                                                                                            Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                              Function ConvertClusterWatch has 58 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                                              Open

                                                                                                                              func ConvertClusterWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                  var (
                                                                                                                                      m          Cluster
                                                                                                                                      checkFuncs []ClusterCheckFunc
                                                                                                                                  )
                                                                                                                              Severity: Minor
                                                                                                                              Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                                Method Task.MarshalToSizedBuffer has 13 return statements (exceeds 4 allowed).
                                                                                                                                Open

                                                                                                                                func (m *Task) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                    i := len(dAtA)
                                                                                                                                    _ = i
                                                                                                                                    var l int
                                                                                                                                    _ = l
                                                                                                                                Severity: Major
                                                                                                                                Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                                  Function ConvertTaskWatch has 12 return statements (exceeds 4 allowed).
                                                                                                                                  Open

                                                                                                                                  func ConvertTaskWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                      var (
                                                                                                                                          m               Task
                                                                                                                                          checkFuncs      []TaskCheckFunc
                                                                                                                                          hasDesiredState bool
                                                                                                                                  Severity: Major
                                                                                                                                  Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                                    Method NetworkAttachment.MarshalToSizedBuffer has 54 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                    func (m *NetworkAttachment) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                        i := len(dAtA)
                                                                                                                                        _ = i
                                                                                                                                        var l int
                                                                                                                                        _ = l
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                                      Function ConvertConfigWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      func ConvertConfigWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                          var (
                                                                                                                                              m          Config
                                                                                                                                              checkFuncs []ConfigCheckFunc
                                                                                                                                          )
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in api/objects.pb.go - About 1 hr 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 ConvertExtensionWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      func ConvertExtensionWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                          var (
                                                                                                                                              m          Extension
                                                                                                                                              checkFuncs []ExtensionCheckFunc
                                                                                                                                          )
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in api/objects.pb.go - About 1 hr 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 ConvertSecretWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      func ConvertSecretWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                          var (
                                                                                                                                              m          Secret
                                                                                                                                              checkFuncs []SecretCheckFunc
                                                                                                                                          )
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in api/objects.pb.go - About 1 hr 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 ConvertVolumeWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      func ConvertVolumeWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                          var (
                                                                                                                                              m          Volume
                                                                                                                                              checkFuncs []VolumeCheckFunc
                                                                                                                                          )
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in api/objects.pb.go - About 1 hr 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 ConvertClusterWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      func ConvertClusterWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                          var (
                                                                                                                                              m          Cluster
                                                                                                                                              checkFuncs []ClusterCheckFunc
                                                                                                                                          )
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in api/objects.pb.go - About 1 hr 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

                                                                                                                                      Method Service.MarshalToSizedBuffer has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                          i := len(dAtA)
                                                                                                                                          _ = i
                                                                                                                                          var l int
                                                                                                                                          _ = l
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in api/objects.pb.go - About 1 hr 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 ConvertServiceWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      func ConvertServiceWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                          var (
                                                                                                                                              m          Service
                                                                                                                                              checkFuncs []ServiceCheckFunc
                                                                                                                                          )
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in api/objects.pb.go - About 1 hr 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 ConvertNetworkWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      func ConvertNetworkWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                          var (
                                                                                                                                              m          Network
                                                                                                                                              checkFuncs []NetworkCheckFunc
                                                                                                                                          )
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in api/objects.pb.go - About 1 hr 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 ConvertResourceWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      func ConvertResourceWatch(action WatchActionKind, filters []*SelectBy, kind string) ([]Event, error) {
                                                                                                                                          var (
                                                                                                                                              m          Resource
                                                                                                                                              checkFuncs []ResourceCheckFunc
                                                                                                                                          )
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in api/objects.pb.go - About 1 hr 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 skipObjects has 11 return statements (exceeds 4 allowed).
                                                                                                                                      Open

                                                                                                                                      func skipObjects(dAtA []byte) (n int, err error) {
                                                                                                                                          l := len(dAtA)
                                                                                                                                          iNdEx := 0
                                                                                                                                          depth := 0
                                                                                                                                          for iNdEx < l {
                                                                                                                                      Severity: Major
                                                                                                                                      Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                                        Method Resource.MarshalToSizedBuffer has 51 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                                                        Open

                                                                                                                                        func (m *Resource) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                            i := len(dAtA)
                                                                                                                                            _ = i
                                                                                                                                            var l int
                                                                                                                                            _ = l
                                                                                                                                        Severity: Minor
                                                                                                                                        Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                                          Function ConvertNodeWatch has 10 return statements (exceeds 4 allowed).
                                                                                                                                          Open

                                                                                                                                          func ConvertNodeWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                              var (
                                                                                                                                                  m             Node
                                                                                                                                                  checkFuncs    []NodeCheckFunc
                                                                                                                                                  hasRole       bool
                                                                                                                                          Severity: Major
                                                                                                                                          Found in api/objects.pb.go - About 1 hr to fix

                                                                                                                                            Method Service.MarshalToSizedBuffer has 9 return statements (exceeds 4 allowed).
                                                                                                                                            Open

                                                                                                                                            func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                i := len(dAtA)
                                                                                                                                                _ = i
                                                                                                                                                var l int
                                                                                                                                                _ = l
                                                                                                                                            Severity: Major
                                                                                                                                            Found in api/objects.pb.go - About 55 mins to fix

                                                                                                                                              Method Node.MarshalToSizedBuffer has 9 return statements (exceeds 4 allowed).
                                                                                                                                              Open

                                                                                                                                              func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                  i := len(dAtA)
                                                                                                                                                  _ = i
                                                                                                                                                  var l int
                                                                                                                                                  _ = l
                                                                                                                                              Severity: Major
                                                                                                                                              Found in api/objects.pb.go - About 55 mins to fix

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

                                                                                                                                                func ConvertConfigWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                                    var (
                                                                                                                                                        m          Config
                                                                                                                                                        checkFuncs []ConfigCheckFunc
                                                                                                                                                    )
                                                                                                                                                Severity: Major
                                                                                                                                                Found in api/objects.pb.go - About 50 mins to fix

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

                                                                                                                                                  func ConvertClusterWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                                      var (
                                                                                                                                                          m          Cluster
                                                                                                                                                          checkFuncs []ClusterCheckFunc
                                                                                                                                                      )
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in api/objects.pb.go - About 50 mins to fix

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

                                                                                                                                                    func ConvertServiceWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                                        var (
                                                                                                                                                            m          Service
                                                                                                                                                            checkFuncs []ServiceCheckFunc
                                                                                                                                                        )
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in api/objects.pb.go - About 50 mins to fix

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

                                                                                                                                                      func ConvertResourceWatch(action WatchActionKind, filters []*SelectBy, kind string) ([]Event, error) {
                                                                                                                                                          var (
                                                                                                                                                              m          Resource
                                                                                                                                                              checkFuncs []ResourceCheckFunc
                                                                                                                                                          )
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in api/objects.pb.go - About 50 mins to fix

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

                                                                                                                                                        func ConvertExtensionWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                                            var (
                                                                                                                                                                m          Extension
                                                                                                                                                                checkFuncs []ExtensionCheckFunc
                                                                                                                                                            )
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in api/objects.pb.go - About 50 mins to fix

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

                                                                                                                                                          func ConvertNetworkWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                                              var (
                                                                                                                                                                  m          Network
                                                                                                                                                                  checkFuncs []NetworkCheckFunc
                                                                                                                                                              )
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/objects.pb.go - About 50 mins to fix

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

                                                                                                                                                            func ConvertVolumeWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                                                var (
                                                                                                                                                                    m          Volume
                                                                                                                                                                    checkFuncs []VolumeCheckFunc
                                                                                                                                                                )
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in api/objects.pb.go - About 50 mins to fix

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

                                                                                                                                                              func ConvertSecretWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                                                  var (
                                                                                                                                                                      m          Secret
                                                                                                                                                                      checkFuncs []SecretCheckFunc
                                                                                                                                                                  )
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in api/objects.pb.go - About 50 mins to fix

                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                Open

                                                                                                                                                                                    if b < 0x80 {
                                                                                                                                                                                        break
                                                                                                                                                                                    }
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                  Open

                                                                                                                                                                                      for shift := uint(0); ; shift += 7 {
                                                                                                                                                                                          if shift >= 64 {
                                                                                                                                                                                              return ErrIntOverflowObjects
                                                                                                                                                                                          }
                                                                                                                                                                                          if iNdEx >= l {
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                                    Open

                                                                                                                                                                                        if b < 0x80 {
                                                                                                                                                                                            break
                                                                                                                                                                                        }
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                                      Open

                                                                                                                                                                                          if iNdEx >= l {
                                                                                                                                                                                              return io.ErrUnexpectedEOF
                                                                                                                                                                                          }
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                                        Open

                                                                                                                                                                                            if intStringLenmapkey < 0 {
                                                                                                                                                                                                return ErrInvalidLengthObjects
                                                                                                                                                                                            }
                                                                                                                                                                        Severity: Major
                                                                                                                                                                        Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                                          Open

                                                                                                                                                                                              if postStringIndexmapkey < 0 {
                                                                                                                                                                                                  return ErrInvalidLengthObjects
                                                                                                                                                                                              }
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                                                            Open

                                                                                                                                                                                                if shift >= 64 {
                                                                                                                                                                                                    return ErrIntOverflowObjects
                                                                                                                                                                                                }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                                                              Open

                                                                                                                                                                                                  if postStringIndexmapkey > l {
                                                                                                                                                                                                      return io.ErrUnexpectedEOF
                                                                                                                                                                                                  }
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                                Open

                                                                                                                                                                                                } else if fieldNum == 2 {
                                                                                                                                                                                                    var mapmsglen int
                                                                                                                                                                                                    for shift := uint(0); ; shift += 7 {
                                                                                                                                                                                                        if shift >= 64 {
                                                                                                                                                                                                            return ErrIntOverflowObjects
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                                  Open

                                                                                                                                                                                                      if iNdEx >= l {
                                                                                                                                                                                                          return io.ErrUnexpectedEOF
                                                                                                                                                                                                      }
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                                                    Open

                                                                                                                                                                                                        if postStringIndexmapkey > l {
                                                                                                                                                                                                            return io.ErrUnexpectedEOF
                                                                                                                                                                                                        }
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                                                      Open

                                                                                                                                                                                                          for shift := uint(0); ; shift += 7 {
                                                                                                                                                                                                              if shift >= 64 {
                                                                                                                                                                                                                  return ErrIntOverflowObjects
                                                                                                                                                                                                              }
                                                                                                                                                                                                              if iNdEx >= l {
                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                      Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                                                        Open

                                                                                                                                                                                                            if shift >= 64 {
                                                                                                                                                                                                                return ErrIntOverflowObjects
                                                                                                                                                                                                            }
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                                                          Open

                                                                                                                                                                                                              if postStringIndexmapkey < 0 {
                                                                                                                                                                                                                  return ErrInvalidLengthObjects
                                                                                                                                                                                                              }
                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                          Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                                            Method Cluster.MarshalToSizedBuffer has 7 return statements (exceeds 4 allowed).
                                                                                                                                                                                            Open

                                                                                                                                                                                            func (m *Cluster) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                                                                i := len(dAtA)
                                                                                                                                                                                                _ = i
                                                                                                                                                                                                var l int
                                                                                                                                                                                                _ = l
                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                            Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                                                                              Open

                                                                                                                                                                                                              } else if fieldNum == 2 {
                                                                                                                                                                                                                  var stringLenmapvalue uint64
                                                                                                                                                                                                                  for shift := uint(0); ; shift += 7 {
                                                                                                                                                                                                                      if shift >= 64 {
                                                                                                                                                                                                                          return ErrIntOverflowObjects
                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                              Found in api/objects.pb.go - About 45 mins to fix

                                                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                                                Open

                                                                                                                                                                                                                    if intStringLenmapkey < 0 {
                                                                                                                                                                                                                        return ErrInvalidLengthObjects
                                                                                                                                                                                                                    }
                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                Found in api/objects.pb.go - About 45 mins to fix

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

                                                                                                                                                                                                  func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                                                                      i := len(dAtA)
                                                                                                                                                                                                      _ = i
                                                                                                                                                                                                      var l int
                                                                                                                                                                                                      _ = l
                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                  Found in api/objects.pb.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

                                                                                                                                                                                                  Method Network.MarshalToSizedBuffer has 5 return statements (exceeds 4 allowed).
                                                                                                                                                                                                  Open

                                                                                                                                                                                                  func (m *Network) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                                                                      i := len(dAtA)
                                                                                                                                                                                                      _ = i
                                                                                                                                                                                                      var l int
                                                                                                                                                                                                      _ = l
                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                  Found in api/objects.pb.go - About 35 mins to fix

                                                                                                                                                                                                    Method Volume.MarshalToSizedBuffer has 5 return statements (exceeds 4 allowed).
                                                                                                                                                                                                    Open

                                                                                                                                                                                                    func (m *Volume) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                                                                        i := len(dAtA)
                                                                                                                                                                                                        _ = i
                                                                                                                                                                                                        var l int
                                                                                                                                                                                                        _ = l
                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                    Found in api/objects.pb.go - About 35 mins to fix

                                                                                                                                                                                                      Method Cluster.Size has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                      func (m *Cluster) Size() (n int) {
                                                                                                                                                                                                          if m == nil {
                                                                                                                                                                                                              return 0
                                                                                                                                                                                                          }
                                                                                                                                                                                                          var l int
                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                      Found in api/objects.pb.go - About 25 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

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

                                                                                                                                                                                                              case 4:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field DriverAttachmentOpts", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 2 other locations - About 1 day to fix
                                                                                                                                                                                                      api/specs.pb.go on lines 6423..6549
                                                                                                                                                                                                      api/specs.pb.go on lines 7254..7380

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

                                                                                                                                                                                                      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 (m *Endpoint_VirtualIP) Unmarshal(dAtA []byte) error {
                                                                                                                                                                                                          l := len(dAtA)
                                                                                                                                                                                                          iNdEx := 0
                                                                                                                                                                                                          for iNdEx < l {
                                                                                                                                                                                                              preIndex := iNdEx
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 1 other location - About 1 day to fix
                                                                                                                                                                                                      api/logbroker.pb.go on lines 2873..2986

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

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

                                                                                                                                                                                                      func ConvertVolumeWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                                                                                          var (
                                                                                                                                                                                                              m          Volume
                                                                                                                                                                                                              checkFuncs []VolumeCheckFunc
                                                                                                                                                                                                          )
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 5 other locations - About 1 day to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 3514..3574
                                                                                                                                                                                                      api/objects.pb.go on lines 4049..4109
                                                                                                                                                                                                      api/objects.pb.go on lines 4295..4355
                                                                                                                                                                                                      api/objects.pb.go on lines 4541..4601
                                                                                                                                                                                                      api/objects.pb.go on lines 4787..4847

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

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

                                                                                                                                                                                                      func ConvertServiceWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                                                                                          var (
                                                                                                                                                                                                              m          Service
                                                                                                                                                                                                              checkFuncs []ServiceCheckFunc
                                                                                                                                                                                                          )
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 5 other locations - About 1 day to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 4049..4109
                                                                                                                                                                                                      api/objects.pb.go on lines 4295..4355
                                                                                                                                                                                                      api/objects.pb.go on lines 4541..4601
                                                                                                                                                                                                      api/objects.pb.go on lines 4787..4847
                                                                                                                                                                                                      api/objects.pb.go on lines 5531..5591

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

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

                                                                                                                                                                                                      func ConvertNetworkWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                                                                                          var (
                                                                                                                                                                                                              m          Network
                                                                                                                                                                                                              checkFuncs []NetworkCheckFunc
                                                                                                                                                                                                          )
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 5 other locations - About 1 day to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 3514..3574
                                                                                                                                                                                                      api/objects.pb.go on lines 4295..4355
                                                                                                                                                                                                      api/objects.pb.go on lines 4541..4601
                                                                                                                                                                                                      api/objects.pb.go on lines 4787..4847
                                                                                                                                                                                                      api/objects.pb.go on lines 5531..5591

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

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

                                                                                                                                                                                                      func ConvertConfigWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                                                                                          var (
                                                                                                                                                                                                              m          Config
                                                                                                                                                                                                              checkFuncs []ConfigCheckFunc
                                                                                                                                                                                                          )
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 5 other locations - About 1 day to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 3514..3574
                                                                                                                                                                                                      api/objects.pb.go on lines 4049..4109
                                                                                                                                                                                                      api/objects.pb.go on lines 4295..4355
                                                                                                                                                                                                      api/objects.pb.go on lines 4541..4601
                                                                                                                                                                                                      api/objects.pb.go on lines 5531..5591

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

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

                                                                                                                                                                                                      func ConvertClusterWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                                                                                          var (
                                                                                                                                                                                                              m          Cluster
                                                                                                                                                                                                              checkFuncs []ClusterCheckFunc
                                                                                                                                                                                                          )
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 5 other locations - About 1 day to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 3514..3574
                                                                                                                                                                                                      api/objects.pb.go on lines 4049..4109
                                                                                                                                                                                                      api/objects.pb.go on lines 4541..4601
                                                                                                                                                                                                      api/objects.pb.go on lines 4787..4847
                                                                                                                                                                                                      api/objects.pb.go on lines 5531..5591

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

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

                                                                                                                                                                                                      func ConvertSecretWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                                                                                                                                                                                                          var (
                                                                                                                                                                                                              m          Secret
                                                                                                                                                                                                              checkFuncs []SecretCheckFunc
                                                                                                                                                                                                          )
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 5 other locations - About 1 day to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 3514..3574
                                                                                                                                                                                                      api/objects.pb.go on lines 4049..4109
                                                                                                                                                                                                      api/objects.pb.go on lines 4295..4355
                                                                                                                                                                                                      api/objects.pb.go on lines 4787..4847
                                                                                                                                                                                                      api/objects.pb.go on lines 5531..5591

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

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

                                                                                                                                                                                                      func skipObjects(dAtA []byte) (n int, err error) {
                                                                                                                                                                                                          l := len(dAtA)
                                                                                                                                                                                                          iNdEx := 0
                                                                                                                                                                                                          depth := 0
                                                                                                                                                                                                          for iNdEx < l {
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 10 other locations - About 6 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2345..2422
                                                                                                                                                                                                      api/dispatcher.pb.go on lines 5099..5176
                                                                                                                                                                                                      api/health.pb.go on lines 689..766
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3809..3886
                                                                                                                                                                                                      api/raft.pb.go on lines 4496..4573
                                                                                                                                                                                                      api/resource.pb.go on lines 1144..1221
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1528..1605
                                                                                                                                                                                                      api/specs.pb.go on lines 9186..9263
                                                                                                                                                                                                      api/watch.pb.go on lines 4796..4873
                                                                                                                                                                                                      protobuf/plugin/plugin.pb.go on lines 1190..1267

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

                                                                                                                                                                                                      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 _, filter := range filters {
                                                                                                                                                                                                              switch v := filter.By.(type) {
                                                                                                                                                                                                              case *SelectBy_ID:
                                                                                                                                                                                                                  if m.ID != "" {
                                                                                                                                                                                                                      return nil, errConflictingFilters
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5291..5330

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

                                                                                                                                                                                                      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 _, filter := range filters {
                                                                                                                                                                                                              switch v := filter.By.(type) {
                                                                                                                                                                                                              case *SelectBy_ID:
                                                                                                                                                                                                                  if m.ID != "" {
                                                                                                                                                                                                                      return nil, errConflictingFilters
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5045..5084

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

                                                                                                                                                                                                      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 (m *Endpoint_VirtualIP) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                                                                          i := len(dAtA)
                                                                                                                                                                                                          _ = i
                                                                                                                                                                                                          var l int
                                                                                                                                                                                                          _ = l
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                      api/logbroker.pb.go on lines 1363..1383

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

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

                                                                                                                                                                                                              case 2:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 3:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 7:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 3:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 5:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 3:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 8:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Certificate", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 3:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 2:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 3:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 3:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 1:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 2:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 9:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 2:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 3:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 2:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 3:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 3:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 4:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field RootCA", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 3:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 2:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 2:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 8:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field ServiceAnnotations", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 2:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 2:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9872..9904
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

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

                                                                                                                                                                                                              case 2:
                                                                                                                                                                                                                  if wireType != 2 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var msglen int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 46 other locations - About 2 hrs to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 2291..2323
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3016..3048
                                                                                                                                                                                                      api/objects.pb.go on lines 6328..6360
                                                                                                                                                                                                      api/objects.pb.go on lines 6515..6547
                                                                                                                                                                                                      api/objects.pb.go on lines 6548..6580
                                                                                                                                                                                                      api/objects.pb.go on lines 6617..6649
                                                                                                                                                                                                      api/objects.pb.go on lines 6722..6754
                                                                                                                                                                                                      api/objects.pb.go on lines 6909..6941
                                                                                                                                                                                                      api/objects.pb.go on lines 6942..6974
                                                                                                                                                                                                      api/objects.pb.go on lines 7561..7593
                                                                                                                                                                                                      api/objects.pb.go on lines 7594..7626
                                                                                                                                                                                                      api/objects.pb.go on lines 7710..7742
                                                                                                                                                                                                      api/objects.pb.go on lines 7743..7775
                                                                                                                                                                                                      api/objects.pb.go on lines 7776..7808
                                                                                                                                                                                                      api/objects.pb.go on lines 8433..8465
                                                                                                                                                                                                      api/objects.pb.go on lines 8466..8498
                                                                                                                                                                                                      api/objects.pb.go on lines 8673..8705
                                                                                                                                                                                                      api/objects.pb.go on lines 8706..8738
                                                                                                                                                                                                      api/objects.pb.go on lines 8739..8771
                                                                                                                                                                                                      api/objects.pb.go on lines 9160..9192
                                                                                                                                                                                                      api/objects.pb.go on lines 9193..9225
                                                                                                                                                                                                      api/objects.pb.go on lines 9328..9360
                                                                                                                                                                                                      api/objects.pb.go on lines 9361..9393
                                                                                                                                                                                                      api/objects.pb.go on lines 9476..9508
                                                                                                                                                                                                      api/objects.pb.go on lines 9509..9541
                                                                                                                                                                                                      api/objects.pb.go on lines 9692..9724
                                                                                                                                                                                                      api/objects.pb.go on lines 9725..9757
                                                                                                                                                                                                      api/objects.pb.go on lines 9905..9937
                                                                                                                                                                                                      api/raft.pb.go on lines 3100..3132
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1441..1473
                                                                                                                                                                                                      api/snapshot.pb.go on lines 1474..1506
                                                                                                                                                                                                      api/specs.pb.go on lines 4909..4941
                                                                                                                                                                                                      api/specs.pb.go on lines 5049..5081
                                                                                                                                                                                                      api/specs.pb.go on lines 5082..5114
                                                                                                                                                                                                      api/specs.pb.go on lines 7980..8012
                                                                                                                                                                                                      api/specs.pb.go on lines 8247..8279
                                                                                                                                                                                                      api/specs.pb.go on lines 8280..8312
                                                                                                                                                                                                      api/specs.pb.go on lines 8313..8345
                                                                                                                                                                                                      api/specs.pb.go on lines 8346..8378
                                                                                                                                                                                                      api/specs.pb.go on lines 8379..8411
                                                                                                                                                                                                      api/specs.pb.go on lines 8412..8444
                                                                                                                                                                                                      api/specs.pb.go on lines 8445..8477
                                                                                                                                                                                                      api/specs.pb.go on lines 8478..8510
                                                                                                                                                                                                      api/specs.pb.go on lines 8561..8593
                                                                                                                                                                                                      api/specs.pb.go on lines 8750..8782
                                                                                                                                                                                                      api/specs.pb.go on lines 8903..8935

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

                                                                                                                                                                                                      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 (this *Secret) String() string {
                                                                                                                                                                                                          if this == nil {
                                                                                                                                                                                                              return "nil"
                                                                                                                                                                                                          }
                                                                                                                                                                                                          s := strings.Join([]string{`&Secret{`,
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 6258..6270

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

                                                                                                                                                                                                      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 (this *Extension) String() string {
                                                                                                                                                                                                          if this == nil {
                                                                                                                                                                                                              return "nil"
                                                                                                                                                                                                          }
                                                                                                                                                                                                          s := strings.Join([]string{`&Extension{`,
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 6219..6231

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

                                                                                                                                                                                                      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

                                                                                                                                                                                                          if len(m.DriverAttachmentOpts) > 0 {
                                                                                                                                                                                                              for k := range m.DriverAttachmentOpts {
                                                                                                                                                                                                                  v := m.DriverAttachmentOpts[k]
                                                                                                                                                                                                                  baseI := i
                                                                                                                                                                                                                  i -= len(v)
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 1 other location - About 1 hr to fix
                                                                                                                                                                                                      api/specs.pb.go on lines 3145..3163

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

                                                                                                                                                                                                      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 (m *Endpoint_VirtualIP) Size() (n int) {
                                                                                                                                                                                                          if m == nil {
                                                                                                                                                                                                              return 0
                                                                                                                                                                                                          }
                                                                                                                                                                                                          var l int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 1 other location - About 1 hr to fix
                                                                                                                                                                                                      api/logbroker.pb.go on lines 2091..2106

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

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                              case 6:
                                                                                                                                                                                                                  if wireType != 0 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field PendingDelete", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var v int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 16 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/dispatcher.pb.go on lines 4298..4317
                                                                                                                                                                                                      api/logbroker.pb.go on lines 2485..2504
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3582..3601
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3718..3737
                                                                                                                                                                                                      api/objects.pb.go on lines 7083..7102
                                                                                                                                                                                                      api/objects.pb.go on lines 8571..8590
                                                                                                                                                                                                      api/objects.pb.go on lines 8988..9007
                                                                                                                                                                                                      api/objects.pb.go on lines 9226..9245
                                                                                                                                                                                                      api/specs.pb.go on lines 6882..6901
                                                                                                                                                                                                      api/specs.pb.go on lines 7038..7057
                                                                                                                                                                                                      api/specs.pb.go on lines 7058..7077
                                                                                                                                                                                                      api/specs.pb.go on lines 8049..8068
                                                                                                                                                                                                      api/specs.pb.go on lines 8069..8088
                                                                                                                                                                                                      api/specs.pb.go on lines 8125..8144
                                                                                                                                                                                                      api/specs.pb.go on lines 8145..8164
                                                                                                                                                                                                      api/watch.pb.go on lines 4359..4378

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 142.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                              case 7:
                                                                                                                                                                                                                  if wireType != 0 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field PendingDelete", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var v int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 16 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/dispatcher.pb.go on lines 4298..4317
                                                                                                                                                                                                      api/logbroker.pb.go on lines 2485..2504
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3582..3601
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3718..3737
                                                                                                                                                                                                      api/objects.pb.go on lines 8571..8590
                                                                                                                                                                                                      api/objects.pb.go on lines 8988..9007
                                                                                                                                                                                                      api/objects.pb.go on lines 9226..9245
                                                                                                                                                                                                      api/objects.pb.go on lines 10008..10027
                                                                                                                                                                                                      api/specs.pb.go on lines 6882..6901
                                                                                                                                                                                                      api/specs.pb.go on lines 7038..7057
                                                                                                                                                                                                      api/specs.pb.go on lines 7058..7077
                                                                                                                                                                                                      api/specs.pb.go on lines 8049..8068
                                                                                                                                                                                                      api/specs.pb.go on lines 8069..8088
                                                                                                                                                                                                      api/specs.pb.go on lines 8125..8144
                                                                                                                                                                                                      api/specs.pb.go on lines 8145..8164
                                                                                                                                                                                                      api/watch.pb.go on lines 4359..4378

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 142.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                              case 4:
                                                                                                                                                                                                                  if wireType != 0 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field Internal", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var v int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 16 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/dispatcher.pb.go on lines 4298..4317
                                                                                                                                                                                                      api/logbroker.pb.go on lines 2485..2504
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3582..3601
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3718..3737
                                                                                                                                                                                                      api/objects.pb.go on lines 7083..7102
                                                                                                                                                                                                      api/objects.pb.go on lines 8571..8590
                                                                                                                                                                                                      api/objects.pb.go on lines 8988..9007
                                                                                                                                                                                                      api/objects.pb.go on lines 10008..10027
                                                                                                                                                                                                      api/specs.pb.go on lines 6882..6901
                                                                                                                                                                                                      api/specs.pb.go on lines 7038..7057
                                                                                                                                                                                                      api/specs.pb.go on lines 7058..7077
                                                                                                                                                                                                      api/specs.pb.go on lines 8049..8068
                                                                                                                                                                                                      api/specs.pb.go on lines 8069..8088
                                                                                                                                                                                                      api/specs.pb.go on lines 8125..8144
                                                                                                                                                                                                      api/specs.pb.go on lines 8145..8164
                                                                                                                                                                                                      api/watch.pb.go on lines 4359..4378

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 142.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                              case 6:
                                                                                                                                                                                                                  if wireType != 0 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field PendingDelete", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var v int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 16 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/dispatcher.pb.go on lines 4298..4317
                                                                                                                                                                                                      api/logbroker.pb.go on lines 2485..2504
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3582..3601
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3718..3737
                                                                                                                                                                                                      api/objects.pb.go on lines 7083..7102
                                                                                                                                                                                                      api/objects.pb.go on lines 8988..9007
                                                                                                                                                                                                      api/objects.pb.go on lines 9226..9245
                                                                                                                                                                                                      api/objects.pb.go on lines 10008..10027
                                                                                                                                                                                                      api/specs.pb.go on lines 6882..6901
                                                                                                                                                                                                      api/specs.pb.go on lines 7038..7057
                                                                                                                                                                                                      api/specs.pb.go on lines 7058..7077
                                                                                                                                                                                                      api/specs.pb.go on lines 8049..8068
                                                                                                                                                                                                      api/specs.pb.go on lines 8069..8088
                                                                                                                                                                                                      api/specs.pb.go on lines 8125..8144
                                                                                                                                                                                                      api/specs.pb.go on lines 8145..8164
                                                                                                                                                                                                      api/watch.pb.go on lines 4359..4378

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 142.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                              case 10:
                                                                                                                                                                                                                  if wireType != 0 {
                                                                                                                                                                                                                      return fmt.Errorf("proto: wrong wireType = %d for field FIPS", wireType)
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  var v int
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 16 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/dispatcher.pb.go on lines 4298..4317
                                                                                                                                                                                                      api/logbroker.pb.go on lines 2485..2504
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3582..3601
                                                                                                                                                                                                      api/logbroker.pb.go on lines 3718..3737
                                                                                                                                                                                                      api/objects.pb.go on lines 7083..7102
                                                                                                                                                                                                      api/objects.pb.go on lines 8571..8590
                                                                                                                                                                                                      api/objects.pb.go on lines 9226..9245
                                                                                                                                                                                                      api/objects.pb.go on lines 10008..10027
                                                                                                                                                                                                      api/specs.pb.go on lines 6882..6901
                                                                                                                                                                                                      api/specs.pb.go on lines 7038..7057
                                                                                                                                                                                                      api/specs.pb.go on lines 7058..7077
                                                                                                                                                                                                      api/specs.pb.go on lines 8049..8068
                                                                                                                                                                                                      api/specs.pb.go on lines 8069..8088
                                                                                                                                                                                                      api/specs.pb.go on lines 8125..8144
                                                                                                                                                                                                      api/specs.pb.go on lines 8145..8164
                                                                                                                                                                                                      api/watch.pb.go on lines 4359..4378

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 142.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                          if len(m.Volumes) > 0 {
                                                                                                                                                                                                              for iNdEx := len(m.Volumes) - 1; iNdEx >= 0; iNdEx-- {
                                                                                                                                                                                                                  {
                                                                                                                                                                                                                      size, err := m.Volumes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
                                                                                                                                                                                                                      if err != nil {
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/specs.pb.go on lines 2839..2854
                                                                                                                                                                                                      api/specs.pb.go on lines 2940..2955

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

                                                                                                                                                                                                          case EventUpdateExtension:
                                                                                                                                                                                                              if v.OldExtension != nil {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Extension{Extension: v.Extension}}, OldObject: &Object{Object: &Object_Extension{Extension: v.OldExtension}}}
                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Extension{Extension: v.Extension}}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5871..5876
                                                                                                                                                                                                      api/objects.pb.go on lines 5881..5886
                                                                                                                                                                                                      api/objects.pb.go on lines 5891..5896
                                                                                                                                                                                                      api/objects.pb.go on lines 5901..5906
                                                                                                                                                                                                      api/objects.pb.go on lines 5911..5916
                                                                                                                                                                                                      api/objects.pb.go on lines 5921..5926
                                                                                                                                                                                                      api/objects.pb.go on lines 5931..5936
                                                                                                                                                                                                      api/objects.pb.go on lines 5941..5946
                                                                                                                                                                                                      api/objects.pb.go on lines 5961..5966

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

                                                                                                                                                                                                          case EventUpdateNetwork:
                                                                                                                                                                                                              if v.OldNetwork != nil {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Network{Network: v.Network}}, OldObject: &Object{Object: &Object_Network{Network: v.OldNetwork}}}
                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Network{Network: v.Network}}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5871..5876
                                                                                                                                                                                                      api/objects.pb.go on lines 5881..5886
                                                                                                                                                                                                      api/objects.pb.go on lines 5891..5896
                                                                                                                                                                                                      api/objects.pb.go on lines 5911..5916
                                                                                                                                                                                                      api/objects.pb.go on lines 5921..5926
                                                                                                                                                                                                      api/objects.pb.go on lines 5931..5936
                                                                                                                                                                                                      api/objects.pb.go on lines 5941..5946
                                                                                                                                                                                                      api/objects.pb.go on lines 5951..5956
                                                                                                                                                                                                      api/objects.pb.go on lines 5961..5966

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

                                                                                                                                                                                                          case EventUpdateResource:
                                                                                                                                                                                                              if v.OldResource != nil {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Resource{Resource: v.Resource}}, OldObject: &Object{Object: &Object_Resource{Resource: v.OldResource}}}
                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Resource{Resource: v.Resource}}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5871..5876
                                                                                                                                                                                                      api/objects.pb.go on lines 5881..5886
                                                                                                                                                                                                      api/objects.pb.go on lines 5891..5896
                                                                                                                                                                                                      api/objects.pb.go on lines 5901..5906
                                                                                                                                                                                                      api/objects.pb.go on lines 5911..5916
                                                                                                                                                                                                      api/objects.pb.go on lines 5921..5926
                                                                                                                                                                                                      api/objects.pb.go on lines 5931..5936
                                                                                                                                                                                                      api/objects.pb.go on lines 5951..5956
                                                                                                                                                                                                      api/objects.pb.go on lines 5961..5966

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

                                                                                                                                                                                                          case EventUpdateService:
                                                                                                                                                                                                              if v.OldService != nil {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Service{Service: v.Service}}, OldObject: &Object{Object: &Object_Service{Service: v.OldService}}}
                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Service{Service: v.Service}}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5871..5876
                                                                                                                                                                                                      api/objects.pb.go on lines 5891..5896
                                                                                                                                                                                                      api/objects.pb.go on lines 5901..5906
                                                                                                                                                                                                      api/objects.pb.go on lines 5911..5916
                                                                                                                                                                                                      api/objects.pb.go on lines 5921..5926
                                                                                                                                                                                                      api/objects.pb.go on lines 5931..5936
                                                                                                                                                                                                      api/objects.pb.go on lines 5941..5946
                                                                                                                                                                                                      api/objects.pb.go on lines 5951..5956
                                                                                                                                                                                                      api/objects.pb.go on lines 5961..5966

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

                                                                                                                                                                                                          case EventUpdateCluster:
                                                                                                                                                                                                              if v.OldCluster != nil {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Cluster{Cluster: v.Cluster}}, OldObject: &Object{Object: &Object_Cluster{Cluster: v.OldCluster}}}
                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Cluster{Cluster: v.Cluster}}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5871..5876
                                                                                                                                                                                                      api/objects.pb.go on lines 5881..5886
                                                                                                                                                                                                      api/objects.pb.go on lines 5891..5896
                                                                                                                                                                                                      api/objects.pb.go on lines 5901..5906
                                                                                                                                                                                                      api/objects.pb.go on lines 5921..5926
                                                                                                                                                                                                      api/objects.pb.go on lines 5931..5936
                                                                                                                                                                                                      api/objects.pb.go on lines 5941..5946
                                                                                                                                                                                                      api/objects.pb.go on lines 5951..5956
                                                                                                                                                                                                      api/objects.pb.go on lines 5961..5966

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

                                                                                                                                                                                                          case EventUpdateNode:
                                                                                                                                                                                                              if v.OldNode != nil {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Node{Node: v.Node}}, OldObject: &Object{Object: &Object_Node{Node: v.OldNode}}}
                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Node{Node: v.Node}}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5881..5886
                                                                                                                                                                                                      api/objects.pb.go on lines 5891..5896
                                                                                                                                                                                                      api/objects.pb.go on lines 5901..5906
                                                                                                                                                                                                      api/objects.pb.go on lines 5911..5916
                                                                                                                                                                                                      api/objects.pb.go on lines 5921..5926
                                                                                                                                                                                                      api/objects.pb.go on lines 5931..5936
                                                                                                                                                                                                      api/objects.pb.go on lines 5941..5946
                                                                                                                                                                                                      api/objects.pb.go on lines 5951..5956
                                                                                                                                                                                                      api/objects.pb.go on lines 5961..5966

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

                                                                                                                                                                                                          case EventUpdateConfig:
                                                                                                                                                                                                              if v.OldConfig != nil {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Config{Config: v.Config}}, OldObject: &Object{Object: &Object_Config{Config: v.OldConfig}}}
                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Config{Config: v.Config}}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5871..5876
                                                                                                                                                                                                      api/objects.pb.go on lines 5881..5886
                                                                                                                                                                                                      api/objects.pb.go on lines 5891..5896
                                                                                                                                                                                                      api/objects.pb.go on lines 5901..5906
                                                                                                                                                                                                      api/objects.pb.go on lines 5911..5916
                                                                                                                                                                                                      api/objects.pb.go on lines 5921..5926
                                                                                                                                                                                                      api/objects.pb.go on lines 5941..5946
                                                                                                                                                                                                      api/objects.pb.go on lines 5951..5956
                                                                                                                                                                                                      api/objects.pb.go on lines 5961..5966

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

                                                                                                                                                                                                          case EventUpdateVolume:
                                                                                                                                                                                                              if v.OldVolume != nil {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Volume{Volume: v.Volume}}, OldObject: &Object{Object: &Object_Volume{Volume: v.OldVolume}}}
                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Volume{Volume: v.Volume}}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5871..5876
                                                                                                                                                                                                      api/objects.pb.go on lines 5881..5886
                                                                                                                                                                                                      api/objects.pb.go on lines 5891..5896
                                                                                                                                                                                                      api/objects.pb.go on lines 5901..5906
                                                                                                                                                                                                      api/objects.pb.go on lines 5911..5916
                                                                                                                                                                                                      api/objects.pb.go on lines 5921..5926
                                                                                                                                                                                                      api/objects.pb.go on lines 5931..5936
                                                                                                                                                                                                      api/objects.pb.go on lines 5941..5946
                                                                                                                                                                                                      api/objects.pb.go on lines 5951..5956

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

                                                                                                                                                                                                          case EventUpdateTask:
                                                                                                                                                                                                              if v.OldTask != nil {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Task{Task: v.Task}}, OldObject: &Object{Object: &Object_Task{Task: v.OldTask}}}
                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Task{Task: v.Task}}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5871..5876
                                                                                                                                                                                                      api/objects.pb.go on lines 5881..5886
                                                                                                                                                                                                      api/objects.pb.go on lines 5901..5906
                                                                                                                                                                                                      api/objects.pb.go on lines 5911..5916
                                                                                                                                                                                                      api/objects.pb.go on lines 5921..5926
                                                                                                                                                                                                      api/objects.pb.go on lines 5931..5936
                                                                                                                                                                                                      api/objects.pb.go on lines 5941..5946
                                                                                                                                                                                                      api/objects.pb.go on lines 5951..5956
                                                                                                                                                                                                      api/objects.pb.go on lines 5961..5966

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

                                                                                                                                                                                                          case EventUpdateSecret:
                                                                                                                                                                                                              if v.OldSecret != nil {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Secret{Secret: v.Secret}}, OldObject: &Object{Object: &Object_Secret{Secret: v.OldSecret}}}
                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                  return &WatchMessage_Event{Action: WatchActionKindUpdate, Object: &Object{Object: &Object_Secret{Secret: v.Secret}}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 1 hr to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5871..5876
                                                                                                                                                                                                      api/objects.pb.go on lines 5881..5886
                                                                                                                                                                                                      api/objects.pb.go on lines 5891..5896
                                                                                                                                                                                                      api/objects.pb.go on lines 5901..5906
                                                                                                                                                                                                      api/objects.pb.go on lines 5911..5916
                                                                                                                                                                                                      api/objects.pb.go on lines 5931..5936
                                                                                                                                                                                                      api/objects.pb.go on lines 5941..5946
                                                                                                                                                                                                      api/objects.pb.go on lines 5951..5956
                                                                                                                                                                                                      api/objects.pb.go on lines 5961..5966

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

                                                                                                                                                                                                          if len(m.DriverAttachmentOpts) > 0 {
                                                                                                                                                                                                              for k, v := range m.DriverAttachmentOpts {
                                                                                                                                                                                                                  _ = k
                                                                                                                                                                                                                  _ = v
                                                                                                                                                                                                                  mapEntrySize := 1 + len(k) + sovObjects(uint64(len(k))) + 1 + len(v) + sovObjects(uint64(len(v)))
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 2 other locations - About 50 mins to fix
                                                                                                                                                                                                      api/specs.pb.go on lines 4077..4084
                                                                                                                                                                                                      api/specs.pb.go on lines 4188..4195

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

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

                                                                                                                                                                                                          case *StoreAction_Volume:
                                                                                                                                                                                                              switch sa.Action {
                                                                                                                                                                                                              case StoreActionKindCreate:
                                                                                                                                                                                                                  return EventCreateVolume{Volume: v.Volume}, nil
                                                                                                                                                                                                              case StoreActionKindUpdate:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 45 mins to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5733..5745
                                                                                                                                                                                                      api/objects.pb.go on lines 5746..5758
                                                                                                                                                                                                      api/objects.pb.go on lines 5759..5771
                                                                                                                                                                                                      api/objects.pb.go on lines 5772..5784
                                                                                                                                                                                                      api/objects.pb.go on lines 5785..5797
                                                                                                                                                                                                      api/objects.pb.go on lines 5798..5810
                                                                                                                                                                                                      api/objects.pb.go on lines 5811..5823
                                                                                                                                                                                                      api/objects.pb.go on lines 5824..5836
                                                                                                                                                                                                      api/objects.pb.go on lines 5837..5849

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

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

                                                                                                                                                                                                          case *StoreAction_Node:
                                                                                                                                                                                                              switch sa.Action {
                                                                                                                                                                                                              case StoreActionKindCreate:
                                                                                                                                                                                                                  return EventCreateNode{Node: v.Node}, nil
                                                                                                                                                                                                              case StoreActionKindUpdate:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 45 mins to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5746..5758
                                                                                                                                                                                                      api/objects.pb.go on lines 5759..5771
                                                                                                                                                                                                      api/objects.pb.go on lines 5772..5784
                                                                                                                                                                                                      api/objects.pb.go on lines 5785..5797
                                                                                                                                                                                                      api/objects.pb.go on lines 5798..5810
                                                                                                                                                                                                      api/objects.pb.go on lines 5811..5823
                                                                                                                                                                                                      api/objects.pb.go on lines 5824..5836
                                                                                                                                                                                                      api/objects.pb.go on lines 5837..5849
                                                                                                                                                                                                      api/objects.pb.go on lines 5850..5862

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

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

                                                                                                                                                                                                          case *StoreAction_Network:
                                                                                                                                                                                                              switch sa.Action {
                                                                                                                                                                                                              case StoreActionKindCreate:
                                                                                                                                                                                                                  return EventCreateNetwork{Network: v.Network}, nil
                                                                                                                                                                                                              case StoreActionKindUpdate:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 45 mins to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5733..5745
                                                                                                                                                                                                      api/objects.pb.go on lines 5746..5758
                                                                                                                                                                                                      api/objects.pb.go on lines 5759..5771
                                                                                                                                                                                                      api/objects.pb.go on lines 5785..5797
                                                                                                                                                                                                      api/objects.pb.go on lines 5798..5810
                                                                                                                                                                                                      api/objects.pb.go on lines 5811..5823
                                                                                                                                                                                                      api/objects.pb.go on lines 5824..5836
                                                                                                                                                                                                      api/objects.pb.go on lines 5837..5849
                                                                                                                                                                                                      api/objects.pb.go on lines 5850..5862

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

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

                                                                                                                                                                                                          case *StoreAction_Extension:
                                                                                                                                                                                                              switch sa.Action {
                                                                                                                                                                                                              case StoreActionKindCreate:
                                                                                                                                                                                                                  return EventCreateExtension{Extension: v.Extension}, nil
                                                                                                                                                                                                              case StoreActionKindUpdate:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 45 mins to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5733..5745
                                                                                                                                                                                                      api/objects.pb.go on lines 5746..5758
                                                                                                                                                                                                      api/objects.pb.go on lines 5759..5771
                                                                                                                                                                                                      api/objects.pb.go on lines 5772..5784
                                                                                                                                                                                                      api/objects.pb.go on lines 5785..5797
                                                                                                                                                                                                      api/objects.pb.go on lines 5798..5810
                                                                                                                                                                                                      api/objects.pb.go on lines 5811..5823
                                                                                                                                                                                                      api/objects.pb.go on lines 5824..5836
                                                                                                                                                                                                      api/objects.pb.go on lines 5850..5862

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

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

                                                                                                                                                                                                          case *StoreAction_Task:
                                                                                                                                                                                                              switch sa.Action {
                                                                                                                                                                                                              case StoreActionKindCreate:
                                                                                                                                                                                                                  return EventCreateTask{Task: v.Task}, nil
                                                                                                                                                                                                              case StoreActionKindUpdate:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 45 mins to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5733..5745
                                                                                                                                                                                                      api/objects.pb.go on lines 5746..5758
                                                                                                                                                                                                      api/objects.pb.go on lines 5772..5784
                                                                                                                                                                                                      api/objects.pb.go on lines 5785..5797
                                                                                                                                                                                                      api/objects.pb.go on lines 5798..5810
                                                                                                                                                                                                      api/objects.pb.go on lines 5811..5823
                                                                                                                                                                                                      api/objects.pb.go on lines 5824..5836
                                                                                                                                                                                                      api/objects.pb.go on lines 5837..5849
                                                                                                                                                                                                      api/objects.pb.go on lines 5850..5862

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

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

                                                                                                                                                                                                          case *StoreAction_Service:
                                                                                                                                                                                                              switch sa.Action {
                                                                                                                                                                                                              case StoreActionKindCreate:
                                                                                                                                                                                                                  return EventCreateService{Service: v.Service}, nil
                                                                                                                                                                                                              case StoreActionKindUpdate:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 45 mins to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5733..5745
                                                                                                                                                                                                      api/objects.pb.go on lines 5759..5771
                                                                                                                                                                                                      api/objects.pb.go on lines 5772..5784
                                                                                                                                                                                                      api/objects.pb.go on lines 5785..5797
                                                                                                                                                                                                      api/objects.pb.go on lines 5798..5810
                                                                                                                                                                                                      api/objects.pb.go on lines 5811..5823
                                                                                                                                                                                                      api/objects.pb.go on lines 5824..5836
                                                                                                                                                                                                      api/objects.pb.go on lines 5837..5849
                                                                                                                                                                                                      api/objects.pb.go on lines 5850..5862

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

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

                                                                                                                                                                                                          case *StoreAction_Secret:
                                                                                                                                                                                                              switch sa.Action {
                                                                                                                                                                                                              case StoreActionKindCreate:
                                                                                                                                                                                                                  return EventCreateSecret{Secret: v.Secret}, nil
                                                                                                                                                                                                              case StoreActionKindUpdate:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 45 mins to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5733..5745
                                                                                                                                                                                                      api/objects.pb.go on lines 5746..5758
                                                                                                                                                                                                      api/objects.pb.go on lines 5759..5771
                                                                                                                                                                                                      api/objects.pb.go on lines 5772..5784
                                                                                                                                                                                                      api/objects.pb.go on lines 5785..5797
                                                                                                                                                                                                      api/objects.pb.go on lines 5811..5823
                                                                                                                                                                                                      api/objects.pb.go on lines 5824..5836
                                                                                                                                                                                                      api/objects.pb.go on lines 5837..5849
                                                                                                                                                                                                      api/objects.pb.go on lines 5850..5862

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

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

                                                                                                                                                                                                          case *StoreAction_Config:
                                                                                                                                                                                                              switch sa.Action {
                                                                                                                                                                                                              case StoreActionKindCreate:
                                                                                                                                                                                                                  return EventCreateConfig{Config: v.Config}, nil
                                                                                                                                                                                                              case StoreActionKindUpdate:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 45 mins to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5733..5745
                                                                                                                                                                                                      api/objects.pb.go on lines 5746..5758
                                                                                                                                                                                                      api/objects.pb.go on lines 5759..5771
                                                                                                                                                                                                      api/objects.pb.go on lines 5772..5784
                                                                                                                                                                                                      api/objects.pb.go on lines 5785..5797
                                                                                                                                                                                                      api/objects.pb.go on lines 5798..5810
                                                                                                                                                                                                      api/objects.pb.go on lines 5824..5836
                                                                                                                                                                                                      api/objects.pb.go on lines 5837..5849
                                                                                                                                                                                                      api/objects.pb.go on lines 5850..5862

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

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

                                                                                                                                                                                                          case *StoreAction_Cluster:
                                                                                                                                                                                                              switch sa.Action {
                                                                                                                                                                                                              case StoreActionKindCreate:
                                                                                                                                                                                                                  return EventCreateCluster{Cluster: v.Cluster}, nil
                                                                                                                                                                                                              case StoreActionKindUpdate:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 45 mins to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5733..5745
                                                                                                                                                                                                      api/objects.pb.go on lines 5746..5758
                                                                                                                                                                                                      api/objects.pb.go on lines 5759..5771
                                                                                                                                                                                                      api/objects.pb.go on lines 5772..5784
                                                                                                                                                                                                      api/objects.pb.go on lines 5798..5810
                                                                                                                                                                                                      api/objects.pb.go on lines 5811..5823
                                                                                                                                                                                                      api/objects.pb.go on lines 5824..5836
                                                                                                                                                                                                      api/objects.pb.go on lines 5837..5849
                                                                                                                                                                                                      api/objects.pb.go on lines 5850..5862

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

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

                                                                                                                                                                                                          case *StoreAction_Resource:
                                                                                                                                                                                                              switch sa.Action {
                                                                                                                                                                                                              case StoreActionKindCreate:
                                                                                                                                                                                                                  return EventCreateResource{Resource: v.Resource}, nil
                                                                                                                                                                                                              case StoreActionKindUpdate:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 9 other locations - About 45 mins to fix
                                                                                                                                                                                                      api/objects.pb.go on lines 5733..5745
                                                                                                                                                                                                      api/objects.pb.go on lines 5746..5758
                                                                                                                                                                                                      api/objects.pb.go on lines 5759..5771
                                                                                                                                                                                                      api/objects.pb.go on lines 5772..5784
                                                                                                                                                                                                      api/objects.pb.go on lines 5785..5797
                                                                                                                                                                                                      api/objects.pb.go on lines 5798..5810
                                                                                                                                                                                                      api/objects.pb.go on lines 5811..5823
                                                                                                                                                                                                      api/objects.pb.go on lines 5837..5849
                                                                                                                                                                                                      api/objects.pb.go on lines 5850..5862

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

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

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

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 115.

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

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

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

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

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                      func encodeVarintObjects(dAtA []byte, offset int, v uint64) int {
                                                                                                                                                                                                          offset -= sovObjects(v)
                                                                                                                                                                                                          base := offset
                                                                                                                                                                                                          for v >= 1<<7 {
                                                                                                                                                                                                              dAtA[offset] = uint8(v&0x7f | 0x80)
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 10 other locations - About 35 mins to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 1076..1086
                                                                                                                                                                                                      api/dispatcher.pb.go on lines 2431..2441
                                                                                                                                                                                                      api/health.pb.go on lines 360..370
                                                                                                                                                                                                      api/logbroker.pb.go on lines 1704..1714
                                                                                                                                                                                                      api/raft.pb.go on lines 2074..2084
                                                                                                                                                                                                      api/resource.pb.go on lines 552..562
                                                                                                                                                                                                      api/snapshot.pb.go on lines 616..626
                                                                                                                                                                                                      api/specs.pb.go on lines 3784..3794
                                                                                                                                                                                                      api/watch.pb.go on lines 2137..2147
                                                                                                                                                                                                      protobuf/plugin/plugin.pb.go on lines 526..536

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

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

                                                                                                                                                                                                      func (this *Endpoint_VirtualIP) String() string {
                                                                                                                                                                                                          if this == nil {
                                                                                                                                                                                                              return "nil"
                                                                                                                                                                                                          }
                                                                                                                                                                                                          s := strings.Join([]string{`&Endpoint_VirtualIP{`,
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in api/objects.pb.go and 7 other locations - About 35 mins to fix
                                                                                                                                                                                                      api/ca.pb.go on lines 1527..1537
                                                                                                                                                                                                      api/dispatcher.pb.go on lines 3192..3202
                                                                                                                                                                                                      api/logbroker.pb.go on lines 2275..2285
                                                                                                                                                                                                      api/raft.pb.go on lines 2869..2879
                                                                                                                                                                                                      api/specs.pb.go on lines 4544..4554
                                                                                                                                                                                                      api/specs.pb.go on lines 4621..4631
                                                                                                                                                                                                      api/watch.pb.go on lines 2815..2825

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

                                                                                                                                                                                                      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

                                                                                                                                                                                                      There are no issues that match your filters.

                                                                                                                                                                                                      Category
                                                                                                                                                                                                      Status