docker/swarmkit

View on GitHub
api/specs.pb.go

Summary

Maintainability
F
5 mos
Test Coverage

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

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

package api

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

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

    func (m *ContainerSpec) Unmarshal(dAtA []byte) error {
        l := len(dAtA)
        iNdEx := 0
        for iNdEx < l {
            preIndex := iNdEx
    Severity: Minor
    Found in api/specs.pb.go - About 3 wks 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 ServiceSpec.Unmarshal has a Cognitive Complexity of 338 (exceeds 20 allowed). Consider refactoring.
    Open

    func (m *ServiceSpec) Unmarshal(dAtA []byte) error {
        l := len(dAtA)
        iNdEx := 0
        for iNdEx < l {
            preIndex := iNdEx
    Severity: Minor
    Found in api/specs.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 TaskSpec.Unmarshal has a Cognitive Complexity of 329 (exceeds 20 allowed). Consider refactoring.
    Open

    func (m *TaskSpec) Unmarshal(dAtA []byte) error {
        l := len(dAtA)
        iNdEx := 0
        for iNdEx < l {
            preIndex := iNdEx
    Severity: Minor
    Found in api/specs.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 ContainerSpec.Unmarshal has 1135 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

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

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

      func (m *ClusterSpec) Unmarshal(dAtA []byte) error {
          l := len(dAtA)
          iNdEx := 0
          for iNdEx < l {
              preIndex := iNdEx
      Severity: Minor
      Found in api/specs.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 VolumeSpec.Unmarshal has a Cognitive Complexity of 266 (exceeds 20 allowed). Consider refactoring.
      Open

      func (m *VolumeSpec) Unmarshal(dAtA []byte) error {
          l := len(dAtA)
          iNdEx := 0
          for iNdEx < l {
              preIndex := iNdEx
      Severity: Minor
      Found in api/specs.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 NetworkSpec.Unmarshal has a Cognitive Complexity of 224 (exceeds 20 allowed). Consider refactoring.
      Open

      func (m *NetworkSpec) Unmarshal(dAtA []byte) error {
          l := len(dAtA)
          iNdEx := 0
          for iNdEx < l {
              preIndex := iNdEx
      Severity: Minor
      Found in api/specs.pb.go - About 4 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 SecretSpec.Unmarshal has a Cognitive Complexity of 155 (exceeds 20 allowed). Consider refactoring.
      Open

      func (m *SecretSpec) Unmarshal(dAtA []byte) error {
          l := len(dAtA)
          iNdEx := 0
          for iNdEx < l {
              preIndex := iNdEx
      Severity: Minor
      Found in api/specs.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 ContainerSpec.Unmarshal has 208 return statements (exceeds 4 allowed).
      Open

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

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

        func (m *ConfigSpec) Unmarshal(dAtA []byte) error {
            l := len(dAtA)
            iNdEx := 0
            for iNdEx < l {
                preIndex := iNdEx
        Severity: Minor
        Found in api/specs.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 NodeSpec.Unmarshal has a Cognitive Complexity of 113 (exceeds 20 allowed). Consider refactoring.
        Open

        func (m *NodeSpec) Unmarshal(dAtA []byte) error {
            l := len(dAtA)
            iNdEx := 0
            for iNdEx < l {
                preIndex := iNdEx
        Severity: Minor
        Found in api/specs.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 ContainerSpec_DNSConfig.Unmarshal has a Cognitive Complexity of 110 (exceeds 20 allowed). Consider refactoring.
        Open

        func (m *ContainerSpec_DNSConfig) Unmarshal(dAtA []byte) error {
            l := len(dAtA)
            iNdEx := 0
            for iNdEx < l {
                preIndex := iNdEx
        Severity: Minor
        Found in api/specs.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 ServiceSpec.Unmarshal has 395 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

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

          Method TaskSpec.Unmarshal has 383 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

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

            Method ContainerSpec.MarshalToSizedBuffer has 337 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

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

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

              func (m *ContainerSpec_Ulimit) Unmarshal(dAtA []byte) error {
                  l := len(dAtA)
                  iNdEx := 0
                  for iNdEx < l {
                      preIndex := iNdEx
              Severity: Minor
              Found in api/specs.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 GenericRuntimeSpec.Unmarshal has a Cognitive Complexity of 89 (exceeds 20 allowed). Consider refactoring.
              Open

              func (m *GenericRuntimeSpec) Unmarshal(dAtA []byte) error {
                  l := len(dAtA)
                  iNdEx := 0
                  for iNdEx < l {
                      preIndex := iNdEx
              Severity: Minor
              Found in api/specs.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 ContainerSpec.MarshalToSizedBuffer has a Cognitive Complexity of 88 (exceeds 20 allowed). Consider refactoring.
              Open

              func (m *ContainerSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                  i := len(dAtA)
                  _ = i
                  var l int
                  _ = l
              Severity: Minor
              Found in api/specs.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 ClusterSpec.Unmarshal has 311 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

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

                Method VolumeSpec.Unmarshal has 309 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

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

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

                  func (m *EndpointSpec) Unmarshal(dAtA []byte) error {
                      l := len(dAtA)
                      iNdEx := 0
                      for iNdEx < l {
                          preIndex := iNdEx
                  Severity: Minor
                  Found in api/specs.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 NetworkSpec.Unmarshal has 264 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

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

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

                    func (m *ResourceReference) Unmarshal(dAtA []byte) error {
                        l := len(dAtA)
                        iNdEx := 0
                        for iNdEx < l {
                            preIndex := iNdEx
                    Severity: Minor
                    Found in api/specs.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 ReplicatedJob.Unmarshal has a Cognitive Complexity of 65 (exceeds 20 allowed). Consider refactoring.
                    Open

                    func (m *ReplicatedJob) Unmarshal(dAtA []byte) error {
                        l := len(dAtA)
                        iNdEx := 0
                        for iNdEx < l {
                            preIndex := iNdEx
                    Severity: Minor
                    Found in api/specs.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 ServiceSpec.Unmarshal has 79 return statements (exceeds 4 allowed).
                    Open

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

                      Method SecretSpec.Unmarshal has 186 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

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

                        Method TaskSpec.Unmarshal has 75 return statements (exceeds 4 allowed).
                        Open

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

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

                          func (m *ContainerSpec) Size() (n int) {
                              if m == nil {
                                  return 0
                              }
                              var l int
                          Severity: Minor
                          Found in api/specs.pb.go - About 6 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 NetworkAttachmentSpec.Unmarshal has a Cognitive Complexity of 56 (exceeds 20 allowed). Consider refactoring.
                          Open

                          func (m *NetworkAttachmentSpec) Unmarshal(dAtA []byte) error {
                              l := len(dAtA)
                              iNdEx := 0
                              for iNdEx < l {
                                  preIndex := iNdEx
                          Severity: Minor
                          Found in api/specs.pb.go - About 6 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 ContainerSpec_PullOptions.Unmarshal has a Cognitive Complexity of 56 (exceeds 20 allowed). Consider refactoring.
                          Open

                          func (m *ContainerSpec_PullOptions) Unmarshal(dAtA []byte) error {
                              l := len(dAtA)
                              iNdEx := 0
                              for iNdEx < l {
                                  preIndex := iNdEx
                          Severity: Minor
                          Found in api/specs.pb.go - About 6 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 skipSpecs has a Cognitive Complexity of 54 (exceeds 20 allowed). Consider refactoring.
                          Open

                          func skipSpecs(dAtA []byte) (n int, err error) {
                              l := len(dAtA)
                              iNdEx := 0
                              depth := 0
                              for iNdEx < l {
                          Severity: Minor
                          Found in api/specs.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 ClusterSpec.Unmarshal has 65 return statements (exceeds 4 allowed).
                          Open

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

                            Method VolumeSpec.Unmarshal has 60 return statements (exceeds 4 allowed).
                            Open

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

                              Method ConfigSpec.Unmarshal has 150 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

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

                                Method ContainerSpec.Size has 147 lines of code (exceeds 50 allowed). Consider refactoring.
                                Open

                                func (m *ContainerSpec) Size() (n int) {
                                    if m == nil {
                                        return 0
                                    }
                                    var l int
                                Severity: Major
                                Found in api/specs.pb.go - About 4 hrs to fix

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

                                  func (m *ReplicatedService) Unmarshal(dAtA []byte) error {
                                      l := len(dAtA)
                                      iNdEx := 0
                                      for iNdEx < l {
                                          preIndex := iNdEx
                                  Severity: Minor
                                  Found in api/specs.pb.go - About 4 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 ContainerSpec_DNSConfig.Unmarshal has 143 lines of code (exceeds 50 allowed). Consider refactoring.
                                  Open

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

                                    Method NodeSpec.Unmarshal has 137 lines of code (exceeds 50 allowed). Consider refactoring.
                                    Open

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

                                      Method NetworkSpec.Unmarshal has 48 return statements (exceeds 4 allowed).
                                      Open

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

                                        Method ContainerSpec_Ulimit.Unmarshal has 117 lines of code (exceeds 50 allowed). Consider refactoring.
                                        Open

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

                                          Method GenericRuntimeSpec.Unmarshal has 115 lines of code (exceeds 50 allowed). Consider refactoring.
                                          Open

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

                                            Method SecretSpec.Unmarshal has 36 return statements (exceeds 4 allowed).
                                            Open

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

                                              Method EndpointSpec.Unmarshal has 100 lines of code (exceeds 50 allowed). Consider refactoring.
                                              Open

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

                                                Method ResourceReference.Unmarshal has 98 lines of code (exceeds 50 allowed). Consider refactoring.
                                                Open

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

                                                  Method TaskSpec.MarshalToSizedBuffer has 95 lines of code (exceeds 50 allowed). Consider refactoring.
                                                  Open

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

                                                    Method ContainerSpec.CopyFrom has 93 lines of code (exceeds 50 allowed). Consider refactoring.
                                                    Open

                                                    func (m *ContainerSpec) CopyFrom(src interface{}) {
                                                    
                                                        o := src.(*ContainerSpec)
                                                        *m = *o
                                                        if o.Labels != nil {
                                                    Severity: Major
                                                    Found in api/specs.pb.go - About 2 hrs to fix

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

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

                                                        Method VolumeSpec.MarshalToSizedBuffer has 89 lines of code (exceeds 50 allowed). Consider refactoring.
                                                        Open

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

                                                          Method NetworkSpec.MarshalToSizedBuffer has 88 lines of code (exceeds 50 allowed). Consider refactoring.
                                                          Open

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

                                                            Method ContainerSpec_DNSConfig.Unmarshal has 27 return statements (exceeds 4 allowed).
                                                            Open

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

                                                              Method ReplicatedJob.Unmarshal has 85 lines of code (exceeds 50 allowed). Consider refactoring.
                                                              Open

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

                                                                Method ClusterSpec.MarshalToSizedBuffer has 85 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                Open

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

                                                                  Method ServiceSpec.MarshalToSizedBuffer has 84 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                  Open

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

                                                                    ServiceSpec has 22 methods (exceeds 20 allowed). Consider refactoring.
                                                                    Open

                                                                    type ServiceSpec struct {
                                                                        Annotations Annotations `protobuf:"bytes,1,opt,name=annotations,proto3" json:"annotations"`
                                                                        // Task defines the task template this service will spawn.
                                                                        Task TaskSpec `protobuf:"bytes,2,opt,name=task,proto3" json:"task"`
                                                                        // Types that are valid to be assigned to Mode:
                                                                    Severity: Minor
                                                                    Found in api/specs.pb.go - About 2 hrs to fix

                                                                      Method NodeSpec.Unmarshal has 25 return statements (exceeds 4 allowed).
                                                                      Open

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

                                                                        TaskSpec has 21 methods (exceeds 20 allowed). Consider refactoring.
                                                                        Open

                                                                        type TaskSpec struct {
                                                                            // Types that are valid to be assigned to Runtime:
                                                                            //    *TaskSpec_Attachment
                                                                            //    *TaskSpec_Container
                                                                            //    *TaskSpec_Generic
                                                                        Severity: Minor
                                                                        Found in api/specs.pb.go - About 2 hrs to fix

                                                                          Method ContainerSpec_PullOptions.Unmarshal has 79 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                          Open

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

                                                                            Method NetworkAttachmentSpec.Unmarshal has 79 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                            Open

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

                                                                              Method ContainerSpec.CopyFrom has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring.
                                                                              Open

                                                                              func (m *ContainerSpec) CopyFrom(src interface{}) {
                                                                              
                                                                                  o := src.(*ContainerSpec)
                                                                                  *m = *o
                                                                                  if o.Labels != nil {
                                                                              Severity: Minor
                                                                              Found in api/specs.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 skipSpecs has 76 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                              Open

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

                                                                                Method ContainerSpec.String has 76 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                Open

                                                                                func (this *ContainerSpec) String() string {
                                                                                    if this == nil {
                                                                                        return "nil"
                                                                                    }
                                                                                    repeatedStringForMounts := "[]Mount{"
                                                                                Severity: Major
                                                                                Found in api/specs.pb.go - About 2 hrs to fix

                                                                                  Method GenericRuntimeSpec.Unmarshal has 22 return statements (exceeds 4 allowed).
                                                                                  Open

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

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

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

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

                                                                                      func (m *GlobalJob) Unmarshal(dAtA []byte) error {
                                                                                          l := len(dAtA)
                                                                                          iNdEx := 0
                                                                                          for iNdEx < l {
                                                                                              preIndex := iNdEx
                                                                                      Severity: Minor
                                                                                      Found in api/specs.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 EndpointSpec.Unmarshal has 19 return statements (exceeds 4 allowed).
                                                                                      Open

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

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

                                                                                        func (m *GlobalService) Unmarshal(dAtA []byte) error {
                                                                                            l := len(dAtA)
                                                                                            iNdEx := 0
                                                                                            for iNdEx < l {
                                                                                                preIndex := iNdEx
                                                                                        Severity: Minor
                                                                                        Found in api/specs.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 ResourceReference.Unmarshal has 18 return statements (exceeds 4 allowed).
                                                                                        Open

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

                                                                                          Method ReplicatedService.Unmarshal has 66 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                          Open

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

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

                                                                                            func (m *TaskSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                i := len(dAtA)
                                                                                                _ = i
                                                                                                var l int
                                                                                                _ = l
                                                                                            Severity: Minor
                                                                                            Found in api/specs.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 ReplicatedJob.Unmarshal has 15 return statements (exceeds 4 allowed).
                                                                                            Open

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

                                                                                              Method ContainerSpec_PullOptions.Unmarshal has 15 return statements (exceeds 4 allowed).
                                                                                              Open

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

                                                                                                Method NetworkAttachmentSpec.Unmarshal has 15 return statements (exceeds 4 allowed).
                                                                                                Open

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

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

                                                                                                  func (m *NetworkSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                      i := len(dAtA)
                                                                                                      _ = i
                                                                                                      var l int
                                                                                                      _ = l
                                                                                                  Severity: Minor
                                                                                                  Found in api/specs.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 ReplicatedService.Unmarshal has 12 return statements (exceeds 4 allowed).
                                                                                                  Open

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

                                                                                                    Method TaskSpec.CopyFrom has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                    func (m *TaskSpec) CopyFrom(src interface{}) {
                                                                                                    
                                                                                                        o := src.(*TaskSpec)
                                                                                                        *m = *o
                                                                                                        if o.Resources != nil {
                                                                                                    Severity: Minor
                                                                                                    Found in api/specs.pb.go - About 1 hr to fix

                                                                                                      Method ContainerSpec.MarshalToSizedBuffer has 11 return statements (exceeds 4 allowed).
                                                                                                      Open

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

                                                                                                        Function skipSpecs has 11 return statements (exceeds 4 allowed).
                                                                                                        Open

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

                                                                                                          Method ServiceSpec.CopyFrom has 51 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                          func (m *ServiceSpec) CopyFrom(src interface{}) {
                                                                                                          
                                                                                                              o := src.(*ServiceSpec)
                                                                                                              *m = *o
                                                                                                              github_com_moby_swarmkit_v2_api_deepcopy.Copy(&m.Annotations, &o.Annotations)
                                                                                                          Severity: Minor
                                                                                                          Found in api/specs.pb.go - About 1 hr to fix

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

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

                                                                                                              Method GlobalJob.Unmarshal has 9 return statements (exceeds 4 allowed).
                                                                                                              Open

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

                                                                                                                Method GlobalService.Unmarshal has 9 return statements (exceeds 4 allowed).
                                                                                                                Open

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

                                                                                                                  Method ServiceSpec.MarshalToSizedBuffer has 8 return statements (exceeds 4 allowed).
                                                                                                                  Open

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

                                                                                                                    Method TaskSpec.MarshalToSizedBuffer has 8 return statements (exceeds 4 allowed).
                                                                                                                    Open

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

                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                      Open

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

                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                        Open

                                                                                                                                            if shift >= 64 {
                                                                                                                                                return ErrIntOverflowSpecs
                                                                                                                                            }
                                                                                                                        Severity: Major
                                                                                                                        Found in api/specs.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/specs.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/specs.pb.go - About 45 mins to fix

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

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

                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                Open

                                                                                                                                                    for shift := uint(0); ; shift += 7 {
                                                                                                                                                        if shift >= 64 {
                                                                                                                                                            return ErrIntOverflowSpecs
                                                                                                                                                        }
                                                                                                                                                        if iNdEx >= l {
                                                                                                                                Severity: Major
                                                                                                                                Found in api/specs.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 ErrIntOverflowSpecs
                                                                                                                                  Severity: Major
                                                                                                                                  Found in api/specs.pb.go - About 45 mins to fix

                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                    Open

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

                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                      Open

                                                                                                                                                          if postStringIndexmapkey < 0 {
                                                                                                                                                              return ErrInvalidLengthSpecs
                                                                                                                                                          }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in api/specs.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/specs.pb.go - About 45 mins to fix

                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                          Open

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

                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                            Open

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

                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                              Open

                                                                                                                                                                  for shift := uint(0); ; shift += 7 {
                                                                                                                                                                      if shift >= 64 {
                                                                                                                                                                          return ErrIntOverflowSpecs
                                                                                                                                                                      }
                                                                                                                                                                      if iNdEx >= l {
                                                                                                                                              Severity: Major
                                                                                                                                              Found in api/specs.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 ErrIntOverflowSpecs
                                                                                                                                                Severity: Major
                                                                                                                                                Found in api/specs.pb.go - About 45 mins to fix

                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                  Open

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

                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                    Open

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

                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                      Open

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

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

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

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

                                                                                                                                                          func (m *VolumeSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                              i := len(dAtA)
                                                                                                                                                              _ = i
                                                                                                                                                              var l int
                                                                                                                                                              _ = l
                                                                                                                                                          Severity: Minor
                                                                                                                                                          Found in api/specs.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 2 locations. Consider refactoring.
                                                                                                                                                          Open

                                                                                                                                                          func (m *ContainerSpec_DNSConfig) Unmarshal(dAtA []byte) error {
                                                                                                                                                              l := len(dAtA)
                                                                                                                                                              iNdEx := 0
                                                                                                                                                              for iNdEx < l {
                                                                                                                                                                  preIndex := iNdEx
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 1 other location - About 1 day to fix
                                                                                                                                                          api/logbroker.pb.go on lines 2581..2726

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

                                                                                                                                                          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

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

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

                                                                                                                                                                  case 2:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 2 other locations - About 1 day to fix
                                                                                                                                                          api/objects.pb.go on lines 8224..8350
                                                                                                                                                          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 3 locations. Consider refactoring.
                                                                                                                                                          Open

                                                                                                                                                          func (m *ResourceReference) Unmarshal(dAtA []byte) error {
                                                                                                                                                              l := len(dAtA)
                                                                                                                                                              iNdEx := 0
                                                                                                                                                              for iNdEx < l {
                                                                                                                                                                  preIndex := iNdEx
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 2 other locations - About 1 day to fix
                                                                                                                                                          api/ca.pb.go on lines 1943..2043
                                                                                                                                                          api/watch.pb.go on lines 3478..3578

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

                                                                                                                                                          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 (m *ContainerSpec_PullOptions) Unmarshal(dAtA []byte) error {
                                                                                                                                                              l := len(dAtA)
                                                                                                                                                              iNdEx := 0
                                                                                                                                                              for iNdEx < l {
                                                                                                                                                                  preIndex := iNdEx
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 10 other locations - About 1 day to fix
                                                                                                                                                          api/ca.pb.go on lines 1585..1666
                                                                                                                                                          api/dispatcher.pb.go on lines 3672..3753
                                                                                                                                                          api/dispatcher.pb.go on lines 4389..4470
                                                                                                                                                          api/dispatcher.pb.go on lines 4555..4636
                                                                                                                                                          api/health.pb.go on lines 538..619
                                                                                                                                                          api/raft.pb.go on lines 3154..3235
                                                                                                                                                          api/raft.pb.go on lines 3892..3973
                                                                                                                                                          api/resource.pb.go on lines 930..1011
                                                                                                                                                          api/resource.pb.go on lines 1012..1093
                                                                                                                                                          api/specs.pb.go on lines 6280..6361

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

                                                                                                                                                          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 (m *NetworkAttachmentSpec) Unmarshal(dAtA []byte) error {
                                                                                                                                                              l := len(dAtA)
                                                                                                                                                              iNdEx := 0
                                                                                                                                                              for iNdEx < l {
                                                                                                                                                                  preIndex := iNdEx
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 10 other locations - About 1 day to fix
                                                                                                                                                          api/ca.pb.go on lines 1585..1666
                                                                                                                                                          api/dispatcher.pb.go on lines 3672..3753
                                                                                                                                                          api/dispatcher.pb.go on lines 4389..4470
                                                                                                                                                          api/dispatcher.pb.go on lines 4555..4636
                                                                                                                                                          api/health.pb.go on lines 538..619
                                                                                                                                                          api/raft.pb.go on lines 3154..3235
                                                                                                                                                          api/raft.pb.go on lines 3892..3973
                                                                                                                                                          api/resource.pb.go on lines 930..1011
                                                                                                                                                          api/resource.pb.go on lines 1012..1093
                                                                                                                                                          api/specs.pb.go on lines 7500..7581

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

                                                                                                                                                          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 skipSpecs(dAtA []byte) (n int, err error) {
                                                                                                                                                              l := len(dAtA)
                                                                                                                                                              iNdEx := 0
                                                                                                                                                              depth := 0
                                                                                                                                                              for iNdEx < l {
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/objects.pb.go on lines 10049..10126
                                                                                                                                                          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/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 3 locations. Consider refactoring.
                                                                                                                                                          Open

                                                                                                                                                          func (m *ReplicatedService) Unmarshal(dAtA []byte) error {
                                                                                                                                                              l := len(dAtA)
                                                                                                                                                              iNdEx := 0
                                                                                                                                                              for iNdEx < l {
                                                                                                                                                                  preIndex := iNdEx
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 2 other locations - About 6 hrs to fix
                                                                                                                                                          api/health.pb.go on lines 620..688
                                                                                                                                                          api/raft.pb.go on lines 3823..3891

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

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

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

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

                                                                                                                                                          func (m *GlobalJob) Unmarshal(dAtA []byte) error {
                                                                                                                                                              l := len(dAtA)
                                                                                                                                                              iNdEx := 0
                                                                                                                                                              for iNdEx < l {
                                                                                                                                                                  preIndex := iNdEx
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 11 other locations - About 4 hrs to fix
                                                                                                                                                          api/ca.pb.go on lines 2044..2093
                                                                                                                                                          api/ca.pb.go on lines 2178..2227
                                                                                                                                                          api/dispatcher.pb.go on lines 4071..4120
                                                                                                                                                          api/dispatcher.pb.go on lines 4339..4388
                                                                                                                                                          api/logbroker.pb.go on lines 3399..3448
                                                                                                                                                          api/logbroker.pb.go on lines 3759..3808
                                                                                                                                                          api/raft.pb.go on lines 3501..3550
                                                                                                                                                          api/raft.pb.go on lines 3637..3686
                                                                                                                                                          api/raft.pb.go on lines 3773..3822
                                                                                                                                                          api/resource.pb.go on lines 1094..1143
                                                                                                                                                          api/specs.pb.go on lines 5487..5536

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

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

                                                                                                                                                          func (m *GlobalService) Unmarshal(dAtA []byte) error {
                                                                                                                                                              l := len(dAtA)
                                                                                                                                                              iNdEx := 0
                                                                                                                                                              for iNdEx < l {
                                                                                                                                                                  preIndex := iNdEx
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 11 other locations - About 4 hrs to fix
                                                                                                                                                          api/ca.pb.go on lines 2044..2093
                                                                                                                                                          api/ca.pb.go on lines 2178..2227
                                                                                                                                                          api/dispatcher.pb.go on lines 4071..4120
                                                                                                                                                          api/dispatcher.pb.go on lines 4339..4388
                                                                                                                                                          api/logbroker.pb.go on lines 3399..3448
                                                                                                                                                          api/logbroker.pb.go on lines 3759..3808
                                                                                                                                                          api/raft.pb.go on lines 3501..3550
                                                                                                                                                          api/raft.pb.go on lines 3637..3686
                                                                                                                                                          api/raft.pb.go on lines 3773..3822
                                                                                                                                                          api/resource.pb.go on lines 1094..1143
                                                                                                                                                          api/specs.pb.go on lines 5625..5674

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

                                                                                                                                                          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

                                                                                                                                                                  case 11:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field ResourceReferences", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 5 other locations - About 3 hrs to fix
                                                                                                                                                          api/logbroker.pb.go on lines 3138..3171
                                                                                                                                                          api/logbroker.pb.go on lines 3344..3377
                                                                                                                                                          api/logbroker.pb.go on lines 3684..3717
                                                                                                                                                          api/raft.pb.go on lines 4022..4055
                                                                                                                                                          api/specs.pb.go on lines 6710..6743

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

                                                                                                                                                          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

                                                                                                                                                                  case 8:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 5 other locations - About 3 hrs to fix
                                                                                                                                                          api/logbroker.pb.go on lines 3138..3171
                                                                                                                                                          api/logbroker.pb.go on lines 3344..3377
                                                                                                                                                          api/logbroker.pb.go on lines 3684..3717
                                                                                                                                                          api/raft.pb.go on lines 4022..4055
                                                                                                                                                          api/specs.pb.go on lines 6006..6039

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

                                                                                                                                                          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 o.Mode != nil {
                                                                                                                                                                  switch o.Mode.(type) {
                                                                                                                                                                  case *ServiceSpec_Replicated:
                                                                                                                                                                      v := ServiceSpec_Replicated{
                                                                                                                                                                          Replicated: &ReplicatedService{},
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 1 other location - About 3 hrs to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 1256..1283

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

                                                                                                                                                                  case 3:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Replicated", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 33 other locations - About 2 hrs to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4666..4700
                                                                                                                                                          api/dispatcher.pb.go on lines 4701..4735
                                                                                                                                                          api/dispatcher.pb.go on lines 4736..4770
                                                                                                                                                          api/dispatcher.pb.go on lines 4771..4805
                                                                                                                                                          api/raft.pb.go on lines 4125..4159
                                                                                                                                                          api/raft.pb.go on lines 4160..4194
                                                                                                                                                          api/raft.pb.go on lines 4195..4229
                                                                                                                                                          api/raft.pb.go on lines 4230..4264
                                                                                                                                                          api/raft.pb.go on lines 4265..4299
                                                                                                                                                          api/raft.pb.go on lines 4300..4334
                                                                                                                                                          api/raft.pb.go on lines 4335..4369
                                                                                                                                                          api/raft.pb.go on lines 4370..4404
                                                                                                                                                          api/raft.pb.go on lines 4405..4439
                                                                                                                                                          api/raft.pb.go on lines 4440..4474
                                                                                                                                                          api/specs.pb.go on lines 5150..5184
                                                                                                                                                          api/specs.pb.go on lines 5327..5361
                                                                                                                                                          api/specs.pb.go on lines 5362..5396
                                                                                                                                                          api/specs.pb.go on lines 5704..5738
                                                                                                                                                          api/specs.pb.go on lines 5917..5951
                                                                                                                                                          api/specs.pb.go on lines 5971..6005
                                                                                                                                                          api/watch.pb.go on lines 3107..3141
                                                                                                                                                          api/watch.pb.go on lines 3142..3176
                                                                                                                                                          api/watch.pb.go on lines 3177..3211
                                                                                                                                                          api/watch.pb.go on lines 3212..3246
                                                                                                                                                          api/watch.pb.go on lines 3247..3281
                                                                                                                                                          api/watch.pb.go on lines 3282..3316
                                                                                                                                                          api/watch.pb.go on lines 3317..3351
                                                                                                                                                          api/watch.pb.go on lines 3352..3386
                                                                                                                                                          api/watch.pb.go on lines 3387..3421
                                                                                                                                                          api/watch.pb.go on lines 3422..3456
                                                                                                                                                          api/watch.pb.go on lines 3882..3916
                                                                                                                                                          api/watch.pb.go on lines 3917..3951
                                                                                                                                                          api/watch.pb.go on lines 4016..4050

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

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

                                                                                                                                                                  case 10:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Generic", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 33 other locations - About 2 hrs to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4666..4700
                                                                                                                                                          api/dispatcher.pb.go on lines 4701..4735
                                                                                                                                                          api/dispatcher.pb.go on lines 4736..4770
                                                                                                                                                          api/dispatcher.pb.go on lines 4771..4805
                                                                                                                                                          api/raft.pb.go on lines 4125..4159
                                                                                                                                                          api/raft.pb.go on lines 4160..4194
                                                                                                                                                          api/raft.pb.go on lines 4195..4229
                                                                                                                                                          api/raft.pb.go on lines 4230..4264
                                                                                                                                                          api/raft.pb.go on lines 4265..4299
                                                                                                                                                          api/raft.pb.go on lines 4300..4334
                                                                                                                                                          api/raft.pb.go on lines 4335..4369
                                                                                                                                                          api/raft.pb.go on lines 4370..4404
                                                                                                                                                          api/raft.pb.go on lines 4405..4439
                                                                                                                                                          api/raft.pb.go on lines 4440..4474
                                                                                                                                                          api/specs.pb.go on lines 5115..5149
                                                                                                                                                          api/specs.pb.go on lines 5150..5184
                                                                                                                                                          api/specs.pb.go on lines 5327..5361
                                                                                                                                                          api/specs.pb.go on lines 5362..5396
                                                                                                                                                          api/specs.pb.go on lines 5704..5738
                                                                                                                                                          api/specs.pb.go on lines 5917..5951
                                                                                                                                                          api/watch.pb.go on lines 3107..3141
                                                                                                                                                          api/watch.pb.go on lines 3142..3176
                                                                                                                                                          api/watch.pb.go on lines 3177..3211
                                                                                                                                                          api/watch.pb.go on lines 3212..3246
                                                                                                                                                          api/watch.pb.go on lines 3247..3281
                                                                                                                                                          api/watch.pb.go on lines 3282..3316
                                                                                                                                                          api/watch.pb.go on lines 3317..3351
                                                                                                                                                          api/watch.pb.go on lines 3352..3386
                                                                                                                                                          api/watch.pb.go on lines 3387..3421
                                                                                                                                                          api/watch.pb.go on lines 3422..3456
                                                                                                                                                          api/watch.pb.go on lines 3882..3916
                                                                                                                                                          api/watch.pb.go on lines 3917..3951
                                                                                                                                                          api/watch.pb.go on lines 4016..4050

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

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

                                                                                                                                                                  case 8:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Attachment", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 33 other locations - About 2 hrs to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4666..4700
                                                                                                                                                          api/dispatcher.pb.go on lines 4701..4735
                                                                                                                                                          api/dispatcher.pb.go on lines 4736..4770
                                                                                                                                                          api/dispatcher.pb.go on lines 4771..4805
                                                                                                                                                          api/raft.pb.go on lines 4125..4159
                                                                                                                                                          api/raft.pb.go on lines 4160..4194
                                                                                                                                                          api/raft.pb.go on lines 4195..4229
                                                                                                                                                          api/raft.pb.go on lines 4230..4264
                                                                                                                                                          api/raft.pb.go on lines 4265..4299
                                                                                                                                                          api/raft.pb.go on lines 4300..4334
                                                                                                                                                          api/raft.pb.go on lines 4335..4369
                                                                                                                                                          api/raft.pb.go on lines 4370..4404
                                                                                                                                                          api/raft.pb.go on lines 4405..4439
                                                                                                                                                          api/raft.pb.go on lines 4440..4474
                                                                                                                                                          api/specs.pb.go on lines 5115..5149
                                                                                                                                                          api/specs.pb.go on lines 5150..5184
                                                                                                                                                          api/specs.pb.go on lines 5327..5361
                                                                                                                                                          api/specs.pb.go on lines 5362..5396
                                                                                                                                                          api/specs.pb.go on lines 5704..5738
                                                                                                                                                          api/specs.pb.go on lines 5971..6005
                                                                                                                                                          api/watch.pb.go on lines 3107..3141
                                                                                                                                                          api/watch.pb.go on lines 3142..3176
                                                                                                                                                          api/watch.pb.go on lines 3177..3211
                                                                                                                                                          api/watch.pb.go on lines 3212..3246
                                                                                                                                                          api/watch.pb.go on lines 3247..3281
                                                                                                                                                          api/watch.pb.go on lines 3282..3316
                                                                                                                                                          api/watch.pb.go on lines 3317..3351
                                                                                                                                                          api/watch.pb.go on lines 3352..3386
                                                                                                                                                          api/watch.pb.go on lines 3387..3421
                                                                                                                                                          api/watch.pb.go on lines 3422..3456
                                                                                                                                                          api/watch.pb.go on lines 3882..3916
                                                                                                                                                          api/watch.pb.go on lines 3917..3951
                                                                                                                                                          api/watch.pb.go on lines 4016..4050

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

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

                                                                                                                                                                  case 4:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Global", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 33 other locations - About 2 hrs to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4666..4700
                                                                                                                                                          api/dispatcher.pb.go on lines 4701..4735
                                                                                                                                                          api/dispatcher.pb.go on lines 4736..4770
                                                                                                                                                          api/dispatcher.pb.go on lines 4771..4805
                                                                                                                                                          api/raft.pb.go on lines 4125..4159
                                                                                                                                                          api/raft.pb.go on lines 4160..4194
                                                                                                                                                          api/raft.pb.go on lines 4195..4229
                                                                                                                                                          api/raft.pb.go on lines 4230..4264
                                                                                                                                                          api/raft.pb.go on lines 4265..4299
                                                                                                                                                          api/raft.pb.go on lines 4300..4334
                                                                                                                                                          api/raft.pb.go on lines 4335..4369
                                                                                                                                                          api/raft.pb.go on lines 4370..4404
                                                                                                                                                          api/raft.pb.go on lines 4405..4439
                                                                                                                                                          api/raft.pb.go on lines 4440..4474
                                                                                                                                                          api/specs.pb.go on lines 5115..5149
                                                                                                                                                          api/specs.pb.go on lines 5327..5361
                                                                                                                                                          api/specs.pb.go on lines 5362..5396
                                                                                                                                                          api/specs.pb.go on lines 5704..5738
                                                                                                                                                          api/specs.pb.go on lines 5917..5951
                                                                                                                                                          api/specs.pb.go on lines 5971..6005
                                                                                                                                                          api/watch.pb.go on lines 3107..3141
                                                                                                                                                          api/watch.pb.go on lines 3142..3176
                                                                                                                                                          api/watch.pb.go on lines 3177..3211
                                                                                                                                                          api/watch.pb.go on lines 3212..3246
                                                                                                                                                          api/watch.pb.go on lines 3247..3281
                                                                                                                                                          api/watch.pb.go on lines 3282..3316
                                                                                                                                                          api/watch.pb.go on lines 3317..3351
                                                                                                                                                          api/watch.pb.go on lines 3352..3386
                                                                                                                                                          api/watch.pb.go on lines 3387..3421
                                                                                                                                                          api/watch.pb.go on lines 3422..3456
                                                                                                                                                          api/watch.pb.go on lines 3882..3916
                                                                                                                                                          api/watch.pb.go on lines 3917..3951
                                                                                                                                                          api/watch.pb.go on lines 4016..4050

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

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

                                                                                                                                                                  case 11:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field GlobalJob", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 33 other locations - About 2 hrs to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4666..4700
                                                                                                                                                          api/dispatcher.pb.go on lines 4701..4735
                                                                                                                                                          api/dispatcher.pb.go on lines 4736..4770
                                                                                                                                                          api/dispatcher.pb.go on lines 4771..4805
                                                                                                                                                          api/raft.pb.go on lines 4125..4159
                                                                                                                                                          api/raft.pb.go on lines 4160..4194
                                                                                                                                                          api/raft.pb.go on lines 4195..4229
                                                                                                                                                          api/raft.pb.go on lines 4230..4264
                                                                                                                                                          api/raft.pb.go on lines 4265..4299
                                                                                                                                                          api/raft.pb.go on lines 4300..4334
                                                                                                                                                          api/raft.pb.go on lines 4335..4369
                                                                                                                                                          api/raft.pb.go on lines 4370..4404
                                                                                                                                                          api/raft.pb.go on lines 4405..4439
                                                                                                                                                          api/raft.pb.go on lines 4440..4474
                                                                                                                                                          api/specs.pb.go on lines 5115..5149
                                                                                                                                                          api/specs.pb.go on lines 5150..5184
                                                                                                                                                          api/specs.pb.go on lines 5327..5361
                                                                                                                                                          api/specs.pb.go on lines 5704..5738
                                                                                                                                                          api/specs.pb.go on lines 5917..5951
                                                                                                                                                          api/specs.pb.go on lines 5971..6005
                                                                                                                                                          api/watch.pb.go on lines 3107..3141
                                                                                                                                                          api/watch.pb.go on lines 3142..3176
                                                                                                                                                          api/watch.pb.go on lines 3177..3211
                                                                                                                                                          api/watch.pb.go on lines 3212..3246
                                                                                                                                                          api/watch.pb.go on lines 3247..3281
                                                                                                                                                          api/watch.pb.go on lines 3282..3316
                                                                                                                                                          api/watch.pb.go on lines 3317..3351
                                                                                                                                                          api/watch.pb.go on lines 3352..3386
                                                                                                                                                          api/watch.pb.go on lines 3387..3421
                                                                                                                                                          api/watch.pb.go on lines 3422..3456
                                                                                                                                                          api/watch.pb.go on lines 3882..3916
                                                                                                                                                          api/watch.pb.go on lines 3917..3951
                                                                                                                                                          api/watch.pb.go on lines 4016..4050

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

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

                                                                                                                                                                  case 1:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 33 other locations - About 2 hrs to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4666..4700
                                                                                                                                                          api/dispatcher.pb.go on lines 4701..4735
                                                                                                                                                          api/dispatcher.pb.go on lines 4736..4770
                                                                                                                                                          api/dispatcher.pb.go on lines 4771..4805
                                                                                                                                                          api/raft.pb.go on lines 4125..4159
                                                                                                                                                          api/raft.pb.go on lines 4160..4194
                                                                                                                                                          api/raft.pb.go on lines 4195..4229
                                                                                                                                                          api/raft.pb.go on lines 4230..4264
                                                                                                                                                          api/raft.pb.go on lines 4265..4299
                                                                                                                                                          api/raft.pb.go on lines 4300..4334
                                                                                                                                                          api/raft.pb.go on lines 4335..4369
                                                                                                                                                          api/raft.pb.go on lines 4370..4404
                                                                                                                                                          api/raft.pb.go on lines 4405..4439
                                                                                                                                                          api/raft.pb.go on lines 4440..4474
                                                                                                                                                          api/specs.pb.go on lines 5115..5149
                                                                                                                                                          api/specs.pb.go on lines 5150..5184
                                                                                                                                                          api/specs.pb.go on lines 5327..5361
                                                                                                                                                          api/specs.pb.go on lines 5362..5396
                                                                                                                                                          api/specs.pb.go on lines 5917..5951
                                                                                                                                                          api/specs.pb.go on lines 5971..6005
                                                                                                                                                          api/watch.pb.go on lines 3107..3141
                                                                                                                                                          api/watch.pb.go on lines 3142..3176
                                                                                                                                                          api/watch.pb.go on lines 3177..3211
                                                                                                                                                          api/watch.pb.go on lines 3212..3246
                                                                                                                                                          api/watch.pb.go on lines 3247..3281
                                                                                                                                                          api/watch.pb.go on lines 3282..3316
                                                                                                                                                          api/watch.pb.go on lines 3317..3351
                                                                                                                                                          api/watch.pb.go on lines 3352..3386
                                                                                                                                                          api/watch.pb.go on lines 3387..3421
                                                                                                                                                          api/watch.pb.go on lines 3422..3456
                                                                                                                                                          api/watch.pb.go on lines 3882..3916
                                                                                                                                                          api/watch.pb.go on lines 3917..3951
                                                                                                                                                          api/watch.pb.go on lines 4016..4050

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

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

                                                                                                                                                                  case 10:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field ReplicatedJob", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 33 other locations - About 2 hrs to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4666..4700
                                                                                                                                                          api/dispatcher.pb.go on lines 4701..4735
                                                                                                                                                          api/dispatcher.pb.go on lines 4736..4770
                                                                                                                                                          api/dispatcher.pb.go on lines 4771..4805
                                                                                                                                                          api/raft.pb.go on lines 4125..4159
                                                                                                                                                          api/raft.pb.go on lines 4160..4194
                                                                                                                                                          api/raft.pb.go on lines 4195..4229
                                                                                                                                                          api/raft.pb.go on lines 4230..4264
                                                                                                                                                          api/raft.pb.go on lines 4265..4299
                                                                                                                                                          api/raft.pb.go on lines 4300..4334
                                                                                                                                                          api/raft.pb.go on lines 4335..4369
                                                                                                                                                          api/raft.pb.go on lines 4370..4404
                                                                                                                                                          api/raft.pb.go on lines 4405..4439
                                                                                                                                                          api/raft.pb.go on lines 4440..4474
                                                                                                                                                          api/specs.pb.go on lines 5115..5149
                                                                                                                                                          api/specs.pb.go on lines 5150..5184
                                                                                                                                                          api/specs.pb.go on lines 5362..5396
                                                                                                                                                          api/specs.pb.go on lines 5704..5738
                                                                                                                                                          api/specs.pb.go on lines 5917..5951
                                                                                                                                                          api/specs.pb.go on lines 5971..6005
                                                                                                                                                          api/watch.pb.go on lines 3107..3141
                                                                                                                                                          api/watch.pb.go on lines 3142..3176
                                                                                                                                                          api/watch.pb.go on lines 3177..3211
                                                                                                                                                          api/watch.pb.go on lines 3212..3246
                                                                                                                                                          api/watch.pb.go on lines 3247..3281
                                                                                                                                                          api/watch.pb.go on lines 3282..3316
                                                                                                                                                          api/watch.pb.go on lines 3317..3351
                                                                                                                                                          api/watch.pb.go on lines 3352..3386
                                                                                                                                                          api/watch.pb.go on lines 3387..3421
                                                                                                                                                          api/watch.pb.go on lines 3422..3456
                                                                                                                                                          api/watch.pb.go on lines 3882..3916
                                                                                                                                                          api/watch.pb.go on lines 3917..3951
                                                                                                                                                          api/watch.pb.go on lines 4016..4050

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

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

                                                                                                                                                                  case 2:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var byteLen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 6 other locations - About 2 hrs to fix
                                                                                                                                                          api/ca.pb.go on lines 1837..1870
                                                                                                                                                          api/ca.pb.go on lines 2123..2156
                                                                                                                                                          api/ca.pb.go on lines 2257..2290
                                                                                                                                                          api/dispatcher.pb.go on lines 3617..3650
                                                                                                                                                          api/logbroker.pb.go on lines 3104..3137
                                                                                                                                                          api/specs.pb.go on lines 8783..8816

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

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

                                                                                                                                                                  case 2:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var byteLen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 6 other locations - About 2 hrs to fix
                                                                                                                                                          api/ca.pb.go on lines 1837..1870
                                                                                                                                                          api/ca.pb.go on lines 2123..2156
                                                                                                                                                          api/ca.pb.go on lines 2257..2290
                                                                                                                                                          api/dispatcher.pb.go on lines 3617..3650
                                                                                                                                                          api/logbroker.pb.go on lines 3104..3137
                                                                                                                                                          api/specs.pb.go on lines 8594..8627

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

                                                                                                                                                          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 Task", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 Annotations", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 EncryptionConfig", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 AcceptancePolicy", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 Dispatcher", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 6:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field CAConfig", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 Annotations", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 Annotations", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 Raft", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 Annotations", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 Orchestration", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 Annotations", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 TaskDefaults", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 Annotations", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 Annotations", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var msglen int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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

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

                                                                                                                                                                  case 8:
                                                                                                                                                                      if wireType != 2 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var stringLen uint64
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 10 other locations - About 2 hrs to fix
                                                                                                                                                          api/watch.pb.go on lines 3754..3785
                                                                                                                                                          api/watch.pb.go on lines 3786..3817
                                                                                                                                                          api/watch.pb.go on lines 3818..3849
                                                                                                                                                          api/watch.pb.go on lines 3850..3881
                                                                                                                                                          api/watch.pb.go on lines 3952..3983
                                                                                                                                                          api/watch.pb.go on lines 3984..4015
                                                                                                                                                          api/watch.pb.go on lines 4111..4142
                                                                                                                                                          api/watch.pb.go on lines 4143..4174
                                                                                                                                                          api/watch.pb.go on lines 4175..4206
                                                                                                                                                          api/watch.pb.go on lines 4207..4238

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

                                                                                                                                                          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 *ContainerSpec_DNSConfig) CopyFrom(src interface{}) {
                                                                                                                                                          
                                                                                                                                                              o := src.(*ContainerSpec_DNSConfig)
                                                                                                                                                              *m = *o
                                                                                                                                                              if o.Nameservers != nil {
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 1 other location - About 2 hrs to fix
                                                                                                                                                          api/logbroker.pb.go on lines 702..721

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

                                                                                                                                                          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

                                                                                                                                                          func (m *ResourceReference) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                              i := len(dAtA)
                                                                                                                                                              _ = i
                                                                                                                                                              var l int
                                                                                                                                                              _ = l
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 2 other locations - About 2 hrs to fix
                                                                                                                                                          api/ca.pb.go on lines 940..958
                                                                                                                                                          api/watch.pb.go on lines 1591..1609

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

                                                                                                                                                          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.Labels) > 0 {
                                                                                                                                                                  for k := range m.Labels {
                                                                                                                                                                      v := m.Labels[k]
                                                                                                                                                                      baseI := i
                                                                                                                                                                      i -= len(v)
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 1 other location - About 1 hr to fix
                                                                                                                                                          api/objects.pb.go on lines 2013..2031

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

                                                                                                                                                          func (m *NetworkAttachmentSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                              i := len(dAtA)
                                                                                                                                                              _ = i
                                                                                                                                                              var l int
                                                                                                                                                              _ = l
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 10 other locations - About 1 hr to fix
                                                                                                                                                          api/ca.pb.go on lines 816..829
                                                                                                                                                          api/ca.pb.go on lines 998..1011
                                                                                                                                                          api/dispatcher.pb.go on lines 1860..1873
                                                                                                                                                          api/dispatcher.pb.go on lines 2137..2150
                                                                                                                                                          api/dispatcher.pb.go on lines 2204..2217
                                                                                                                                                          api/health.pb.go on lines 317..330
                                                                                                                                                          api/raft.pb.go on lines 1489..1502
                                                                                                                                                          api/raft.pb.go on lines 1770..1783
                                                                                                                                                          api/resource.pb.go on lines 484..497
                                                                                                                                                          api/resource.pb.go on lines 514..527

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

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

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

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

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

                                                                                                                                                          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

                                                                                                                                                          func (this *EndpointSpec) String() string {
                                                                                                                                                              if this == nil {
                                                                                                                                                                  return "nil"
                                                                                                                                                              }
                                                                                                                                                              repeatedStringForPorts := "[]*PortConfig{"
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 2 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 3140..3155
                                                                                                                                                          api/dispatcher.pb.go on lines 3176..3191

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

                                                                                                                                                          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 (m *EndpointSpec) CopyFrom(src interface{}) {
                                                                                                                                                          
                                                                                                                                                              o := src.(*EndpointSpec)
                                                                                                                                                              *m = *o
                                                                                                                                                              if o.Ports != nil {
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 5 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 1099..1111
                                                                                                                                                          api/dispatcher.pb.go on lines 1151..1163
                                                                                                                                                          api/dispatcher.pb.go on lines 1214..1226
                                                                                                                                                          api/dispatcher.pb.go on lines 1315..1327
                                                                                                                                                          api/watch.pb.go on lines 1153..1165

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

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

                                                                                                                                                          func (m *ServiceSpec_Replicated) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                              i := len(dAtA)
                                                                                                                                                              if m.Replicated != nil {
                                                                                                                                                                  {
                                                                                                                                                                      size, err := m.Replicated.MarshalToSizedBuffer(dAtA[:i])
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 33 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 2256..2271
                                                                                                                                                          api/dispatcher.pb.go on lines 2277..2292
                                                                                                                                                          api/dispatcher.pb.go on lines 2298..2313
                                                                                                                                                          api/dispatcher.pb.go on lines 2319..2334
                                                                                                                                                          api/raft.pb.go on lines 1869..1884
                                                                                                                                                          api/raft.pb.go on lines 1890..1905
                                                                                                                                                          api/raft.pb.go on lines 1911..1926
                                                                                                                                                          api/raft.pb.go on lines 1932..1947
                                                                                                                                                          api/raft.pb.go on lines 1953..1968
                                                                                                                                                          api/raft.pb.go on lines 1974..1989
                                                                                                                                                          api/raft.pb.go on lines 1995..2010
                                                                                                                                                          api/raft.pb.go on lines 2016..2031
                                                                                                                                                          api/raft.pb.go on lines 2037..2052
                                                                                                                                                          api/raft.pb.go on lines 2058..2073
                                                                                                                                                          api/specs.pb.go on lines 2371..2386
                                                                                                                                                          api/specs.pb.go on lines 2392..2407
                                                                                                                                                          api/specs.pb.go on lines 2413..2428
                                                                                                                                                          api/specs.pb.go on lines 2654..2669
                                                                                                                                                          api/specs.pb.go on lines 2675..2690
                                                                                                                                                          api/specs.pb.go on lines 2696..2711
                                                                                                                                                          api/watch.pb.go on lines 1371..1386
                                                                                                                                                          api/watch.pb.go on lines 1392..1407
                                                                                                                                                          api/watch.pb.go on lines 1413..1428
                                                                                                                                                          api/watch.pb.go on lines 1434..1449
                                                                                                                                                          api/watch.pb.go on lines 1455..1470
                                                                                                                                                          api/watch.pb.go on lines 1476..1491
                                                                                                                                                          api/watch.pb.go on lines 1497..1512
                                                                                                                                                          api/watch.pb.go on lines 1518..1533
                                                                                                                                                          api/watch.pb.go on lines 1539..1554
                                                                                                                                                          api/watch.pb.go on lines 1560..1575
                                                                                                                                                          api/watch.pb.go on lines 1748..1763
                                                                                                                                                          api/watch.pb.go on lines 1769..1784
                                                                                                                                                          api/watch.pb.go on lines 1818..1833

                                                                                                                                                          Duplicated Code

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

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

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

                                                                                                                                                          Tuning

                                                                                                                                                          This issue has a mass of 142.

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

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

                                                                                                                                                          Duplicated Code

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

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

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

                                                                                                                                                          Tuning

                                                                                                                                                          This issue has a mass of 142.

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

                                                                                                                                                          func (m *ServiceSpec_GlobalJob) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                              i := len(dAtA)
                                                                                                                                                              if m.GlobalJob != nil {
                                                                                                                                                                  {
                                                                                                                                                                      size, err := m.GlobalJob.MarshalToSizedBuffer(dAtA[:i])
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 33 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 2256..2271
                                                                                                                                                          api/dispatcher.pb.go on lines 2277..2292
                                                                                                                                                          api/dispatcher.pb.go on lines 2298..2313
                                                                                                                                                          api/dispatcher.pb.go on lines 2319..2334
                                                                                                                                                          api/raft.pb.go on lines 1869..1884
                                                                                                                                                          api/raft.pb.go on lines 1890..1905
                                                                                                                                                          api/raft.pb.go on lines 1911..1926
                                                                                                                                                          api/raft.pb.go on lines 1932..1947
                                                                                                                                                          api/raft.pb.go on lines 1953..1968
                                                                                                                                                          api/raft.pb.go on lines 1974..1989
                                                                                                                                                          api/raft.pb.go on lines 1995..2010
                                                                                                                                                          api/raft.pb.go on lines 2016..2031
                                                                                                                                                          api/raft.pb.go on lines 2037..2052
                                                                                                                                                          api/raft.pb.go on lines 2058..2073
                                                                                                                                                          api/specs.pb.go on lines 2350..2365
                                                                                                                                                          api/specs.pb.go on lines 2371..2386
                                                                                                                                                          api/specs.pb.go on lines 2392..2407
                                                                                                                                                          api/specs.pb.go on lines 2654..2669
                                                                                                                                                          api/specs.pb.go on lines 2675..2690
                                                                                                                                                          api/specs.pb.go on lines 2696..2711
                                                                                                                                                          api/watch.pb.go on lines 1371..1386
                                                                                                                                                          api/watch.pb.go on lines 1392..1407
                                                                                                                                                          api/watch.pb.go on lines 1413..1428
                                                                                                                                                          api/watch.pb.go on lines 1434..1449
                                                                                                                                                          api/watch.pb.go on lines 1455..1470
                                                                                                                                                          api/watch.pb.go on lines 1476..1491
                                                                                                                                                          api/watch.pb.go on lines 1497..1512
                                                                                                                                                          api/watch.pb.go on lines 1518..1533
                                                                                                                                                          api/watch.pb.go on lines 1539..1554
                                                                                                                                                          api/watch.pb.go on lines 1560..1575
                                                                                                                                                          api/watch.pb.go on lines 1748..1763
                                                                                                                                                          api/watch.pb.go on lines 1769..1784
                                                                                                                                                          api/watch.pb.go on lines 1818..1833

                                                                                                                                                          Duplicated Code

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

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

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

                                                                                                                                                          Tuning

                                                                                                                                                          This issue has a mass of 142.

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

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

                                                                                                                                                          Duplicated Code

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

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

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

                                                                                                                                                          Tuning

                                                                                                                                                          This issue has a mass of 142.

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

                                                                                                                                                                  case 4:
                                                                                                                                                                      if wireType != 0 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Internal", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var v int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 16 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4298..4317
                                                                                                                                                          api/logbroker.pb.go on lines 2485..2504
                                                                                                                                                          api/logbroker.pb.go on lines 3582..3601
                                                                                                                                                          api/logbroker.pb.go on lines 3718..3737
                                                                                                                                                          api/objects.pb.go on lines 7083..7102
                                                                                                                                                          api/objects.pb.go on lines 8571..8590
                                                                                                                                                          api/objects.pb.go on lines 8988..9007
                                                                                                                                                          api/objects.pb.go on lines 9226..9245
                                                                                                                                                          api/objects.pb.go on lines 10008..10027
                                                                                                                                                          api/specs.pb.go on lines 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 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 Ingress", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var v int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 16 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4298..4317
                                                                                                                                                          api/logbroker.pb.go on lines 2485..2504
                                                                                                                                                          api/logbroker.pb.go on lines 3582..3601
                                                                                                                                                          api/logbroker.pb.go on lines 3718..3737
                                                                                                                                                          api/objects.pb.go on lines 7083..7102
                                                                                                                                                          api/objects.pb.go on lines 8571..8590
                                                                                                                                                          api/objects.pb.go on lines 8988..9007
                                                                                                                                                          api/objects.pb.go on lines 9226..9245
                                                                                                                                                          api/objects.pb.go on lines 10008..10027
                                                                                                                                                          api/specs.pb.go on lines 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/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 13:
                                                                                                                                                                      if wireType != 0 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var v int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 16 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4298..4317
                                                                                                                                                          api/logbroker.pb.go on lines 2485..2504
                                                                                                                                                          api/logbroker.pb.go on lines 3582..3601
                                                                                                                                                          api/logbroker.pb.go on lines 3718..3737
                                                                                                                                                          api/objects.pb.go on lines 7083..7102
                                                                                                                                                          api/objects.pb.go on lines 8571..8590
                                                                                                                                                          api/objects.pb.go on lines 8988..9007
                                                                                                                                                          api/objects.pb.go on lines 9226..9245
                                                                                                                                                          api/objects.pb.go on lines 10008..10027
                                                                                                                                                          api/specs.pb.go on lines 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 34 locations. Consider refactoring.
                                                                                                                                                          Open

                                                                                                                                                          func (m *ServiceSpec_ReplicatedJob) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                              i := len(dAtA)
                                                                                                                                                              if m.ReplicatedJob != nil {
                                                                                                                                                                  {
                                                                                                                                                                      size, err := m.ReplicatedJob.MarshalToSizedBuffer(dAtA[:i])
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 33 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 2256..2271
                                                                                                                                                          api/dispatcher.pb.go on lines 2277..2292
                                                                                                                                                          api/dispatcher.pb.go on lines 2298..2313
                                                                                                                                                          api/dispatcher.pb.go on lines 2319..2334
                                                                                                                                                          api/raft.pb.go on lines 1869..1884
                                                                                                                                                          api/raft.pb.go on lines 1890..1905
                                                                                                                                                          api/raft.pb.go on lines 1911..1926
                                                                                                                                                          api/raft.pb.go on lines 1932..1947
                                                                                                                                                          api/raft.pb.go on lines 1953..1968
                                                                                                                                                          api/raft.pb.go on lines 1974..1989
                                                                                                                                                          api/raft.pb.go on lines 1995..2010
                                                                                                                                                          api/raft.pb.go on lines 2016..2031
                                                                                                                                                          api/raft.pb.go on lines 2037..2052
                                                                                                                                                          api/raft.pb.go on lines 2058..2073
                                                                                                                                                          api/specs.pb.go on lines 2350..2365
                                                                                                                                                          api/specs.pb.go on lines 2371..2386
                                                                                                                                                          api/specs.pb.go on lines 2413..2428
                                                                                                                                                          api/specs.pb.go on lines 2654..2669
                                                                                                                                                          api/specs.pb.go on lines 2675..2690
                                                                                                                                                          api/specs.pb.go on lines 2696..2711
                                                                                                                                                          api/watch.pb.go on lines 1371..1386
                                                                                                                                                          api/watch.pb.go on lines 1392..1407
                                                                                                                                                          api/watch.pb.go on lines 1413..1428
                                                                                                                                                          api/watch.pb.go on lines 1434..1449
                                                                                                                                                          api/watch.pb.go on lines 1455..1470
                                                                                                                                                          api/watch.pb.go on lines 1476..1491
                                                                                                                                                          api/watch.pb.go on lines 1497..1512
                                                                                                                                                          api/watch.pb.go on lines 1518..1533
                                                                                                                                                          api/watch.pb.go on lines 1539..1554
                                                                                                                                                          api/watch.pb.go on lines 1560..1575
                                                                                                                                                          api/watch.pb.go on lines 1748..1763
                                                                                                                                                          api/watch.pb.go on lines 1769..1784
                                                                                                                                                          api/watch.pb.go on lines 1818..1833

                                                                                                                                                          Duplicated Code

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

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

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

                                                                                                                                                          Tuning

                                                                                                                                                          This issue has a mass of 142.

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

                                                                                                                                                                  case 3:
                                                                                                                                                                      if wireType != 0 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Ipv6Enabled", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var v int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 16 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4298..4317
                                                                                                                                                          api/logbroker.pb.go on lines 2485..2504
                                                                                                                                                          api/logbroker.pb.go on lines 3582..3601
                                                                                                                                                          api/logbroker.pb.go on lines 3718..3737
                                                                                                                                                          api/objects.pb.go on lines 7083..7102
                                                                                                                                                          api/objects.pb.go on lines 8571..8590
                                                                                                                                                          api/objects.pb.go on lines 8988..9007
                                                                                                                                                          api/objects.pb.go on lines 9226..9245
                                                                                                                                                          api/objects.pb.go on lines 10008..10027
                                                                                                                                                          api/specs.pb.go on lines 6882..6901
                                                                                                                                                          api/specs.pb.go on lines 7038..7057
                                                                                                                                                          api/specs.pb.go on lines 7058..7077
                                                                                                                                                          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 19:
                                                                                                                                                                      if wireType != 0 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var v int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 16 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4298..4317
                                                                                                                                                          api/logbroker.pb.go on lines 2485..2504
                                                                                                                                                          api/logbroker.pb.go on lines 3582..3601
                                                                                                                                                          api/logbroker.pb.go on lines 3718..3737
                                                                                                                                                          api/objects.pb.go on lines 7083..7102
                                                                                                                                                          api/objects.pb.go on lines 8571..8590
                                                                                                                                                          api/objects.pb.go on lines 8988..9007
                                                                                                                                                          api/objects.pb.go on lines 9226..9245
                                                                                                                                                          api/objects.pb.go on lines 10008..10027
                                                                                                                                                          api/specs.pb.go on lines 6882..6901
                                                                                                                                                          api/specs.pb.go on lines 7038..7057
                                                                                                                                                          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 Attachable", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var v int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 16 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4298..4317
                                                                                                                                                          api/logbroker.pb.go on lines 2485..2504
                                                                                                                                                          api/logbroker.pb.go on lines 3582..3601
                                                                                                                                                          api/logbroker.pb.go on lines 3718..3737
                                                                                                                                                          api/objects.pb.go on lines 7083..7102
                                                                                                                                                          api/objects.pb.go on lines 8571..8590
                                                                                                                                                          api/objects.pb.go on lines 8988..9007
                                                                                                                                                          api/objects.pb.go on lines 9226..9245
                                                                                                                                                          api/objects.pb.go on lines 10008..10027
                                                                                                                                                          api/specs.pb.go on lines 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 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 34 locations. Consider refactoring.
                                                                                                                                                          Open

                                                                                                                                                          func (m *TaskSpec_Attachment) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                              i := len(dAtA)
                                                                                                                                                              if m.Attachment != nil {
                                                                                                                                                                  {
                                                                                                                                                                      size, err := m.Attachment.MarshalToSizedBuffer(dAtA[:i])
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 33 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 2256..2271
                                                                                                                                                          api/dispatcher.pb.go on lines 2277..2292
                                                                                                                                                          api/dispatcher.pb.go on lines 2298..2313
                                                                                                                                                          api/dispatcher.pb.go on lines 2319..2334
                                                                                                                                                          api/raft.pb.go on lines 1869..1884
                                                                                                                                                          api/raft.pb.go on lines 1890..1905
                                                                                                                                                          api/raft.pb.go on lines 1911..1926
                                                                                                                                                          api/raft.pb.go on lines 1932..1947
                                                                                                                                                          api/raft.pb.go on lines 1953..1968
                                                                                                                                                          api/raft.pb.go on lines 1974..1989
                                                                                                                                                          api/raft.pb.go on lines 1995..2010
                                                                                                                                                          api/raft.pb.go on lines 2016..2031
                                                                                                                                                          api/raft.pb.go on lines 2037..2052
                                                                                                                                                          api/raft.pb.go on lines 2058..2073
                                                                                                                                                          api/specs.pb.go on lines 2350..2365
                                                                                                                                                          api/specs.pb.go on lines 2371..2386
                                                                                                                                                          api/specs.pb.go on lines 2392..2407
                                                                                                                                                          api/specs.pb.go on lines 2413..2428
                                                                                                                                                          api/specs.pb.go on lines 2654..2669
                                                                                                                                                          api/specs.pb.go on lines 2696..2711
                                                                                                                                                          api/watch.pb.go on lines 1371..1386
                                                                                                                                                          api/watch.pb.go on lines 1392..1407
                                                                                                                                                          api/watch.pb.go on lines 1413..1428
                                                                                                                                                          api/watch.pb.go on lines 1434..1449
                                                                                                                                                          api/watch.pb.go on lines 1455..1470
                                                                                                                                                          api/watch.pb.go on lines 1476..1491
                                                                                                                                                          api/watch.pb.go on lines 1497..1512
                                                                                                                                                          api/watch.pb.go on lines 1518..1533
                                                                                                                                                          api/watch.pb.go on lines 1539..1554
                                                                                                                                                          api/watch.pb.go on lines 1560..1575
                                                                                                                                                          api/watch.pb.go on lines 1748..1763
                                                                                                                                                          api/watch.pb.go on lines 1769..1784
                                                                                                                                                          api/watch.pb.go on lines 1818..1833

                                                                                                                                                          Duplicated Code

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

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

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

                                                                                                                                                          Tuning

                                                                                                                                                          This issue has a mass of 142.

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

                                                                                                                                                                  case 18:
                                                                                                                                                                      if wireType != 0 {
                                                                                                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field OpenStdin", wireType)
                                                                                                                                                                      }
                                                                                                                                                                      var v int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 16 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 4298..4317
                                                                                                                                                          api/logbroker.pb.go on lines 2485..2504
                                                                                                                                                          api/logbroker.pb.go on lines 3582..3601
                                                                                                                                                          api/logbroker.pb.go on lines 3718..3737
                                                                                                                                                          api/objects.pb.go on lines 7083..7102
                                                                                                                                                          api/objects.pb.go on lines 8571..8590
                                                                                                                                                          api/objects.pb.go on lines 8988..9007
                                                                                                                                                          api/objects.pb.go on lines 9226..9245
                                                                                                                                                          api/objects.pb.go on lines 10008..10027
                                                                                                                                                          api/specs.pb.go on lines 6882..6901
                                                                                                                                                          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 34 locations. Consider refactoring.
                                                                                                                                                          Open

                                                                                                                                                          func (m *TaskSpec_Container) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                              i := len(dAtA)
                                                                                                                                                              if m.Container != nil {
                                                                                                                                                                  {
                                                                                                                                                                      size, err := m.Container.MarshalToSizedBuffer(dAtA[:i])
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 33 other locations - About 1 hr to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 2256..2271
                                                                                                                                                          api/dispatcher.pb.go on lines 2277..2292
                                                                                                                                                          api/dispatcher.pb.go on lines 2298..2313
                                                                                                                                                          api/dispatcher.pb.go on lines 2319..2334
                                                                                                                                                          api/raft.pb.go on lines 1869..1884
                                                                                                                                                          api/raft.pb.go on lines 1890..1905
                                                                                                                                                          api/raft.pb.go on lines 1911..1926
                                                                                                                                                          api/raft.pb.go on lines 1932..1947
                                                                                                                                                          api/raft.pb.go on lines 1953..1968
                                                                                                                                                          api/raft.pb.go on lines 1974..1989
                                                                                                                                                          api/raft.pb.go on lines 1995..2010
                                                                                                                                                          api/raft.pb.go on lines 2016..2031
                                                                                                                                                          api/raft.pb.go on lines 2037..2052
                                                                                                                                                          api/raft.pb.go on lines 2058..2073
                                                                                                                                                          api/specs.pb.go on lines 2350..2365
                                                                                                                                                          api/specs.pb.go on lines 2371..2386
                                                                                                                                                          api/specs.pb.go on lines 2392..2407
                                                                                                                                                          api/specs.pb.go on lines 2413..2428
                                                                                                                                                          api/specs.pb.go on lines 2675..2690
                                                                                                                                                          api/specs.pb.go on lines 2696..2711
                                                                                                                                                          api/watch.pb.go on lines 1371..1386
                                                                                                                                                          api/watch.pb.go on lines 1392..1407
                                                                                                                                                          api/watch.pb.go on lines 1413..1428
                                                                                                                                                          api/watch.pb.go on lines 1434..1449
                                                                                                                                                          api/watch.pb.go on lines 1455..1470
                                                                                                                                                          api/watch.pb.go on lines 1476..1491
                                                                                                                                                          api/watch.pb.go on lines 1497..1512
                                                                                                                                                          api/watch.pb.go on lines 1518..1533
                                                                                                                                                          api/watch.pb.go on lines 1539..1554
                                                                                                                                                          api/watch.pb.go on lines 1560..1575
                                                                                                                                                          api/watch.pb.go on lines 1748..1763
                                                                                                                                                          api/watch.pb.go on lines 1769..1784
                                                                                                                                                          api/watch.pb.go on lines 1818..1833

                                                                                                                                                          Duplicated Code

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

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

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

                                                                                                                                                          Tuning

                                                                                                                                                          This issue has a mass of 142.

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

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

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

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

                                                                                                                                                          Refactorings

                                                                                                                                                          Further Reading

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

                                                                                                                                                              if len(m.Hosts) > 0 {
                                                                                                                                                                  for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- {
                                                                                                                                                                      i -= len(m.Hosts[iNdEx])
                                                                                                                                                                      copy(dAtA[i:], m.Hosts[iNdEx])
                                                                                                                                                                      i = encodeVarintSpecs(dAtA, i, uint64(len(m.Hosts[iNdEx])))
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 2 other locations - About 1 hr to fix
                                                                                                                                                          api/specs.pb.go on lines 2855..2865
                                                                                                                                                          api/specs.pb.go on lines 2866..2876

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

                                                                                                                                                          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.CapabilityAdd) > 0 {
                                                                                                                                                                  for iNdEx := len(m.CapabilityAdd) - 1; iNdEx >= 0; iNdEx-- {
                                                                                                                                                                      i -= len(m.CapabilityAdd[iNdEx])
                                                                                                                                                                      copy(dAtA[i:], m.CapabilityAdd[iNdEx])
                                                                                                                                                                      i = encodeVarintSpecs(dAtA, i, uint64(len(m.CapabilityAdd[iNdEx])))
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 2 other locations - About 1 hr to fix
                                                                                                                                                          api/specs.pb.go on lines 2855..2865
                                                                                                                                                          api/specs.pb.go on lines 2989..2999

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

                                                                                                                                                          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.CapabilityDrop) > 0 {
                                                                                                                                                                  for iNdEx := len(m.CapabilityDrop) - 1; iNdEx >= 0; iNdEx-- {
                                                                                                                                                                      i -= len(m.CapabilityDrop[iNdEx])
                                                                                                                                                                      copy(dAtA[i:], m.CapabilityDrop[iNdEx])
                                                                                                                                                                      i = encodeVarintSpecs(dAtA, i, uint64(len(m.CapabilityDrop[iNdEx])))
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 2 other locations - About 1 hr to fix
                                                                                                                                                          api/specs.pb.go on lines 2866..2876
                                                                                                                                                          api/specs.pb.go on lines 2989..2999

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

                                                                                                                                                          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

                                                                                                                                                          func (m *ResourceReference) Size() (n int) {
                                                                                                                                                              if m == nil {
                                                                                                                                                                  return 0
                                                                                                                                                              }
                                                                                                                                                              var l int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 2 other locations - About 1 hr to fix
                                                                                                                                                          api/ca.pb.go on lines 1425..1439
                                                                                                                                                          api/watch.pb.go on lines 2404..2418

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

                                                                                                                                                          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.Ulimits) > 0 {
                                                                                                                                                                  for iNdEx := len(m.Ulimits) - 1; iNdEx >= 0; iNdEx-- {
                                                                                                                                                                      {
                                                                                                                                                                          size, err := m.Ulimits[iNdEx].MarshalToSizedBuffer(dAtA[:i])
                                                                                                                                                                          if err != nil {
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 2 other locations - About 1 hr to fix
                                                                                                                                                          api/objects.pb.go on lines 1815..1830
                                                                                                                                                          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 3 locations. Consider refactoring.
                                                                                                                                                          Open

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

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

                                                                                                                                                          func (this *ContainerSpec_Ulimit) String() string {
                                                                                                                                                              if this == nil {
                                                                                                                                                                  return "nil"
                                                                                                                                                              }
                                                                                                                                                              s := strings.Join([]string{`&ContainerSpec_Ulimit{`,
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 4 other locations - About 1 hr to fix
                                                                                                                                                          api/logbroker.pb.go on lines 2251..2262
                                                                                                                                                          api/logbroker.pb.go on lines 2263..2274
                                                                                                                                                          api/specs.pb.go on lines 4741..4752
                                                                                                                                                          api/watch.pb.go on lines 2826..2837

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

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

                                                                                                                                                          func (this *ContainerSpec_DNSConfig) String() string {
                                                                                                                                                              if this == nil {
                                                                                                                                                                  return "nil"
                                                                                                                                                              }
                                                                                                                                                              s := strings.Join([]string{`&ContainerSpec_DNSConfig{`,
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 4 other locations - About 1 hr to fix
                                                                                                                                                          api/logbroker.pb.go on lines 2251..2262
                                                                                                                                                          api/logbroker.pb.go on lines 2263..2274
                                                                                                                                                          api/specs.pb.go on lines 4753..4764
                                                                                                                                                          api/watch.pb.go on lines 2826..2837

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

                                                                                                                                                          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

                                                                                                                                                          func (m *ReplicatedService) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                              i := len(dAtA)
                                                                                                                                                              _ = i
                                                                                                                                                              var l int
                                                                                                                                                              _ = l
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 2 other locations - About 50 mins to fix
                                                                                                                                                          api/health.pb.go on lines 347..358
                                                                                                                                                          api/raft.pb.go on lines 1742..1753

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

                                                                                                                                                          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

                                                                                                                                                          func (m *NetworkSpec_Network) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                                                                                              i := len(dAtA)
                                                                                                                                                              i -= len(m.Network)
                                                                                                                                                              copy(dAtA[i:], m.Network)
                                                                                                                                                              i = encodeVarintSpecs(dAtA, i, uint64(len(m.Network)))
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 9 other locations - About 50 mins to fix
                                                                                                                                                          api/watch.pb.go on lines 1692..1700
                                                                                                                                                          api/watch.pb.go on lines 1706..1714
                                                                                                                                                          api/watch.pb.go on lines 1720..1728
                                                                                                                                                          api/watch.pb.go on lines 1734..1742
                                                                                                                                                          api/watch.pb.go on lines 1790..1798
                                                                                                                                                          api/watch.pb.go on lines 1804..1812
                                                                                                                                                          api/watch.pb.go on lines 1875..1883
                                                                                                                                                          api/watch.pb.go on lines 1889..1897
                                                                                                                                                          api/watch.pb.go on lines 1903..1911

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

                                                                                                                                                          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.Labels) > 0 {
                                                                                                                                                                  for k, v := range m.Labels {
                                                                                                                                                                      _ = k
                                                                                                                                                                      _ = v
                                                                                                                                                                      mapEntrySize := 1 + len(k) + sovSpecs(uint64(len(k))) + 1 + len(v) + sovSpecs(uint64(len(v)))
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 2 other locations - About 50 mins to fix
                                                                                                                                                          api/objects.pb.go on lines 2873..2880
                                                                                                                                                          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 3 locations. Consider refactoring.
                                                                                                                                                          Open

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

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

                                                                                                                                                          func (this *GenericRuntimeSpec) String() string {
                                                                                                                                                              if this == nil {
                                                                                                                                                                  return "nil"
                                                                                                                                                              }
                                                                                                                                                              s := strings.Join([]string{`&GenericRuntimeSpec{`,
                                                                                                                                                          Severity: Minor
                                                                                                                                                          Found in api/specs.pb.go and 1 other location - About 50 mins to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 3156..3166

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

                                                                                                                                                          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 *ContainerSpec_Ulimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_ContainerSpec_Ulimit.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *ServiceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_ServiceSpec.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *GlobalService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_GlobalService.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *TaskSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_TaskSpec.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *ResourceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_ResourceReference.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *ContainerSpec_DNSConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_ContainerSpec_DNSConfig.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *SecretSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_SecretSpec.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *GenericRuntimeSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_GenericRuntimeSpec.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *ContainerSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_ContainerSpec.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *ReplicatedJob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_ReplicatedJob.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *ConfigSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_ConfigSpec.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *EndpointSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_EndpointSpec.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *NetworkSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_NetworkSpec.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *VolumeSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_VolumeSpec.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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/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 *NodeSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_NodeSpec.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *GlobalJob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_GlobalJob.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *ClusterSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_ClusterSpec.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *ContainerSpec_PullOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_ContainerSpec_PullOptions.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *ReplicatedService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_ReplicatedService.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 *NetworkAttachmentSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                                                                                              if deterministic {
                                                                                                                                                                  return xxx_messageInfo_NetworkAttachmentSpec.Marshal(b, m, deterministic)
                                                                                                                                                              } else {
                                                                                                                                                                  b = b[:cap(b)]
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/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 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 38 locations. Consider refactoring.
                                                                                                                                                          Open

                                                                                                                                                          func (m *TaskSpec_Attachment) Size() (n int) {
                                                                                                                                                              if m == nil {
                                                                                                                                                                  return 0
                                                                                                                                                              }
                                                                                                                                                              var l int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 37 other locations - About 40 mins to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 2989..3000
                                                                                                                                                          api/dispatcher.pb.go on lines 3001..3012
                                                                                                                                                          api/dispatcher.pb.go on lines 3013..3024
                                                                                                                                                          api/dispatcher.pb.go on lines 3025..3036
                                                                                                                                                          api/raft.pb.go on lines 2485..2496
                                                                                                                                                          api/raft.pb.go on lines 2507..2518
                                                                                                                                                          api/raft.pb.go on lines 2529..2540
                                                                                                                                                          api/raft.pb.go on lines 2609..2620
                                                                                                                                                          api/raft.pb.go on lines 2621..2632
                                                                                                                                                          api/raft.pb.go on lines 2633..2644
                                                                                                                                                          api/raft.pb.go on lines 2645..2656
                                                                                                                                                          api/raft.pb.go on lines 2657..2668
                                                                                                                                                          api/raft.pb.go on lines 2669..2680
                                                                                                                                                          api/raft.pb.go on lines 2681..2692
                                                                                                                                                          api/raft.pb.go on lines 2693..2704
                                                                                                                                                          api/raft.pb.go on lines 2705..2716
                                                                                                                                                          api/raft.pb.go on lines 2717..2728
                                                                                                                                                          api/specs.pb.go on lines 3849..3860
                                                                                                                                                          api/specs.pb.go on lines 3861..3872
                                                                                                                                                          api/specs.pb.go on lines 3873..3884
                                                                                                                                                          api/specs.pb.go on lines 3885..3896
                                                                                                                                                          api/specs.pb.go on lines 3985..3996
                                                                                                                                                          api/specs.pb.go on lines 4009..4020
                                                                                                                                                          api/watch.pb.go on lines 2284..2295
                                                                                                                                                          api/watch.pb.go on lines 2296..2307
                                                                                                                                                          api/watch.pb.go on lines 2308..2319
                                                                                                                                                          api/watch.pb.go on lines 2320..2331
                                                                                                                                                          api/watch.pb.go on lines 2332..2343
                                                                                                                                                          api/watch.pb.go on lines 2344..2355
                                                                                                                                                          api/watch.pb.go on lines 2356..2367
                                                                                                                                                          api/watch.pb.go on lines 2368..2379
                                                                                                                                                          api/watch.pb.go on lines 2380..2391
                                                                                                                                                          api/watch.pb.go on lines 2392..2403
                                                                                                                                                          api/watch.pb.go on lines 2493..2504
                                                                                                                                                          api/watch.pb.go on lines 2505..2516
                                                                                                                                                          api/watch.pb.go on lines 2537..2548
                                                                                                                                                          protobuf/plugin/plugin.pb.go on lines 585..596

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

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

                                                                                                                                                          func (m *ServiceSpec_ReplicatedJob) Size() (n int) {
                                                                                                                                                              if m == nil {
                                                                                                                                                                  return 0
                                                                                                                                                              }
                                                                                                                                                              var l int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 37 other locations - About 40 mins to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 2989..3000
                                                                                                                                                          api/dispatcher.pb.go on lines 3001..3012
                                                                                                                                                          api/dispatcher.pb.go on lines 3013..3024
                                                                                                                                                          api/dispatcher.pb.go on lines 3025..3036
                                                                                                                                                          api/raft.pb.go on lines 2485..2496
                                                                                                                                                          api/raft.pb.go on lines 2507..2518
                                                                                                                                                          api/raft.pb.go on lines 2529..2540
                                                                                                                                                          api/raft.pb.go on lines 2609..2620
                                                                                                                                                          api/raft.pb.go on lines 2621..2632
                                                                                                                                                          api/raft.pb.go on lines 2633..2644
                                                                                                                                                          api/raft.pb.go on lines 2645..2656
                                                                                                                                                          api/raft.pb.go on lines 2657..2668
                                                                                                                                                          api/raft.pb.go on lines 2669..2680
                                                                                                                                                          api/raft.pb.go on lines 2681..2692
                                                                                                                                                          api/raft.pb.go on lines 2693..2704
                                                                                                                                                          api/raft.pb.go on lines 2705..2716
                                                                                                                                                          api/raft.pb.go on lines 2717..2728
                                                                                                                                                          api/specs.pb.go on lines 3849..3860
                                                                                                                                                          api/specs.pb.go on lines 3861..3872
                                                                                                                                                          api/specs.pb.go on lines 3885..3896
                                                                                                                                                          api/specs.pb.go on lines 3985..3996
                                                                                                                                                          api/specs.pb.go on lines 3997..4008
                                                                                                                                                          api/specs.pb.go on lines 4009..4020
                                                                                                                                                          api/watch.pb.go on lines 2284..2295
                                                                                                                                                          api/watch.pb.go on lines 2296..2307
                                                                                                                                                          api/watch.pb.go on lines 2308..2319
                                                                                                                                                          api/watch.pb.go on lines 2320..2331
                                                                                                                                                          api/watch.pb.go on lines 2332..2343
                                                                                                                                                          api/watch.pb.go on lines 2344..2355
                                                                                                                                                          api/watch.pb.go on lines 2356..2367
                                                                                                                                                          api/watch.pb.go on lines 2368..2379
                                                                                                                                                          api/watch.pb.go on lines 2380..2391
                                                                                                                                                          api/watch.pb.go on lines 2392..2403
                                                                                                                                                          api/watch.pb.go on lines 2493..2504
                                                                                                                                                          api/watch.pb.go on lines 2505..2516
                                                                                                                                                          api/watch.pb.go on lines 2537..2548
                                                                                                                                                          protobuf/plugin/plugin.pb.go on lines 585..596

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

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

                                                                                                                                                          func (m *ServiceSpec_Replicated) Size() (n int) {
                                                                                                                                                              if m == nil {
                                                                                                                                                                  return 0
                                                                                                                                                              }
                                                                                                                                                              var l int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 37 other locations - About 40 mins to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 2989..3000
                                                                                                                                                          api/dispatcher.pb.go on lines 3001..3012
                                                                                                                                                          api/dispatcher.pb.go on lines 3013..3024
                                                                                                                                                          api/dispatcher.pb.go on lines 3025..3036
                                                                                                                                                          api/raft.pb.go on lines 2485..2496
                                                                                                                                                          api/raft.pb.go on lines 2507..2518
                                                                                                                                                          api/raft.pb.go on lines 2529..2540
                                                                                                                                                          api/raft.pb.go on lines 2609..2620
                                                                                                                                                          api/raft.pb.go on lines 2621..2632
                                                                                                                                                          api/raft.pb.go on lines 2633..2644
                                                                                                                                                          api/raft.pb.go on lines 2645..2656
                                                                                                                                                          api/raft.pb.go on lines 2657..2668
                                                                                                                                                          api/raft.pb.go on lines 2669..2680
                                                                                                                                                          api/raft.pb.go on lines 2681..2692
                                                                                                                                                          api/raft.pb.go on lines 2693..2704
                                                                                                                                                          api/raft.pb.go on lines 2705..2716
                                                                                                                                                          api/raft.pb.go on lines 2717..2728
                                                                                                                                                          api/specs.pb.go on lines 3861..3872
                                                                                                                                                          api/specs.pb.go on lines 3873..3884
                                                                                                                                                          api/specs.pb.go on lines 3885..3896
                                                                                                                                                          api/specs.pb.go on lines 3985..3996
                                                                                                                                                          api/specs.pb.go on lines 3997..4008
                                                                                                                                                          api/specs.pb.go on lines 4009..4020
                                                                                                                                                          api/watch.pb.go on lines 2284..2295
                                                                                                                                                          api/watch.pb.go on lines 2296..2307
                                                                                                                                                          api/watch.pb.go on lines 2308..2319
                                                                                                                                                          api/watch.pb.go on lines 2320..2331
                                                                                                                                                          api/watch.pb.go on lines 2332..2343
                                                                                                                                                          api/watch.pb.go on lines 2344..2355
                                                                                                                                                          api/watch.pb.go on lines 2356..2367
                                                                                                                                                          api/watch.pb.go on lines 2368..2379
                                                                                                                                                          api/watch.pb.go on lines 2380..2391
                                                                                                                                                          api/watch.pb.go on lines 2392..2403
                                                                                                                                                          api/watch.pb.go on lines 2493..2504
                                                                                                                                                          api/watch.pb.go on lines 2505..2516
                                                                                                                                                          api/watch.pb.go on lines 2537..2548
                                                                                                                                                          protobuf/plugin/plugin.pb.go on lines 585..596

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

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

                                                                                                                                                          func (m *ServiceSpec_Global) Size() (n int) {
                                                                                                                                                              if m == nil {
                                                                                                                                                                  return 0
                                                                                                                                                              }
                                                                                                                                                              var l int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 37 other locations - About 40 mins to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 2989..3000
                                                                                                                                                          api/dispatcher.pb.go on lines 3001..3012
                                                                                                                                                          api/dispatcher.pb.go on lines 3013..3024
                                                                                                                                                          api/dispatcher.pb.go on lines 3025..3036
                                                                                                                                                          api/raft.pb.go on lines 2485..2496
                                                                                                                                                          api/raft.pb.go on lines 2507..2518
                                                                                                                                                          api/raft.pb.go on lines 2529..2540
                                                                                                                                                          api/raft.pb.go on lines 2609..2620
                                                                                                                                                          api/raft.pb.go on lines 2621..2632
                                                                                                                                                          api/raft.pb.go on lines 2633..2644
                                                                                                                                                          api/raft.pb.go on lines 2645..2656
                                                                                                                                                          api/raft.pb.go on lines 2657..2668
                                                                                                                                                          api/raft.pb.go on lines 2669..2680
                                                                                                                                                          api/raft.pb.go on lines 2681..2692
                                                                                                                                                          api/raft.pb.go on lines 2693..2704
                                                                                                                                                          api/raft.pb.go on lines 2705..2716
                                                                                                                                                          api/raft.pb.go on lines 2717..2728
                                                                                                                                                          api/specs.pb.go on lines 3849..3860
                                                                                                                                                          api/specs.pb.go on lines 3873..3884
                                                                                                                                                          api/specs.pb.go on lines 3885..3896
                                                                                                                                                          api/specs.pb.go on lines 3985..3996
                                                                                                                                                          api/specs.pb.go on lines 3997..4008
                                                                                                                                                          api/specs.pb.go on lines 4009..4020
                                                                                                                                                          api/watch.pb.go on lines 2284..2295
                                                                                                                                                          api/watch.pb.go on lines 2296..2307
                                                                                                                                                          api/watch.pb.go on lines 2308..2319
                                                                                                                                                          api/watch.pb.go on lines 2320..2331
                                                                                                                                                          api/watch.pb.go on lines 2332..2343
                                                                                                                                                          api/watch.pb.go on lines 2344..2355
                                                                                                                                                          api/watch.pb.go on lines 2356..2367
                                                                                                                                                          api/watch.pb.go on lines 2368..2379
                                                                                                                                                          api/watch.pb.go on lines 2380..2391
                                                                                                                                                          api/watch.pb.go on lines 2392..2403
                                                                                                                                                          api/watch.pb.go on lines 2493..2504
                                                                                                                                                          api/watch.pb.go on lines 2505..2516
                                                                                                                                                          api/watch.pb.go on lines 2537..2548
                                                                                                                                                          protobuf/plugin/plugin.pb.go on lines 585..596

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

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

                                                                                                                                                          func (m *TaskSpec_Container) Size() (n int) {
                                                                                                                                                              if m == nil {
                                                                                                                                                                  return 0
                                                                                                                                                              }
                                                                                                                                                              var l int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 37 other locations - About 40 mins to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 2989..3000
                                                                                                                                                          api/dispatcher.pb.go on lines 3001..3012
                                                                                                                                                          api/dispatcher.pb.go on lines 3013..3024
                                                                                                                                                          api/dispatcher.pb.go on lines 3025..3036
                                                                                                                                                          api/raft.pb.go on lines 2485..2496
                                                                                                                                                          api/raft.pb.go on lines 2507..2518
                                                                                                                                                          api/raft.pb.go on lines 2529..2540
                                                                                                                                                          api/raft.pb.go on lines 2609..2620
                                                                                                                                                          api/raft.pb.go on lines 2621..2632
                                                                                                                                                          api/raft.pb.go on lines 2633..2644
                                                                                                                                                          api/raft.pb.go on lines 2645..2656
                                                                                                                                                          api/raft.pb.go on lines 2657..2668
                                                                                                                                                          api/raft.pb.go on lines 2669..2680
                                                                                                                                                          api/raft.pb.go on lines 2681..2692
                                                                                                                                                          api/raft.pb.go on lines 2693..2704
                                                                                                                                                          api/raft.pb.go on lines 2705..2716
                                                                                                                                                          api/raft.pb.go on lines 2717..2728
                                                                                                                                                          api/specs.pb.go on lines 3849..3860
                                                                                                                                                          api/specs.pb.go on lines 3861..3872
                                                                                                                                                          api/specs.pb.go on lines 3873..3884
                                                                                                                                                          api/specs.pb.go on lines 3885..3896
                                                                                                                                                          api/specs.pb.go on lines 3997..4008
                                                                                                                                                          api/specs.pb.go on lines 4009..4020
                                                                                                                                                          api/watch.pb.go on lines 2284..2295
                                                                                                                                                          api/watch.pb.go on lines 2296..2307
                                                                                                                                                          api/watch.pb.go on lines 2308..2319
                                                                                                                                                          api/watch.pb.go on lines 2320..2331
                                                                                                                                                          api/watch.pb.go on lines 2332..2343
                                                                                                                                                          api/watch.pb.go on lines 2344..2355
                                                                                                                                                          api/watch.pb.go on lines 2356..2367
                                                                                                                                                          api/watch.pb.go on lines 2368..2379
                                                                                                                                                          api/watch.pb.go on lines 2380..2391
                                                                                                                                                          api/watch.pb.go on lines 2392..2403
                                                                                                                                                          api/watch.pb.go on lines 2493..2504
                                                                                                                                                          api/watch.pb.go on lines 2505..2516
                                                                                                                                                          api/watch.pb.go on lines 2537..2548
                                                                                                                                                          protobuf/plugin/plugin.pb.go on lines 585..596

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

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

                                                                                                                                                          func (m *TaskSpec_Generic) Size() (n int) {
                                                                                                                                                              if m == nil {
                                                                                                                                                                  return 0
                                                                                                                                                              }
                                                                                                                                                              var l int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 37 other locations - About 40 mins to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 2989..3000
                                                                                                                                                          api/dispatcher.pb.go on lines 3001..3012
                                                                                                                                                          api/dispatcher.pb.go on lines 3013..3024
                                                                                                                                                          api/dispatcher.pb.go on lines 3025..3036
                                                                                                                                                          api/raft.pb.go on lines 2485..2496
                                                                                                                                                          api/raft.pb.go on lines 2507..2518
                                                                                                                                                          api/raft.pb.go on lines 2529..2540
                                                                                                                                                          api/raft.pb.go on lines 2609..2620
                                                                                                                                                          api/raft.pb.go on lines 2621..2632
                                                                                                                                                          api/raft.pb.go on lines 2633..2644
                                                                                                                                                          api/raft.pb.go on lines 2645..2656
                                                                                                                                                          api/raft.pb.go on lines 2657..2668
                                                                                                                                                          api/raft.pb.go on lines 2669..2680
                                                                                                                                                          api/raft.pb.go on lines 2681..2692
                                                                                                                                                          api/raft.pb.go on lines 2693..2704
                                                                                                                                                          api/raft.pb.go on lines 2705..2716
                                                                                                                                                          api/raft.pb.go on lines 2717..2728
                                                                                                                                                          api/specs.pb.go on lines 3849..3860
                                                                                                                                                          api/specs.pb.go on lines 3861..3872
                                                                                                                                                          api/specs.pb.go on lines 3873..3884
                                                                                                                                                          api/specs.pb.go on lines 3885..3896
                                                                                                                                                          api/specs.pb.go on lines 3985..3996
                                                                                                                                                          api/specs.pb.go on lines 3997..4008
                                                                                                                                                          api/watch.pb.go on lines 2284..2295
                                                                                                                                                          api/watch.pb.go on lines 2296..2307
                                                                                                                                                          api/watch.pb.go on lines 2308..2319
                                                                                                                                                          api/watch.pb.go on lines 2320..2331
                                                                                                                                                          api/watch.pb.go on lines 2332..2343
                                                                                                                                                          api/watch.pb.go on lines 2344..2355
                                                                                                                                                          api/watch.pb.go on lines 2356..2367
                                                                                                                                                          api/watch.pb.go on lines 2368..2379
                                                                                                                                                          api/watch.pb.go on lines 2380..2391
                                                                                                                                                          api/watch.pb.go on lines 2392..2403
                                                                                                                                                          api/watch.pb.go on lines 2493..2504
                                                                                                                                                          api/watch.pb.go on lines 2505..2516
                                                                                                                                                          api/watch.pb.go on lines 2537..2548
                                                                                                                                                          protobuf/plugin/plugin.pb.go on lines 585..596

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

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

                                                                                                                                                          func (m *ServiceSpec_GlobalJob) Size() (n int) {
                                                                                                                                                              if m == nil {
                                                                                                                                                                  return 0
                                                                                                                                                              }
                                                                                                                                                              var l int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 37 other locations - About 40 mins to fix
                                                                                                                                                          api/dispatcher.pb.go on lines 2989..3000
                                                                                                                                                          api/dispatcher.pb.go on lines 3001..3012
                                                                                                                                                          api/dispatcher.pb.go on lines 3013..3024
                                                                                                                                                          api/dispatcher.pb.go on lines 3025..3036
                                                                                                                                                          api/raft.pb.go on lines 2485..2496
                                                                                                                                                          api/raft.pb.go on lines 2507..2518
                                                                                                                                                          api/raft.pb.go on lines 2529..2540
                                                                                                                                                          api/raft.pb.go on lines 2609..2620
                                                                                                                                                          api/raft.pb.go on lines 2621..2632
                                                                                                                                                          api/raft.pb.go on lines 2633..2644
                                                                                                                                                          api/raft.pb.go on lines 2645..2656
                                                                                                                                                          api/raft.pb.go on lines 2657..2668
                                                                                                                                                          api/raft.pb.go on lines 2669..2680
                                                                                                                                                          api/raft.pb.go on lines 2681..2692
                                                                                                                                                          api/raft.pb.go on lines 2693..2704
                                                                                                                                                          api/raft.pb.go on lines 2705..2716
                                                                                                                                                          api/raft.pb.go on lines 2717..2728
                                                                                                                                                          api/specs.pb.go on lines 3849..3860
                                                                                                                                                          api/specs.pb.go on lines 3861..3872
                                                                                                                                                          api/specs.pb.go on lines 3873..3884
                                                                                                                                                          api/specs.pb.go on lines 3985..3996
                                                                                                                                                          api/specs.pb.go on lines 3997..4008
                                                                                                                                                          api/specs.pb.go on lines 4009..4020
                                                                                                                                                          api/watch.pb.go on lines 2284..2295
                                                                                                                                                          api/watch.pb.go on lines 2296..2307
                                                                                                                                                          api/watch.pb.go on lines 2308..2319
                                                                                                                                                          api/watch.pb.go on lines 2320..2331
                                                                                                                                                          api/watch.pb.go on lines 2332..2343
                                                                                                                                                          api/watch.pb.go on lines 2344..2355
                                                                                                                                                          api/watch.pb.go on lines 2356..2367
                                                                                                                                                          api/watch.pb.go on lines 2368..2379
                                                                                                                                                          api/watch.pb.go on lines 2380..2391
                                                                                                                                                          api/watch.pb.go on lines 2392..2403
                                                                                                                                                          api/watch.pb.go on lines 2493..2504
                                                                                                                                                          api/watch.pb.go on lines 2505..2516
                                                                                                                                                          api/watch.pb.go on lines 2537..2548
                                                                                                                                                          protobuf/plugin/plugin.pb.go on lines 585..596

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

                                                                                                                                                          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 encodeVarintSpecs(dAtA []byte, offset int, v uint64) int {
                                                                                                                                                              offset -= sovSpecs(v)
                                                                                                                                                              base := offset
                                                                                                                                                              for v >= 1<<7 {
                                                                                                                                                                  dAtA[offset] = uint8(v&0x7f | 0x80)
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/objects.pb.go on lines 2619..2629
                                                                                                                                                          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/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 *ReplicatedJob) String() string {
                                                                                                                                                              if this == nil {
                                                                                                                                                                  return "nil"
                                                                                                                                                              }
                                                                                                                                                              s := strings.Join([]string{`&ReplicatedJob{`,
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/objects.pb.go on lines 6088..6098
                                                                                                                                                          api/raft.pb.go on lines 2869..2879
                                                                                                                                                          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

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

                                                                                                                                                          func (this *ResourceReference) String() string {
                                                                                                                                                              if this == nil {
                                                                                                                                                                  return "nil"
                                                                                                                                                              }
                                                                                                                                                              s := strings.Join([]string{`&ResourceReference{`,
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.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/objects.pb.go on lines 6088..6098
                                                                                                                                                          api/raft.pb.go on lines 2869..2879
                                                                                                                                                          api/specs.pb.go on lines 4544..4554
                                                                                                                                                          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

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

                                                                                                                                                          func (m *NetworkAttachmentSpec) Size() (n int) {
                                                                                                                                                              if m == nil {
                                                                                                                                                                  return 0
                                                                                                                                                              }
                                                                                                                                                              var l int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 11 other locations - About 30 mins to fix
                                                                                                                                                          api/ca.pb.go on lines 1372..1383
                                                                                                                                                          api/ca.pb.go on lines 1450..1461
                                                                                                                                                          api/dispatcher.pb.go on lines 2823..2834
                                                                                                                                                          api/dispatcher.pb.go on lines 2936..2947
                                                                                                                                                          api/dispatcher.pb.go on lines 2964..2975
                                                                                                                                                          api/health.pb.go on lines 479..490
                                                                                                                                                          api/raft.pb.go on lines 2449..2460
                                                                                                                                                          api/raft.pb.go on lines 2563..2574
                                                                                                                                                          api/resource.pb.go on lines 723..734
                                                                                                                                                          api/resource.pb.go on lines 736..747
                                                                                                                                                          api/specs.pb.go on lines 4217..4228

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

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

                                                                                                                                                          func (m *ContainerSpec_PullOptions) Size() (n int) {
                                                                                                                                                              if m == nil {
                                                                                                                                                                  return 0
                                                                                                                                                              }
                                                                                                                                                              var l int
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in api/specs.pb.go and 11 other locations - About 30 mins to fix
                                                                                                                                                          api/ca.pb.go on lines 1372..1383
                                                                                                                                                          api/ca.pb.go on lines 1450..1461
                                                                                                                                                          api/dispatcher.pb.go on lines 2823..2834
                                                                                                                                                          api/dispatcher.pb.go on lines 2936..2947
                                                                                                                                                          api/dispatcher.pb.go on lines 2964..2975
                                                                                                                                                          api/health.pb.go on lines 479..490
                                                                                                                                                          api/raft.pb.go on lines 2449..2460
                                                                                                                                                          api/raft.pb.go on lines 2563..2574
                                                                                                                                                          api/resource.pb.go on lines 723..734
                                                                                                                                                          api/resource.pb.go on lines 736..747
                                                                                                                                                          api/specs.pb.go on lines 4054..4065

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

                                                                                                                                                          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