docker/swarmkit

View on GitHub
api/dispatcher.pb.go

Summary

Maintainability
F
2 mos
Test Coverage

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

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

package api

Severity: Major
Found in api/dispatcher.pb.go - About 1 wk to fix

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

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

    Cognitive Complexity

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

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

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

    Further reading

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        func skipDispatcher(dAtA []byte) (n int, err error) {
            l := len(dAtA)
            iNdEx := 0
            depth := 0
            for iNdEx < l {
        Severity: Minor
        Found in api/dispatcher.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 AssignmentsMessage.Unmarshal has 164 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

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

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

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

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

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

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

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

                Method UpdateTaskStatusRequest.Unmarshal has 113 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

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

                  Method UpdateVolumeStatusRequest.Unmarshal has 113 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

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

                    Method Assignment.Unmarshal has 37 return statements (exceeds 4 allowed).
                    Open

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

                      Method AssignmentChange.Unmarshal has 102 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

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

                        Method UpdateVolumeStatusRequest_VolumeStatusUpdate.Unmarshal has 99 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

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

                          Method AssignmentsMessage.Unmarshal has 31 return statements (exceeds 4 allowed).
                          Open

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

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

                            type Assignment struct {
                                // Types that are valid to be assigned to Item:
                                //    *Assignment_Task
                                //    *Assignment_Secret
                                //    *Assignment_Config
                            Severity: Minor
                            Found in api/dispatcher.pb.go - About 2 hrs to fix

                              Method TasksMessage.Unmarshal has 81 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

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

                                Method HeartbeatResponse.Unmarshal has 80 lines of code (exceeds 50 allowed). Consider refactoring.
                                Open

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

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

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

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

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

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

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

                                        Function skipDispatcher has 76 lines of code (exceeds 50 allowed). Consider refactoring.
                                        Open

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

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

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

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

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

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

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

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

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

                                                  Method AssignmentChange.Unmarshal has 19 return statements (exceeds 4 allowed).
                                                  Open

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

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

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

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

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

                                                      Method HeartbeatResponse.Unmarshal has 16 return statements (exceeds 4 allowed).
                                                      Open

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

                                                        Method TasksMessage.Unmarshal has 16 return statements (exceeds 4 allowed).
                                                        Open

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

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

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

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

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

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

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

                                                                Method SessionMessage.MarshalToSizedBuffer has 59 lines of code (exceeds 50 allowed). Consider refactoring.
                                                                Open

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

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

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

                                                                    Method raftProxyDispatcherServer.Heartbeat has 9 return statements (exceeds 4 allowed).
                                                                    Open

                                                                    func (p *raftProxyDispatcherServer) Heartbeat(ctx context.Context, r *HeartbeatRequest) (*HeartbeatResponse, error) {
                                                                    
                                                                        conn, err := p.connSelector.LeaderConn(ctx)
                                                                        if err != nil {
                                                                            if err == raftselector.ErrIsLeader {
                                                                    Severity: Major
                                                                    Found in api/dispatcher.pb.go - About 55 mins to fix

                                                                      Method raftProxyDispatcherServer.UpdateVolumeStatus has 9 return statements (exceeds 4 allowed).
                                                                      Open

                                                                      func (p *raftProxyDispatcherServer) UpdateVolumeStatus(ctx context.Context, r *UpdateVolumeStatusRequest) (*UpdateVolumeStatusResponse, error) {
                                                                      
                                                                          conn, err := p.connSelector.LeaderConn(ctx)
                                                                          if err != nil {
                                                                              if err == raftselector.ErrIsLeader {
                                                                      Severity: Major
                                                                      Found in api/dispatcher.pb.go - About 55 mins to fix

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

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

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

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

                                                                            Method raftProxyDispatcherServer.UpdateTaskStatus has 9 return statements (exceeds 4 allowed).
                                                                            Open

                                                                            func (p *raftProxyDispatcherServer) UpdateTaskStatus(ctx context.Context, r *UpdateTaskStatusRequest) (*UpdateTaskStatusResponse, error) {
                                                                            
                                                                                conn, err := p.connSelector.LeaderConn(ctx)
                                                                                if err != nil {
                                                                                    if err == raftselector.ErrIsLeader {
                                                                            Severity: Major
                                                                            Found in api/dispatcher.pb.go - About 55 mins to fix

                                                                              Method raftProxyDispatcherServer.Tasks has 8 return statements (exceeds 4 allowed).
                                                                              Open

                                                                              func (p *raftProxyDispatcherServer) Tasks(r *TasksRequest, stream Dispatcher_TasksServer) error {
                                                                                  ctx := stream.Context()
                                                                                  conn, err := p.connSelector.LeaderConn(ctx)
                                                                                  if err != nil {
                                                                                      if err == raftselector.ErrIsLeader {
                                                                              Severity: Major
                                                                              Found in api/dispatcher.pb.go - About 50 mins to fix

                                                                                Method raftProxyDispatcherServer.Session has 8 return statements (exceeds 4 allowed).
                                                                                Open

                                                                                func (p *raftProxyDispatcherServer) Session(r *SessionRequest, stream Dispatcher_SessionServer) error {
                                                                                    ctx := stream.Context()
                                                                                    conn, err := p.connSelector.LeaderConn(ctx)
                                                                                    if err != nil {
                                                                                        if err == raftselector.ErrIsLeader {
                                                                                Severity: Major
                                                                                Found in api/dispatcher.pb.go - About 50 mins to fix

                                                                                  Method raftProxyDispatcherServer.Assignments has 8 return statements (exceeds 4 allowed).
                                                                                  Open

                                                                                  func (p *raftProxyDispatcherServer) Assignments(r *AssignmentsRequest, stream Dispatcher_AssignmentsServer) error {
                                                                                      ctx := stream.Context()
                                                                                      conn, err := p.connSelector.LeaderConn(ctx)
                                                                                      if err != nil {
                                                                                          if err == raftselector.ErrIsLeader {
                                                                                  Severity: Major
                                                                                  Found in api/dispatcher.pb.go - About 50 mins to fix

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

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

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

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

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

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

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

                                                                                    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 *HeartbeatRequest) Unmarshal(dAtA []byte) error {
                                                                                        l := len(dAtA)
                                                                                        iNdEx := 0
                                                                                        for iNdEx < l {
                                                                                            preIndex := iNdEx
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 6296..6377
                                                                                    api/specs.pb.go on lines 7535..7616

                                                                                    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 *TasksRequest) Unmarshal(dAtA []byte) error {
                                                                                        l := len(dAtA)
                                                                                        iNdEx := 0
                                                                                        for iNdEx < l {
                                                                                            preIndex := iNdEx
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 6296..6377
                                                                                    api/specs.pb.go on lines 7535..7616

                                                                                    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 *AssignmentsRequest) Unmarshal(dAtA []byte) error {
                                                                                        l := len(dAtA)
                                                                                        iNdEx := 0
                                                                                        for iNdEx < l {
                                                                                            preIndex := iNdEx
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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/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 6296..6377
                                                                                    api/specs.pb.go on lines 7535..7616

                                                                                    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 skipDispatcher(dAtA []byte) (n int, err error) {
                                                                                        l := len(dAtA)
                                                                                        iNdEx := 0
                                                                                        depth := 0
                                                                                        for iNdEx < l {
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 10 other locations - About 6 hrs to fix
                                                                                    api/ca.pb.go on lines 2345..2422
                                                                                    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/specs.pb.go on lines 9221..9298
                                                                                    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 10 locations. Consider refactoring.
                                                                                    Open

                                                                                    func NewRaftProxyDispatcherServer(local DispatcherServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) DispatcherServer {
                                                                                        redirectChecker := func(ctx context.Context) (context.Context, error) {
                                                                                            p, ok := peer.FromContext(ctx)
                                                                                            if !ok {
                                                                                                return ctx, status.Errorf(codes.InvalidArgument, "remote addr is not found in context")
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 9 other locations - About 5 hrs to fix
                                                                                    api/ca.pb.go on lines 1094..1125
                                                                                    api/ca.pb.go on lines 1236..1267
                                                                                    api/health.pb.go on lines 378..409
                                                                                    api/logbroker.pb.go on lines 1722..1753
                                                                                    api/logbroker.pb.go on lines 1845..1876
                                                                                    api/raft.pb.go on lines 2092..2123
                                                                                    api/raft.pb.go on lines 2291..2322
                                                                                    api/resource.pb.go on lines 570..601
                                                                                    api/watch.pb.go on lines 2155..2186

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

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

                                                                                    func (p *raftProxyDispatcherServer) UpdateTaskStatus(ctx context.Context, r *UpdateTaskStatusRequest) (*UpdateTaskStatusResponse, error) {
                                                                                    
                                                                                        conn, err := p.connSelector.LeaderConn(ctx)
                                                                                        if err != nil {
                                                                                            if err == raftselector.ErrIsLeader {
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 13 other locations - About 4 hrs to fix
                                                                                    api/ca.pb.go on lines 1160..1193
                                                                                    api/ca.pb.go on lines 1195..1228
                                                                                    api/ca.pb.go on lines 1302..1335
                                                                                    api/ca.pb.go on lines 1337..1370
                                                                                    api/dispatcher.pb.go on lines 2566..2599
                                                                                    api/dispatcher.pb.go on lines 2636..2669
                                                                                    api/health.pb.go on lines 444..477
                                                                                    api/raft.pb.go on lines 2158..2191
                                                                                    api/raft.pb.go on lines 2250..2283
                                                                                    api/raft.pb.go on lines 2357..2390
                                                                                    api/raft.pb.go on lines 2392..2425
                                                                                    api/resource.pb.go on lines 636..669
                                                                                    api/resource.pb.go on lines 671..704

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

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

                                                                                    func (p *raftProxyDispatcherServer) Heartbeat(ctx context.Context, r *HeartbeatRequest) (*HeartbeatResponse, error) {
                                                                                    
                                                                                        conn, err := p.connSelector.LeaderConn(ctx)
                                                                                        if err != nil {
                                                                                            if err == raftselector.ErrIsLeader {
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 13 other locations - About 4 hrs to fix
                                                                                    api/ca.pb.go on lines 1160..1193
                                                                                    api/ca.pb.go on lines 1195..1228
                                                                                    api/ca.pb.go on lines 1302..1335
                                                                                    api/ca.pb.go on lines 1337..1370
                                                                                    api/dispatcher.pb.go on lines 2601..2634
                                                                                    api/dispatcher.pb.go on lines 2636..2669
                                                                                    api/health.pb.go on lines 444..477
                                                                                    api/raft.pb.go on lines 2158..2191
                                                                                    api/raft.pb.go on lines 2250..2283
                                                                                    api/raft.pb.go on lines 2357..2390
                                                                                    api/raft.pb.go on lines 2392..2425
                                                                                    api/resource.pb.go on lines 636..669
                                                                                    api/resource.pb.go on lines 671..704

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

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

                                                                                    func (p *raftProxyDispatcherServer) UpdateVolumeStatus(ctx context.Context, r *UpdateVolumeStatusRequest) (*UpdateVolumeStatusResponse, error) {
                                                                                    
                                                                                        conn, err := p.connSelector.LeaderConn(ctx)
                                                                                        if err != nil {
                                                                                            if err == raftselector.ErrIsLeader {
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 13 other locations - About 4 hrs to fix
                                                                                    api/ca.pb.go on lines 1160..1193
                                                                                    api/ca.pb.go on lines 1195..1228
                                                                                    api/ca.pb.go on lines 1302..1335
                                                                                    api/ca.pb.go on lines 1337..1370
                                                                                    api/dispatcher.pb.go on lines 2566..2599
                                                                                    api/dispatcher.pb.go on lines 2601..2634
                                                                                    api/health.pb.go on lines 444..477
                                                                                    api/raft.pb.go on lines 2158..2191
                                                                                    api/raft.pb.go on lines 2250..2283
                                                                                    api/raft.pb.go on lines 2357..2390
                                                                                    api/raft.pb.go on lines 2392..2425
                                                                                    api/resource.pb.go on lines 636..669
                                                                                    api/resource.pb.go on lines 671..704

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

                                                                                    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 *UpdateVolumeStatusResponse) Unmarshal(dAtA []byte) error {
                                                                                        l := len(dAtA)
                                                                                        iNdEx := 0
                                                                                        for iNdEx < l {
                                                                                            preIndex := iNdEx
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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/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 5503..5552
                                                                                    api/specs.pb.go on lines 5641..5690

                                                                                    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 *UpdateTaskStatusResponse) Unmarshal(dAtA []byte) error {
                                                                                        l := len(dAtA)
                                                                                        iNdEx := 0
                                                                                        for iNdEx < l {
                                                                                            preIndex := iNdEx
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 5503..5552
                                                                                    api/specs.pb.go on lines 5641..5690

                                                                                    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

                                                                                    func (p *raftProxyDispatcherServer) Tasks(r *TasksRequest, stream Dispatcher_TasksServer) error {
                                                                                        ctx := stream.Context()
                                                                                        conn, err := p.connSelector.LeaderConn(ctx)
                                                                                        if err != nil {
                                                                                            if err == raftselector.ErrIsLeader {
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 5 other locations - About 3 hrs to fix
                                                                                    api/dispatcher.pb.go on lines 2524..2564
                                                                                    api/dispatcher.pb.go on lines 2731..2771
                                                                                    api/logbroker.pb.go on lines 1797..1837
                                                                                    api/logbroker.pb.go on lines 1920..1960
                                                                                    api/watch.pb.go on lines 2230..2270

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

                                                                                    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 (p *raftProxyDispatcherServer) Assignments(r *AssignmentsRequest, stream Dispatcher_AssignmentsServer) error {
                                                                                        ctx := stream.Context()
                                                                                        conn, err := p.connSelector.LeaderConn(ctx)
                                                                                        if err != nil {
                                                                                            if err == raftselector.ErrIsLeader {
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 5 other locations - About 3 hrs to fix
                                                                                    api/dispatcher.pb.go on lines 2524..2564
                                                                                    api/dispatcher.pb.go on lines 2680..2720
                                                                                    api/logbroker.pb.go on lines 1797..1837
                                                                                    api/logbroker.pb.go on lines 1920..1960
                                                                                    api/watch.pb.go on lines 2230..2270

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

                                                                                    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 (p *raftProxyDispatcherServer) Session(r *SessionRequest, stream Dispatcher_SessionServer) error {
                                                                                        ctx := stream.Context()
                                                                                        conn, err := p.connSelector.LeaderConn(ctx)
                                                                                        if err != nil {
                                                                                            if err == raftselector.ErrIsLeader {
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 5 other locations - About 3 hrs to fix
                                                                                    api/dispatcher.pb.go on lines 2680..2720
                                                                                    api/dispatcher.pb.go on lines 2731..2771
                                                                                    api/logbroker.pb.go on lines 1797..1837
                                                                                    api/logbroker.pb.go on lines 1920..1960
                                                                                    api/watch.pb.go on lines 2230..2270

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

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

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

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

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

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

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

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

                                                                                    func (m *SessionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                        i := len(dAtA)
                                                                                        _ = i
                                                                                        var l int
                                                                                        _ = l
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 1 other location - About 2 hrs to fix
                                                                                    api/resource.pb.go on lines 442..467

                                                                                    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 1:
                                                                                                if wireType != 2 {
                                                                                                    return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType)
                                                                                                }
                                                                                                var msglen int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 33 other locations - About 2 hrs to fix
                                                                                    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 5131..5165
                                                                                    api/specs.pb.go on lines 5166..5200
                                                                                    api/specs.pb.go on lines 5343..5377
                                                                                    api/specs.pb.go on lines 5378..5412
                                                                                    api/specs.pb.go on lines 5720..5754
                                                                                    api/specs.pb.go on lines 5933..5967
                                                                                    api/specs.pb.go on lines 5987..6021
                                                                                    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 3:
                                                                                                if wireType != 2 {
                                                                                                    return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
                                                                                                }
                                                                                                var msglen int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 5131..5165
                                                                                    api/specs.pb.go on lines 5166..5200
                                                                                    api/specs.pb.go on lines 5343..5377
                                                                                    api/specs.pb.go on lines 5378..5412
                                                                                    api/specs.pb.go on lines 5720..5754
                                                                                    api/specs.pb.go on lines 5933..5967
                                                                                    api/specs.pb.go on lines 5987..6021
                                                                                    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 Volume", wireType)
                                                                                                }
                                                                                                var msglen int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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/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 5131..5165
                                                                                    api/specs.pb.go on lines 5166..5200
                                                                                    api/specs.pb.go on lines 5343..5377
                                                                                    api/specs.pb.go on lines 5378..5412
                                                                                    api/specs.pb.go on lines 5720..5754
                                                                                    api/specs.pb.go on lines 5933..5967
                                                                                    api/specs.pb.go on lines 5987..6021
                                                                                    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 2:
                                                                                                if wireType != 2 {
                                                                                                    return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
                                                                                                }
                                                                                                var msglen int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 5131..5165
                                                                                    api/specs.pb.go on lines 5166..5200
                                                                                    api/specs.pb.go on lines 5343..5377
                                                                                    api/specs.pb.go on lines 5378..5412
                                                                                    api/specs.pb.go on lines 5720..5754
                                                                                    api/specs.pb.go on lines 5933..5967
                                                                                    api/specs.pb.go on lines 5987..6021
                                                                                    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 5:
                                                                                                if wireType != 2 {
                                                                                                    return fmt.Errorf("proto: wrong wireType = %d for field RootCA", wireType)
                                                                                                }
                                                                                                var byteLen int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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/logbroker.pb.go on lines 3104..3137
                                                                                    api/specs.pb.go on lines 8629..8662
                                                                                    api/specs.pb.go on lines 8818..8851

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

                                                                                    func _Dispatcher_UpdateTaskStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
                                                                                        in := new(UpdateTaskStatusRequest)
                                                                                        if err := dec(in); err != nil {
                                                                                            return nil, err
                                                                                        }
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 13 other locations - About 2 hrs to fix
                                                                                    api/ca.pb.go on lines 640..656
                                                                                    api/ca.pb.go on lines 658..674
                                                                                    api/ca.pb.go on lines 748..764
                                                                                    api/ca.pb.go on lines 766..782
                                                                                    api/dispatcher.pb.go on lines 1593..1609
                                                                                    api/dispatcher.pb.go on lines 1629..1645
                                                                                    api/health.pb.go on lines 271..287
                                                                                    api/raft.pb.go on lines 1225..1241
                                                                                    api/raft.pb.go on lines 1269..1285
                                                                                    api/raft.pb.go on lines 1369..1385
                                                                                    api/raft.pb.go on lines 1387..1403
                                                                                    api/resource.pb.go on lines 374..390
                                                                                    api/resource.pb.go on lines 392..408

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

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

                                                                                    func _Dispatcher_UpdateVolumeStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
                                                                                        in := new(UpdateVolumeStatusRequest)
                                                                                        if err := dec(in); err != nil {
                                                                                            return nil, err
                                                                                        }
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 13 other locations - About 2 hrs to fix
                                                                                    api/ca.pb.go on lines 640..656
                                                                                    api/ca.pb.go on lines 658..674
                                                                                    api/ca.pb.go on lines 748..764
                                                                                    api/ca.pb.go on lines 766..782
                                                                                    api/dispatcher.pb.go on lines 1593..1609
                                                                                    api/dispatcher.pb.go on lines 1611..1627
                                                                                    api/health.pb.go on lines 271..287
                                                                                    api/raft.pb.go on lines 1225..1241
                                                                                    api/raft.pb.go on lines 1269..1285
                                                                                    api/raft.pb.go on lines 1369..1385
                                                                                    api/raft.pb.go on lines 1387..1403
                                                                                    api/resource.pb.go on lines 374..390
                                                                                    api/resource.pb.go on lines 392..408

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

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

                                                                                    func _Dispatcher_Heartbeat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
                                                                                        in := new(HeartbeatRequest)
                                                                                        if err := dec(in); err != nil {
                                                                                            return nil, err
                                                                                        }
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 13 other locations - About 2 hrs to fix
                                                                                    api/ca.pb.go on lines 640..656
                                                                                    api/ca.pb.go on lines 658..674
                                                                                    api/ca.pb.go on lines 748..764
                                                                                    api/ca.pb.go on lines 766..782
                                                                                    api/dispatcher.pb.go on lines 1611..1627
                                                                                    api/dispatcher.pb.go on lines 1629..1645
                                                                                    api/health.pb.go on lines 271..287
                                                                                    api/raft.pb.go on lines 1225..1241
                                                                                    api/raft.pb.go on lines 1269..1285
                                                                                    api/raft.pb.go on lines 1369..1385
                                                                                    api/raft.pb.go on lines 1387..1403
                                                                                    api/resource.pb.go on lines 374..390
                                                                                    api/resource.pb.go on lines 392..408

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

                                                                                    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 (p *raftProxyDispatcherServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
                                                                                        ticker := rafttime.NewTicker(500 * rafttime.Millisecond)
                                                                                        defer ticker.Stop()
                                                                                        for {
                                                                                            select {
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 9 other locations - About 2 hrs to fix
                                                                                    api/ca.pb.go on lines 1136..1158
                                                                                    api/ca.pb.go on lines 1278..1300
                                                                                    api/health.pb.go on lines 420..442
                                                                                    api/logbroker.pb.go on lines 1764..1786
                                                                                    api/logbroker.pb.go on lines 1887..1909
                                                                                    api/raft.pb.go on lines 2134..2156
                                                                                    api/raft.pb.go on lines 2333..2355
                                                                                    api/resource.pb.go on lines 612..634
                                                                                    api/watch.pb.go on lines 2197..2219

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

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

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

                                                                                    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 (c *dispatcherClient) Session(ctx context.Context, in *SessionRequest, opts ...grpc.CallOption) (Dispatcher_SessionClient, error) {
                                                                                        stream, err := c.cc.NewStream(ctx, &_Dispatcher_serviceDesc.Streams[0], "/docker.swarmkit.v1.Dispatcher/Session", opts...)
                                                                                        if err != nil {
                                                                                            return nil, err
                                                                                        }
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 4 other locations - About 1 hr to fix
                                                                                    api/dispatcher.pb.go on lines 1476..1489
                                                                                    api/logbroker.pb.go on lines 924..937
                                                                                    api/logbroker.pb.go on lines 1037..1050
                                                                                    api/watch.pb.go on lines 1245..1258

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

                                                                                    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 (c *dispatcherClient) Assignments(ctx context.Context, in *AssignmentsRequest, opts ...grpc.CallOption) (Dispatcher_AssignmentsClient, error) {
                                                                                        stream, err := c.cc.NewStream(ctx, &_Dispatcher_serviceDesc.Streams[2], "/docker.swarmkit.v1.Dispatcher/Assignments", opts...)
                                                                                        if err != nil {
                                                                                            return nil, err
                                                                                        }
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 4 other locations - About 1 hr to fix
                                                                                    api/dispatcher.pb.go on lines 1384..1397
                                                                                    api/logbroker.pb.go on lines 924..937
                                                                                    api/logbroker.pb.go on lines 1037..1050
                                                                                    api/watch.pb.go on lines 1245..1258

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

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

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

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

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

                                                                                    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 *TasksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                        i := len(dAtA)
                                                                                        _ = i
                                                                                        var l int
                                                                                        _ = l
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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
                                                                                    api/specs.pb.go on lines 2809..2822

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

                                                                                    func (m *AssignmentsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                        i := len(dAtA)
                                                                                        _ = i
                                                                                        var l int
                                                                                        _ = l
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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/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
                                                                                    api/specs.pb.go on lines 2809..2822

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

                                                                                    func (m *HeartbeatRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                        i := len(dAtA)
                                                                                        _ = i
                                                                                        var l int
                                                                                        _ = l
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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
                                                                                    api/specs.pb.go on lines 2809..2822

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

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

                                                                                    func (m *SessionRequest) Size() (n int) {
                                                                                        if m == nil {
                                                                                            return 0
                                                                                        }
                                                                                        var l int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 1 other location - About 1 hr to fix
                                                                                    api/resource.pb.go on lines 706..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 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 (m *Assignment) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                        i := len(dAtA)
                                                                                        _ = i
                                                                                        var l int
                                                                                        _ = l
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 2 other locations - About 1 hr to fix
                                                                                    api/watch.pb.go on lines 1349..1364
                                                                                    api/watch.pb.go on lines 1670..1685

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

                                                                                    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 *UpdateVolumeStatusRequest) String() string {
                                                                                        if this == nil {
                                                                                            return "nil"
                                                                                        }
                                                                                        repeatedStringForUpdates := "[]*UpdateVolumeStatusRequest_VolumeStatusUpdate{"
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 2 other locations - About 1 hr to fix
                                                                                    api/dispatcher.pb.go on lines 3140..3155
                                                                                    api/specs.pb.go on lines 4781..4796

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

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

                                                                                    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 *UpdateTaskStatusRequest) CopyFrom(src interface{}) {
                                                                                    
                                                                                        o := src.(*UpdateTaskStatusRequest)
                                                                                        *m = *o
                                                                                        if o.Updates != nil {
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 5 other locations - About 1 hr to fix
                                                                                    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/specs.pb.go on lines 2037..2049
                                                                                    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 6 locations. Consider refactoring.
                                                                                    Open

                                                                                    func (m *UpdateVolumeStatusRequest) CopyFrom(src interface{}) {
                                                                                    
                                                                                        o := src.(*UpdateVolumeStatusRequest)
                                                                                        *m = *o
                                                                                        if o.Updates != nil {
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 1214..1226
                                                                                    api/dispatcher.pb.go on lines 1315..1327
                                                                                    api/specs.pb.go on lines 2037..2049
                                                                                    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 6 locations. Consider refactoring.
                                                                                    Open

                                                                                    func (m *AssignmentsMessage) CopyFrom(src interface{}) {
                                                                                    
                                                                                        o := src.(*AssignmentsMessage)
                                                                                        *m = *o
                                                                                        if o.Changes != nil {
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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/specs.pb.go on lines 2037..2049
                                                                                    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 6 locations. Consider refactoring.
                                                                                    Open

                                                                                    func (m *TasksMessage) CopyFrom(src interface{}) {
                                                                                    
                                                                                        o := src.(*TasksMessage)
                                                                                        *m = *o
                                                                                        if o.Tasks != nil {
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 1315..1327
                                                                                    api/specs.pb.go on lines 2037..2049
                                                                                    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 *Assignment_Secret) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                        i := len(dAtA)
                                                                                        if m.Secret != nil {
                                                                                            {
                                                                                                size, err := m.Secret.MarshalToSizedBuffer(dAtA[:i])
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 2355..2370
                                                                                    api/specs.pb.go on lines 2376..2391
                                                                                    api/specs.pb.go on lines 2397..2412
                                                                                    api/specs.pb.go on lines 2418..2433
                                                                                    api/specs.pb.go on lines 2659..2674
                                                                                    api/specs.pb.go on lines 2680..2695
                                                                                    api/specs.pb.go on lines 2701..2716
                                                                                    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 *Assignment_Config) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                        i := len(dAtA)
                                                                                        if m.Config != nil {
                                                                                            {
                                                                                                size, err := m.Config.MarshalToSizedBuffer(dAtA[:i])
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 2355..2370
                                                                                    api/specs.pb.go on lines 2376..2391
                                                                                    api/specs.pb.go on lines 2397..2412
                                                                                    api/specs.pb.go on lines 2418..2433
                                                                                    api/specs.pb.go on lines 2659..2674
                                                                                    api/specs.pb.go on lines 2680..2695
                                                                                    api/specs.pb.go on lines 2701..2716
                                                                                    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 *Assignment_Volume) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                        i := len(dAtA)
                                                                                        if m.Volume != nil {
                                                                                            {
                                                                                                size, err := m.Volume.MarshalToSizedBuffer(dAtA[:i])
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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/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 2355..2370
                                                                                    api/specs.pb.go on lines 2376..2391
                                                                                    api/specs.pb.go on lines 2397..2412
                                                                                    api/specs.pb.go on lines 2418..2433
                                                                                    api/specs.pb.go on lines 2659..2674
                                                                                    api/specs.pb.go on lines 2680..2695
                                                                                    api/specs.pb.go on lines 2701..2716
                                                                                    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 *Assignment_Task) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                        i := len(dAtA)
                                                                                        if m.Task != nil {
                                                                                            {
                                                                                                size, err := m.Task.MarshalToSizedBuffer(dAtA[:i])
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 33 other locations - About 1 hr to fix
                                                                                    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 2355..2370
                                                                                    api/specs.pb.go on lines 2376..2391
                                                                                    api/specs.pb.go on lines 2397..2412
                                                                                    api/specs.pb.go on lines 2418..2433
                                                                                    api/specs.pb.go on lines 2659..2674
                                                                                    api/specs.pb.go on lines 2680..2695
                                                                                    api/specs.pb.go on lines 2701..2716
                                                                                    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 2:
                                                                                                if wireType != 0 {
                                                                                                    return fmt.Errorf("proto: wrong wireType = %d for field Unpublished", wireType)
                                                                                                }
                                                                                                var v int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 16 other locations - About 1 hr to fix
                                                                                    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 6898..6917
                                                                                    api/specs.pb.go on lines 7054..7073
                                                                                    api/specs.pb.go on lines 7074..7093
                                                                                    api/specs.pb.go on lines 8084..8103
                                                                                    api/specs.pb.go on lines 8104..8123
                                                                                    api/specs.pb.go on lines 8160..8179
                                                                                    api/specs.pb.go on lines 8180..8199
                                                                                    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 2 locations. Consider refactoring.
                                                                                    Open

                                                                                    func (m *TasksMessage) Size() (n int) {
                                                                                        if m == nil {
                                                                                            return 0
                                                                                        }
                                                                                        var l int
                                                                                    Severity: Minor
                                                                                    Found in api/dispatcher.pb.go and 1 other location - About 50 mins to fix
                                                                                    api/logbroker.pb.go on lines 2153..2166

                                                                                    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 (p *raftProxyDispatcherServer) runCtxMods(ctx context.Context, ctxMods []func(context.Context) (context.Context, error)) (context.Context, error) {
                                                                                        var err error
                                                                                        for _, mod := range ctxMods {
                                                                                            ctx, err = mod(ctx)
                                                                                            if err != nil {
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 9 other locations - About 50 mins to fix
                                                                                    api/ca.pb.go on lines 1126..1135
                                                                                    api/ca.pb.go on lines 1268..1277
                                                                                    api/health.pb.go on lines 410..419
                                                                                    api/logbroker.pb.go on lines 1754..1763
                                                                                    api/logbroker.pb.go on lines 1877..1886
                                                                                    api/raft.pb.go on lines 2124..2133
                                                                                    api/raft.pb.go on lines 2323..2332
                                                                                    api/resource.pb.go on lines 602..611
                                                                                    api/watch.pb.go on lines 2187..2196

                                                                                    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 *UpdateTaskStatusRequest_TaskStatusUpdate) String() string {
                                                                                        if this == nil {
                                                                                            return "nil"
                                                                                        }
                                                                                        s := strings.Join([]string{`&UpdateTaskStatusRequest_TaskStatusUpdate{`,
                                                                                    Severity: Minor
                                                                                    Found in api/dispatcher.pb.go and 1 other location - About 50 mins to fix
                                                                                    api/specs.pb.go on lines 4647..4657

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

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

                                                                                    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 *SessionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_SessionRequest.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *AssignmentsMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_AssignmentsMessage.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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/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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *UpdateVolumeStatusRequest_VolumeStatusUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_UpdateVolumeStatusRequest_VolumeStatusUpdate.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *TasksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_TasksRequest.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *HeartbeatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_HeartbeatRequest.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *UpdateTaskStatusRequest_TaskStatusUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_UpdateTaskStatusRequest_TaskStatusUpdate.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *UpdateTaskStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_UpdateTaskStatusRequest.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *AssignmentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_AssignmentsRequest.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *UpdateTaskStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_UpdateTaskStatusResponse.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *Assignment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_Assignment.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *SessionMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_SessionMessage.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *UpdateVolumeStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_UpdateVolumeStatusResponse.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *HeartbeatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_HeartbeatResponse.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *UpdateVolumeStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_UpdateVolumeStatusRequest.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *TasksMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_TasksMessage.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *AssignmentChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                        if deterministic {
                                                                                            return xxx_messageInfo_AssignmentChange.Marshal(b, m, deterministic)
                                                                                        } else {
                                                                                            b = b[:cap(b)]
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 891..902
                                                                                    api/specs.pb.go on lines 932..943
                                                                                    api/specs.pb.go on lines 977..988
                                                                                    api/specs.pb.go on lines 1015..1026
                                                                                    api/specs.pb.go on lines 1056..1067
                                                                                    api/specs.pb.go on lines 1119..1130
                                                                                    api/specs.pb.go on lines 1205..1216
                                                                                    api/specs.pb.go on lines 1252..1263
                                                                                    api/specs.pb.go on lines 1299..1310
                                                                                    api/specs.pb.go on lines 1376..1387
                                                                                    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 *Assignment_Secret) Size() (n int) {
                                                                                        if m == nil {
                                                                                            return 0
                                                                                        }
                                                                                        var l int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 3897..3908
                                                                                    api/specs.pb.go on lines 3997..4008
                                                                                    api/specs.pb.go on lines 4009..4020
                                                                                    api/specs.pb.go on lines 4021..4032
                                                                                    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 *Assignment_Task) Size() (n int) {
                                                                                        if m == nil {
                                                                                            return 0
                                                                                        }
                                                                                        var l int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 37 other locations - About 40 mins to fix
                                                                                    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 3897..3908
                                                                                    api/specs.pb.go on lines 3997..4008
                                                                                    api/specs.pb.go on lines 4009..4020
                                                                                    api/specs.pb.go on lines 4021..4032
                                                                                    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 *Assignment_Volume) Size() (n int) {
                                                                                        if m == nil {
                                                                                            return 0
                                                                                        }
                                                                                        var l int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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/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 3897..3908
                                                                                    api/specs.pb.go on lines 3997..4008
                                                                                    api/specs.pb.go on lines 4009..4020
                                                                                    api/specs.pb.go on lines 4021..4032
                                                                                    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 *Assignment_Config) Size() (n int) {
                                                                                        if m == nil {
                                                                                            return 0
                                                                                        }
                                                                                        var l int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 3897..3908
                                                                                    api/specs.pb.go on lines 3997..4008
                                                                                    api/specs.pb.go on lines 4009..4020
                                                                                    api/specs.pb.go on lines 4021..4032
                                                                                    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 14 locations. Consider refactoring.
                                                                                    Open

                                                                                    func (c *dispatcherClient) UpdateVolumeStatus(ctx context.Context, in *UpdateVolumeStatusRequest, opts ...grpc.CallOption) (*UpdateVolumeStatusResponse, error) {
                                                                                        out := new(UpdateVolumeStatusResponse)
                                                                                        err := c.cc.Invoke(ctx, "/docker.swarmkit.v1.Dispatcher/UpdateVolumeStatus", in, out, opts...)
                                                                                        if err != nil {
                                                                                            return nil, err
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 13 other locations - About 35 mins to fix
                                                                                    api/ca.pb.go on lines 599..606
                                                                                    api/ca.pb.go on lines 608..615
                                                                                    api/ca.pb.go on lines 709..716
                                                                                    api/ca.pb.go on lines 718..725
                                                                                    api/dispatcher.pb.go on lines 1416..1423
                                                                                    api/dispatcher.pb.go on lines 1425..1432
                                                                                    api/health.pb.go on lines 245..252
                                                                                    api/raft.pb.go on lines 1140..1147
                                                                                    api/raft.pb.go on lines 1183..1190
                                                                                    api/raft.pb.go on lines 1328..1335
                                                                                    api/raft.pb.go on lines 1337..1344
                                                                                    api/resource.pb.go on lines 335..342
                                                                                    api/resource.pb.go on lines 344..351

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

                                                                                    func (c *dispatcherClient) UpdateTaskStatus(ctx context.Context, in *UpdateTaskStatusRequest, opts ...grpc.CallOption) (*UpdateTaskStatusResponse, error) {
                                                                                        out := new(UpdateTaskStatusResponse)
                                                                                        err := c.cc.Invoke(ctx, "/docker.swarmkit.v1.Dispatcher/UpdateTaskStatus", in, out, opts...)
                                                                                        if err != nil {
                                                                                            return nil, err
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 13 other locations - About 35 mins to fix
                                                                                    api/ca.pb.go on lines 599..606
                                                                                    api/ca.pb.go on lines 608..615
                                                                                    api/ca.pb.go on lines 709..716
                                                                                    api/ca.pb.go on lines 718..725
                                                                                    api/dispatcher.pb.go on lines 1416..1423
                                                                                    api/dispatcher.pb.go on lines 1434..1441
                                                                                    api/health.pb.go on lines 245..252
                                                                                    api/raft.pb.go on lines 1140..1147
                                                                                    api/raft.pb.go on lines 1183..1190
                                                                                    api/raft.pb.go on lines 1328..1335
                                                                                    api/raft.pb.go on lines 1337..1344
                                                                                    api/resource.pb.go on lines 335..342
                                                                                    api/resource.pb.go on lines 344..351

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

                                                                                    func encodeVarintDispatcher(dAtA []byte, offset int, v uint64) int {
                                                                                        offset -= sovDispatcher(v)
                                                                                        base := offset
                                                                                        for v >= 1<<7 {
                                                                                            dAtA[offset] = uint8(v&0x7f | 0x80)
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 10 other locations - About 35 mins to fix
                                                                                    api/ca.pb.go on lines 1076..1086
                                                                                    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/specs.pb.go on lines 3796..3806
                                                                                    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 14 locations. Consider refactoring.
                                                                                    Open

                                                                                    func (c *dispatcherClient) Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error) {
                                                                                        out := new(HeartbeatResponse)
                                                                                        err := c.cc.Invoke(ctx, "/docker.swarmkit.v1.Dispatcher/Heartbeat", in, out, opts...)
                                                                                        if err != nil {
                                                                                            return nil, err
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 13 other locations - About 35 mins to fix
                                                                                    api/ca.pb.go on lines 599..606
                                                                                    api/ca.pb.go on lines 608..615
                                                                                    api/ca.pb.go on lines 709..716
                                                                                    api/ca.pb.go on lines 718..725
                                                                                    api/dispatcher.pb.go on lines 1425..1432
                                                                                    api/dispatcher.pb.go on lines 1434..1441
                                                                                    api/health.pb.go on lines 245..252
                                                                                    api/raft.pb.go on lines 1140..1147
                                                                                    api/raft.pb.go on lines 1183..1190
                                                                                    api/raft.pb.go on lines 1328..1335
                                                                                    api/raft.pb.go on lines 1337..1344
                                                                                    api/resource.pb.go on lines 335..342
                                                                                    api/resource.pb.go on lines 344..351

                                                                                    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 *UpdateVolumeStatusRequest_VolumeStatusUpdate) String() string {
                                                                                        if this == nil {
                                                                                            return "nil"
                                                                                        }
                                                                                        s := strings.Join([]string{`&UpdateVolumeStatusRequest_VolumeStatusUpdate{`,
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 7 other locations - About 35 mins to fix
                                                                                    api/ca.pb.go on lines 1527..1537
                                                                                    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 4559..4569
                                                                                    api/specs.pb.go on lines 4636..4646
                                                                                    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 *HeartbeatRequest) Size() (n int) {
                                                                                        if m == nil {
                                                                                            return 0
                                                                                        }
                                                                                        var l int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 4066..4077
                                                                                    api/specs.pb.go on lines 4232..4243

                                                                                    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 *TasksRequest) Size() (n int) {
                                                                                        if m == nil {
                                                                                            return 0
                                                                                        }
                                                                                        var l int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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 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 4066..4077
                                                                                    api/specs.pb.go on lines 4232..4243

                                                                                    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 *AssignmentsRequest) Size() (n int) {
                                                                                        if m == nil {
                                                                                            return 0
                                                                                        }
                                                                                        var l int
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.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/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 4066..4077
                                                                                    api/specs.pb.go on lines 4232..4243

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

                                                                                    func (p *authenticatedWrapperDispatcherServer) UpdateTaskStatus(ctx context.Context, r *UpdateTaskStatusRequest) (*UpdateTaskStatusResponse, error) {
                                                                                    
                                                                                        if err := p.authorize(ctx, []string{"swarm-worker", "swarm-manager"}); err != nil {
                                                                                            return nil, err
                                                                                        }
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 4 other locations - About 30 mins to fix
                                                                                    api/dispatcher.pb.go on lines 961..967
                                                                                    api/dispatcher.pb.go on lines 977..983
                                                                                    api/resource.pb.go on lines 235..241
                                                                                    api/resource.pb.go on lines 243..249

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

                                                                                    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 (p *authenticatedWrapperDispatcherServer) Heartbeat(ctx context.Context, r *HeartbeatRequest) (*HeartbeatResponse, error) {
                                                                                    
                                                                                        if err := p.authorize(ctx, []string{"swarm-worker", "swarm-manager"}); err != nil {
                                                                                            return nil, err
                                                                                        }
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 4 other locations - About 30 mins to fix
                                                                                    api/dispatcher.pb.go on lines 969..975
                                                                                    api/dispatcher.pb.go on lines 977..983
                                                                                    api/resource.pb.go on lines 235..241
                                                                                    api/resource.pb.go on lines 243..249

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

                                                                                    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 (p *authenticatedWrapperDispatcherServer) UpdateVolumeStatus(ctx context.Context, r *UpdateVolumeStatusRequest) (*UpdateVolumeStatusResponse, error) {
                                                                                    
                                                                                        if err := p.authorize(ctx, []string{"swarm-worker", "swarm-manager"}); err != nil {
                                                                                            return nil, err
                                                                                        }
                                                                                    Severity: Major
                                                                                    Found in api/dispatcher.pb.go and 4 other locations - About 30 mins to fix
                                                                                    api/dispatcher.pb.go on lines 961..967
                                                                                    api/dispatcher.pb.go on lines 969..975
                                                                                    api/resource.pb.go on lines 235..241
                                                                                    api/resource.pb.go on lines 243..249

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

                                                                                    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