docker/swarmkit

View on GitHub
api/raft.pb.go

Summary

Maintainability
F
2 mos
Test Coverage

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

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

package api

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

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

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

    Cognitive Complexity

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

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

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

    Further reading

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

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

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

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

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

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

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

      Cognitive Complexity

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

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

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

      Further reading

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

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

      Cognitive Complexity

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

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

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

      Further reading

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

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

      Cognitive Complexity

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

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

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

      Further reading

      Method StoreAction.Unmarshal has 82 return statements (exceeds 4 allowed).
      Open

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

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

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

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

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

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

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

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

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

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

            Cognitive Complexity

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

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

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

            Further reading

            StoreAction has 28 methods (exceeds 20 allowed). Consider refactoring.
            Open

            type StoreAction struct {
                Action StoreActionKind `protobuf:"varint,1,opt,name=action,proto3,enum=docker.swarmkit.v1.StoreActionKind" json:"action,omitempty"`
                // Types that are valid to be assigned to Target:
                //    *StoreAction_Node
                //    *StoreAction_Service
            Severity: Minor
            Found in api/raft.pb.go - About 3 hrs to fix

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

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

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

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

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

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

                    Method LeaveRequest.Unmarshal has 83 lines of code (exceeds 50 allowed). Consider refactoring.
                    Open

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

                      Method StreamRaftMessageRequest.Unmarshal has 83 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

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

                        Method ProcessRaftMessageRequest.Unmarshal has 83 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

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

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

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

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

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

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

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

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

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

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

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

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

                                  Method StoreAction.CopyFrom has 66 lines of code (exceeds 50 allowed). Consider refactoring.
                                  Open

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                Method ResolveAddressRequest.Unmarshal has 12 return statements (exceeds 4 allowed).
                                                Open

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

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

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

                                                    Method raftProxyRaftServer.ResolveAddress has 9 return statements (exceeds 4 allowed).
                                                    Open

                                                    func (p *raftProxyRaftServer) ResolveAddress(ctx context.Context, r *ResolveAddressRequest) (*ResolveAddressResponse, error) {
                                                    
                                                        conn, err := p.connSelector.LeaderConn(ctx)
                                                        if err != nil {
                                                            if err == raftselector.ErrIsLeader {
                                                    Severity: Major
                                                    Found in api/raft.pb.go - About 55 mins to fix

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

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

                                                        Method raftProxyRaftMembershipServer.Join has 9 return statements (exceeds 4 allowed).
                                                        Open

                                                        func (p *raftProxyRaftMembershipServer) Join(ctx context.Context, r *JoinRequest) (*JoinResponse, error) {
                                                        
                                                            conn, err := p.connSelector.LeaderConn(ctx)
                                                            if err != nil {
                                                                if err == raftselector.ErrIsLeader {
                                                        Severity: Major
                                                        Found in api/raft.pb.go - About 55 mins to fix

                                                          Method raftProxyRaftServer.StreamRaftMessage has 9 return statements (exceeds 4 allowed).
                                                          Open

                                                          func (p *raftProxyRaftServer) StreamRaftMessage(stream Raft_StreamRaftMessageServer) error {
                                                              ctx := stream.Context()
                                                              conn, err := p.connSelector.LeaderConn(ctx)
                                                              if err != nil {
                                                                  if err == raftselector.ErrIsLeader {
                                                          Severity: Major
                                                          Found in api/raft.pb.go - About 55 mins to fix

                                                            Method raftProxyRaftMembershipServer.Leave has 9 return statements (exceeds 4 allowed).
                                                            Open

                                                            func (p *raftProxyRaftMembershipServer) Leave(ctx context.Context, r *LeaveRequest) (*LeaveResponse, error) {
                                                            
                                                                conn, err := p.connSelector.LeaderConn(ctx)
                                                                if err != nil {
                                                                    if err == raftselector.ErrIsLeader {
                                                            Severity: Major
                                                            Found in api/raft.pb.go - About 55 mins to fix

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

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

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

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

                                                                  Method raftProxyRaftServer.ProcessRaftMessage has 9 return statements (exceeds 4 allowed).
                                                                  Open

                                                                  func (p *raftProxyRaftServer) ProcessRaftMessage(ctx context.Context, r *ProcessRaftMessageRequest) (*ProcessRaftMessageResponse, error) {
                                                                  
                                                                      conn, err := p.connSelector.LeaderConn(ctx)
                                                                      if err != nil {
                                                                          if err == raftselector.ErrIsLeader {
                                                                  Severity: Major
                                                                  Found in api/raft.pb.go - About 55 mins to fix

                                                                    Avoid deeply nested control flow statements.
                                                                    Open

                                                                                    if elementCount != 0 && len(m.RemovedMembers) == 0 {
                                                                                        m.RemovedMembers = make([]uint64, 0, elementCount)
                                                                                    }
                                                                    Severity: Major
                                                                    Found in api/raft.pb.go - About 45 mins to fix

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

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

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

                                                                                        for iNdEx < postIndex {
                                                                                            var v uint64
                                                                                            for shift := uint(0); ; shift += 7 {
                                                                                                if shift >= 64 {
                                                                                                    return ErrIntOverflowRaft
                                                                        Severity: Major
                                                                        Found in api/raft.pb.go - About 45 mins to fix

                                                                          Avoid deeply nested control flow statements.
                                                                          Open

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

                                                                            Avoid deeply nested control flow statements.
                                                                            Open

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

                                                                              Avoid deeply nested control flow statements.
                                                                              Open

                                                                                                  if integer < 128 {
                                                                                                      count++
                                                                                                  }
                                                                              Severity: Major
                                                                              Found in api/raft.pb.go - About 45 mins to fix

                                                                                Avoid deeply nested control flow statements.
                                                                                Open

                                                                                                if postIndex < 0 {
                                                                                                    return ErrInvalidLengthRaft
                                                                                                }
                                                                                Severity: Major
                                                                                Found in api/raft.pb.go - About 45 mins to fix

                                                                                  Avoid deeply nested control flow statements.
                                                                                  Open

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

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

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

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                      if packedLen < 0 {
                                                                                                          return ErrInvalidLengthRaft
                                                                                                      }
                                                                                      Severity: Major
                                                                                      Found in api/raft.pb.go - About 45 mins to fix

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

                                                                                        func (m *StoreAction) CopyFrom(src interface{}) {
                                                                                        
                                                                                            o := src.(*StoreAction)
                                                                                            *m = *o
                                                                                            if o.Target != nil {
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 1 other location - About 1 day to fix
                                                                                        api/watch.pb.go on lines 913..982

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 636.

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

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

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

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

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 599.

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

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

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

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

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 599.

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

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

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

                                                                                        See codeclimate-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 *JoinRequest) Unmarshal(dAtA []byte) error {
                                                                                            l := len(dAtA)
                                                                                            iNdEx := 0
                                                                                            for iNdEx < l {
                                                                                                preIndex := iNdEx
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 10 other locations - About 1 day to fix
                                                                                        api/ca.pb.go on lines 1585..1666
                                                                                        api/dispatcher.pb.go on lines 3672..3753
                                                                                        api/dispatcher.pb.go on lines 4389..4470
                                                                                        api/dispatcher.pb.go on lines 4555..4636
                                                                                        api/health.pb.go on lines 538..619
                                                                                        api/raft.pb.go on lines 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 *ResolveAddressResponse) Unmarshal(dAtA []byte) error {
                                                                                            l := len(dAtA)
                                                                                            iNdEx := 0
                                                                                            for iNdEx < l {
                                                                                                preIndex := iNdEx
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 10 other locations - About 1 day to fix
                                                                                        api/ca.pb.go on lines 1585..1666
                                                                                        api/dispatcher.pb.go on lines 3672..3753
                                                                                        api/dispatcher.pb.go on lines 4389..4470
                                                                                        api/dispatcher.pb.go on lines 4555..4636
                                                                                        api/health.pb.go on lines 538..619
                                                                                        api/raft.pb.go on lines 3154..3235
                                                                                        api/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 2 locations. Consider refactoring.
                                                                                        Open

                                                                                                case 3:
                                                                                                    if wireType == 0 {
                                                                                                        var v uint64
                                                                                                        for shift := uint(0); ; shift += 7 {
                                                                                                            if shift >= 64 {
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 1 other location - About 7 hrs to fix
                                                                                        api/snapshot.pb.go on lines 1296..1371

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 530.

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

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

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

                                                                                        See codeclimate-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 skipRaft(dAtA []byte) (n int, err error) {
                                                                                            l := len(dAtA)
                                                                                            iNdEx := 0
                                                                                            depth := 0
                                                                                            for iNdEx < l {
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 10 other locations - About 6 hrs to fix
                                                                                        api/ca.pb.go on lines 2345..2422
                                                                                        api/dispatcher.pb.go on lines 5099..5176
                                                                                        api/health.pb.go on lines 689..766
                                                                                        api/logbroker.pb.go on lines 3809..3886
                                                                                        api/objects.pb.go on lines 10049..10126
                                                                                        api/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 3 locations. Consider refactoring.
                                                                                        Open

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

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 478.

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

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

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

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

                                                                                        Refactorings

                                                                                        Further Reading

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

                                                                                        func NewRaftProxyRaftServer(local RaftServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) RaftServer {
                                                                                            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/raft.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/dispatcher.pb.go on lines 2449..2480
                                                                                        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 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 10 locations. Consider refactoring.
                                                                                        Open

                                                                                        func NewRaftProxyRaftMembershipServer(local RaftMembershipServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) RaftMembershipServer {
                                                                                            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/raft.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/dispatcher.pb.go on lines 2449..2480
                                                                                        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/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 *raftProxyRaftMembershipServer) Join(ctx context.Context, r *JoinRequest) (*JoinResponse, error) {
                                                                                        
                                                                                            conn, err := p.connSelector.LeaderConn(ctx)
                                                                                            if err != nil {
                                                                                                if err == raftselector.ErrIsLeader {
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/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 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 *raftProxyRaftServer) ResolveAddress(ctx context.Context, r *ResolveAddressRequest) (*ResolveAddressResponse, error) {
                                                                                        
                                                                                            conn, err := p.connSelector.LeaderConn(ctx)
                                                                                            if err != nil {
                                                                                                if err == raftselector.ErrIsLeader {
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/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 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 *raftProxyRaftServer) ProcessRaftMessage(ctx context.Context, r *ProcessRaftMessageRequest) (*ProcessRaftMessageResponse, error) {
                                                                                        
                                                                                            conn, err := p.connSelector.LeaderConn(ctx)
                                                                                            if err != nil {
                                                                                                if err == raftselector.ErrIsLeader {
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/dispatcher.pb.go on lines 2636..2669
                                                                                        api/health.pb.go on lines 444..477
                                                                                        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 *raftProxyRaftMembershipServer) Leave(ctx context.Context, r *LeaveRequest) (*LeaveResponse, error) {
                                                                                        
                                                                                            conn, err := p.connSelector.LeaderConn(ctx)
                                                                                            if err != nil {
                                                                                                if err == raftselector.ErrIsLeader {
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/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/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 *StreamRaftMessageResponse) Unmarshal(dAtA []byte) error {
                                                                                            l := len(dAtA)
                                                                                            iNdEx := 0
                                                                                            for iNdEx < l {
                                                                                                preIndex := iNdEx
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 11 other locations - About 4 hrs to fix
                                                                                        api/ca.pb.go on lines 2044..2093
                                                                                        api/ca.pb.go on lines 2178..2227
                                                                                        api/dispatcher.pb.go on lines 4071..4120
                                                                                        api/dispatcher.pb.go on lines 4339..4388
                                                                                        api/logbroker.pb.go on lines 3399..3448
                                                                                        api/logbroker.pb.go on lines 3759..3808
                                                                                        api/raft.pb.go on lines 3501..3550
                                                                                        api/raft.pb.go on lines 3637..3686
                                                                                        api/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 *LeaveResponse) Unmarshal(dAtA []byte) error {
                                                                                            l := len(dAtA)
                                                                                            iNdEx := 0
                                                                                            for iNdEx < l {
                                                                                                preIndex := iNdEx
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 11 other locations - About 4 hrs to fix
                                                                                        api/ca.pb.go on lines 2044..2093
                                                                                        api/ca.pb.go on lines 2178..2227
                                                                                        api/dispatcher.pb.go on lines 4071..4120
                                                                                        api/dispatcher.pb.go on lines 4339..4388
                                                                                        api/logbroker.pb.go on lines 3399..3448
                                                                                        api/logbroker.pb.go on lines 3759..3808
                                                                                        api/raft.pb.go on lines 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 *ProcessRaftMessageResponse) Unmarshal(dAtA []byte) error {
                                                                                            l := len(dAtA)
                                                                                            iNdEx := 0
                                                                                            for iNdEx < l {
                                                                                                preIndex := iNdEx
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 11 other locations - About 4 hrs to fix
                                                                                        api/ca.pb.go on lines 2044..2093
                                                                                        api/ca.pb.go on lines 2178..2227
                                                                                        api/dispatcher.pb.go on lines 4071..4120
                                                                                        api/dispatcher.pb.go on lines 4339..4388
                                                                                        api/logbroker.pb.go on lines 3399..3448
                                                                                        api/logbroker.pb.go on lines 3759..3808
                                                                                        api/raft.pb.go on lines 3501..3550
                                                                                        api/raft.pb.go on lines 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 2 locations. Consider refactoring.
                                                                                        Open

                                                                                        func (p *raftProxyRaftServer) StreamRaftMessage(stream Raft_StreamRaftMessageServer) error {
                                                                                            ctx := stream.Context()
                                                                                            conn, err := p.connSelector.LeaderConn(ctx)
                                                                                            if err != nil {
                                                                                                if err == raftselector.ErrIsLeader {
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 1 other location - About 4 hrs to fix
                                                                                        api/logbroker.pb.go on lines 1971..2017

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 323.

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

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

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

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

                                                                                        Refactorings

                                                                                        Further Reading

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

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

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 255.

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

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

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

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

                                                                                        Refactorings

                                                                                        Further Reading

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

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

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 246.

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

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

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

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

                                                                                        Refactorings

                                                                                        Further Reading

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

                                                                                                case 11:
                                                                                                    if wireType != 2 {
                                                                                                        return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType)
                                                                                                    }
                                                                                                    var msglen int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
                                                                                        api/dispatcher.pb.go on lines 4666..4700
                                                                                        api/dispatcher.pb.go on lines 4701..4735
                                                                                        api/dispatcher.pb.go on lines 4736..4770
                                                                                        api/dispatcher.pb.go on lines 4771..4805
                                                                                        api/raft.pb.go on lines 4125..4159
                                                                                        api/raft.pb.go on lines 4160..4194
                                                                                        api/raft.pb.go on lines 4195..4229
                                                                                        api/raft.pb.go on lines 4230..4264
                                                                                        api/raft.pb.go on lines 4265..4299
                                                                                        api/raft.pb.go on lines 4300..4334
                                                                                        api/raft.pb.go on lines 4335..4369
                                                                                        api/raft.pb.go on lines 4370..4404
                                                                                        api/raft.pb.go on lines 4405..4439
                                                                                        api/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 7:
                                                                                                    if wireType != 2 {
                                                                                                        return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
                                                                                                    }
                                                                                                    var msglen int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
                                                                                        api/dispatcher.pb.go on lines 4666..4700
                                                                                        api/dispatcher.pb.go on lines 4701..4735
                                                                                        api/dispatcher.pb.go on lines 4736..4770
                                                                                        api/dispatcher.pb.go on lines 4771..4805
                                                                                        api/raft.pb.go on lines 4125..4159
                                                                                        api/raft.pb.go on lines 4160..4194
                                                                                        api/raft.pb.go on lines 4195..4229
                                                                                        api/raft.pb.go on lines 4230..4264
                                                                                        api/raft.pb.go on lines 4265..4299
                                                                                        api/raft.pb.go on lines 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 Node", wireType)
                                                                                                    }
                                                                                                    var msglen int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
                                                                                        api/dispatcher.pb.go on lines 4666..4700
                                                                                        api/dispatcher.pb.go on lines 4701..4735
                                                                                        api/dispatcher.pb.go on lines 4736..4770
                                                                                        api/dispatcher.pb.go on lines 4771..4805
                                                                                        api/raft.pb.go on lines 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 Service", wireType)
                                                                                                    }
                                                                                                    var msglen int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
                                                                                        api/dispatcher.pb.go on lines 4666..4700
                                                                                        api/dispatcher.pb.go on lines 4701..4735
                                                                                        api/dispatcher.pb.go on lines 4736..4770
                                                                                        api/dispatcher.pb.go on lines 4771..4805
                                                                                        api/raft.pb.go on lines 4125..4159
                                                                                        api/raft.pb.go on lines 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 8:
                                                                                                    if wireType != 2 {
                                                                                                        return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
                                                                                                    }
                                                                                                    var msglen int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
                                                                                        api/dispatcher.pb.go on lines 4666..4700
                                                                                        api/dispatcher.pb.go on lines 4701..4735
                                                                                        api/dispatcher.pb.go on lines 4736..4770
                                                                                        api/dispatcher.pb.go on lines 4771..4805
                                                                                        api/raft.pb.go on lines 4125..4159
                                                                                        api/raft.pb.go on lines 4160..4194
                                                                                        api/raft.pb.go on lines 4195..4229
                                                                                        api/raft.pb.go on lines 4230..4264
                                                                                        api/raft.pb.go on lines 4265..4299
                                                                                        api/raft.pb.go on lines 4300..4334
                                                                                        api/raft.pb.go on lines 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 9:
                                                                                                    if wireType != 2 {
                                                                                                        return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType)
                                                                                                    }
                                                                                                    var msglen int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
                                                                                        api/dispatcher.pb.go on lines 4666..4700
                                                                                        api/dispatcher.pb.go on lines 4701..4735
                                                                                        api/dispatcher.pb.go on lines 4736..4770
                                                                                        api/dispatcher.pb.go on lines 4771..4805
                                                                                        api/raft.pb.go on lines 4125..4159
                                                                                        api/raft.pb.go on lines 4160..4194
                                                                                        api/raft.pb.go on lines 4195..4229
                                                                                        api/raft.pb.go on lines 4230..4264
                                                                                        api/raft.pb.go on lines 4265..4299
                                                                                        api/raft.pb.go on lines 4300..4334
                                                                                        api/raft.pb.go on lines 4335..4369
                                                                                        api/raft.pb.go on lines 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 Task", wireType)
                                                                                                    }
                                                                                                    var msglen int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
                                                                                        api/dispatcher.pb.go on lines 4666..4700
                                                                                        api/dispatcher.pb.go on lines 4701..4735
                                                                                        api/dispatcher.pb.go on lines 4736..4770
                                                                                        api/dispatcher.pb.go on lines 4771..4805
                                                                                        api/raft.pb.go on lines 4125..4159
                                                                                        api/raft.pb.go on lines 4160..4194
                                                                                        api/raft.pb.go on lines 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 10:
                                                                                                    if wireType != 2 {
                                                                                                        return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
                                                                                                    }
                                                                                                    var msglen int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
                                                                                        api/dispatcher.pb.go on lines 4666..4700
                                                                                        api/dispatcher.pb.go on lines 4701..4735
                                                                                        api/dispatcher.pb.go on lines 4736..4770
                                                                                        api/dispatcher.pb.go on lines 4771..4805
                                                                                        api/raft.pb.go on lines 4125..4159
                                                                                        api/raft.pb.go on lines 4160..4194
                                                                                        api/raft.pb.go on lines 4195..4229
                                                                                        api/raft.pb.go on lines 4230..4264
                                                                                        api/raft.pb.go on lines 4265..4299
                                                                                        api/raft.pb.go on lines 4300..4334
                                                                                        api/raft.pb.go on lines 4335..4369
                                                                                        api/raft.pb.go on lines 4370..4404
                                                                                        api/raft.pb.go on lines 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 5:
                                                                                                    if wireType != 2 {
                                                                                                        return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
                                                                                                    }
                                                                                                    var msglen int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
                                                                                        api/dispatcher.pb.go on lines 4666..4700
                                                                                        api/dispatcher.pb.go on lines 4701..4735
                                                                                        api/dispatcher.pb.go on lines 4736..4770
                                                                                        api/dispatcher.pb.go on lines 4771..4805
                                                                                        api/raft.pb.go on lines 4125..4159
                                                                                        api/raft.pb.go on lines 4160..4194
                                                                                        api/raft.pb.go on lines 4195..4229
                                                                                        api/raft.pb.go on lines 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 6:
                                                                                                    if wireType != 2 {
                                                                                                        return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType)
                                                                                                    }
                                                                                                    var msglen int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 2 hrs to fix
                                                                                        api/dispatcher.pb.go on lines 4666..4700
                                                                                        api/dispatcher.pb.go on lines 4701..4735
                                                                                        api/dispatcher.pb.go on lines 4736..4770
                                                                                        api/dispatcher.pb.go on lines 4771..4805
                                                                                        api/raft.pb.go on lines 4125..4159
                                                                                        api/raft.pb.go on lines 4160..4194
                                                                                        api/raft.pb.go on lines 4195..4229
                                                                                        api/raft.pb.go on lines 4230..4264
                                                                                        api/raft.pb.go on lines 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 14 locations. Consider refactoring.
                                                                                        Open

                                                                                        func _RaftMembership_Leave_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
                                                                                            in := new(LeaveRequest)
                                                                                            if err := dec(in); err != nil {
                                                                                                return nil, err
                                                                                            }
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/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/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 _RaftMembership_Join_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
                                                                                            in := new(JoinRequest)
                                                                                            if err := dec(in); err != nil {
                                                                                                return nil, err
                                                                                            }
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/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 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 _Raft_ProcessRaftMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
                                                                                            in := new(ProcessRaftMessageRequest)
                                                                                            if err := dec(in); err != nil {
                                                                                                return nil, err
                                                                                            }
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/dispatcher.pb.go on lines 1629..1645
                                                                                        api/health.pb.go on lines 271..287
                                                                                        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 _Raft_ResolveAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
                                                                                            in := new(ResolveAddressRequest)
                                                                                            if err := dec(in); err != nil {
                                                                                                return nil, err
                                                                                            }
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/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 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 47 locations. Consider refactoring.
                                                                                        Open

                                                                                                case 4:
                                                                                                    if wireType != 2 {
                                                                                                        return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
                                                                                                    }
                                                                                                    var msglen int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 46 other locations - About 2 hrs to fix
                                                                                        api/ca.pb.go on lines 2291..2323
                                                                                        api/logbroker.pb.go on lines 3016..3048
                                                                                        api/objects.pb.go on lines 6328..6360
                                                                                        api/objects.pb.go on lines 6515..6547
                                                                                        api/objects.pb.go on lines 6548..6580
                                                                                        api/objects.pb.go on lines 6617..6649
                                                                                        api/objects.pb.go on lines 6722..6754
                                                                                        api/objects.pb.go on lines 6909..6941
                                                                                        api/objects.pb.go on lines 6942..6974
                                                                                        api/objects.pb.go on lines 7561..7593
                                                                                        api/objects.pb.go on lines 7594..7626
                                                                                        api/objects.pb.go on lines 7710..7742
                                                                                        api/objects.pb.go on lines 7743..7775
                                                                                        api/objects.pb.go on lines 7776..7808
                                                                                        api/objects.pb.go on lines 8433..8465
                                                                                        api/objects.pb.go on lines 8466..8498
                                                                                        api/objects.pb.go on lines 8673..8705
                                                                                        api/objects.pb.go on lines 8706..8738
                                                                                        api/objects.pb.go on lines 8739..8771
                                                                                        api/objects.pb.go on lines 9160..9192
                                                                                        api/objects.pb.go on lines 9193..9225
                                                                                        api/objects.pb.go on lines 9328..9360
                                                                                        api/objects.pb.go on lines 9361..9393
                                                                                        api/objects.pb.go on lines 9476..9508
                                                                                        api/objects.pb.go on lines 9509..9541
                                                                                        api/objects.pb.go on lines 9692..9724
                                                                                        api/objects.pb.go on lines 9725..9757
                                                                                        api/objects.pb.go on lines 9872..9904
                                                                                        api/objects.pb.go on lines 9905..9937
                                                                                        api/snapshot.pb.go on lines 1441..1473
                                                                                        api/snapshot.pb.go on lines 1474..1506
                                                                                        api/specs.pb.go on lines 4925..4957
                                                                                        api/specs.pb.go on lines 5065..5097
                                                                                        api/specs.pb.go on lines 5098..5130
                                                                                        api/specs.pb.go on lines 8015..8047
                                                                                        api/specs.pb.go on lines 8282..8314
                                                                                        api/specs.pb.go on lines 8315..8347
                                                                                        api/specs.pb.go on lines 8348..8380
                                                                                        api/specs.pb.go on lines 8381..8413
                                                                                        api/specs.pb.go on lines 8414..8446
                                                                                        api/specs.pb.go on lines 8447..8479
                                                                                        api/specs.pb.go on lines 8480..8512
                                                                                        api/specs.pb.go on lines 8513..8545
                                                                                        api/specs.pb.go on lines 8596..8628
                                                                                        api/specs.pb.go on lines 8785..8817
                                                                                        api/specs.pb.go on lines 8938..8970

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 219.

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

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

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

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

                                                                                        Refactorings

                                                                                        Further Reading

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

                                                                                        func (p *raftProxyRaftMembershipServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
                                                                                            ticker := rafttime.NewTicker(500 * rafttime.Millisecond)
                                                                                            defer ticker.Stop()
                                                                                            for {
                                                                                                select {
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/dispatcher.pb.go on lines 2491..2513
                                                                                        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/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 10 locations. Consider refactoring.
                                                                                        Open

                                                                                        func (p *raftProxyRaftServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
                                                                                            ticker := rafttime.NewTicker(500 * rafttime.Millisecond)
                                                                                            defer ticker.Stop()
                                                                                            for {
                                                                                                select {
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/dispatcher.pb.go on lines 2491..2513
                                                                                        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 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 *JoinResponse) CopyFrom(src interface{}) {
                                                                                        
                                                                                            o := src.(*JoinResponse)
                                                                                            *m = *o
                                                                                            if o.Members != nil {
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 1 other location - About 2 hrs to fix
                                                                                        api/snapshot.pb.go on lines 325..342

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 199.

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

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

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

                                                                                        See codeclimate-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 *ProcessRaftMessageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                            i := len(dAtA)
                                                                                            _ = i
                                                                                            var l int
                                                                                            _ = l
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 2 other locations - About 1 hr to fix
                                                                                        api/raft.pb.go on lines 1568..1586
                                                                                        api/raft.pb.go on lines 1684..1702

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 161.

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

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

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

                                                                                        See codeclimate-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 *LeaveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                            i := len(dAtA)
                                                                                            _ = i
                                                                                            var l int
                                                                                            _ = l
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 2 other locations - About 1 hr to fix
                                                                                        api/raft.pb.go on lines 1626..1644
                                                                                        api/raft.pb.go on lines 1684..1702

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 161.

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

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

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

                                                                                        See codeclimate-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 *StreamRaftMessageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                            i := len(dAtA)
                                                                                            _ = i
                                                                                            var l int
                                                                                            _ = l
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 2 other locations - About 1 hr to fix
                                                                                        api/raft.pb.go on lines 1568..1586
                                                                                        api/raft.pb.go on lines 1626..1644

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 161.

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

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

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

                                                                                        See codeclimate-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 *JoinRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                            i := len(dAtA)
                                                                                            _ = i
                                                                                            var l int
                                                                                            _ = l
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 10 other locations - About 1 hr to fix
                                                                                        api/ca.pb.go on lines 816..829
                                                                                        api/ca.pb.go on lines 998..1011
                                                                                        api/dispatcher.pb.go on lines 1860..1873
                                                                                        api/dispatcher.pb.go on lines 2137..2150
                                                                                        api/dispatcher.pb.go on lines 2204..2217
                                                                                        api/health.pb.go on lines 317..330
                                                                                        api/raft.pb.go on lines 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 *ResolveAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                            i := len(dAtA)
                                                                                            _ = i
                                                                                            var l int
                                                                                            _ = l
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 10 other locations - About 1 hr to fix
                                                                                        api/ca.pb.go on lines 816..829
                                                                                        api/ca.pb.go on lines 998..1011
                                                                                        api/dispatcher.pb.go on lines 1860..1873
                                                                                        api/dispatcher.pb.go on lines 2137..2150
                                                                                        api/dispatcher.pb.go on lines 2204..2217
                                                                                        api/health.pb.go on lines 317..330
                                                                                        api/raft.pb.go on lines 1489..1502
                                                                                        api/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 *InternalRaftRequest) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 1 other location - About 1 hr to fix
                                                                                        api/specs.pb.go on lines 4291..4307

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 157.

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

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

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

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

                                                                                        Refactorings

                                                                                        Further Reading

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

                                                                                        func (m *StoreAction_Service) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                            i := len(dAtA)
                                                                                            if m.Service != nil {
                                                                                                {
                                                                                                    size, err := m.Service.MarshalToSizedBuffer(dAtA[:i])
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 1 hr to fix
                                                                                        api/dispatcher.pb.go on lines 2256..2271
                                                                                        api/dispatcher.pb.go on lines 2277..2292
                                                                                        api/dispatcher.pb.go on lines 2298..2313
                                                                                        api/dispatcher.pb.go on lines 2319..2334
                                                                                        api/raft.pb.go on lines 1869..1884
                                                                                        api/raft.pb.go on lines 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 *StoreAction_Cluster) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                            i := len(dAtA)
                                                                                            if m.Cluster != nil {
                                                                                                {
                                                                                                    size, err := m.Cluster.MarshalToSizedBuffer(dAtA[:i])
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 1 hr to fix
                                                                                        api/dispatcher.pb.go on lines 2256..2271
                                                                                        api/dispatcher.pb.go on lines 2277..2292
                                                                                        api/dispatcher.pb.go on lines 2298..2313
                                                                                        api/dispatcher.pb.go on lines 2319..2334
                                                                                        api/raft.pb.go on lines 1869..1884
                                                                                        api/raft.pb.go on lines 1890..1905
                                                                                        api/raft.pb.go on lines 1911..1926
                                                                                        api/raft.pb.go on lines 1932..1947
                                                                                        api/raft.pb.go on lines 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 *StoreAction_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/raft.pb.go and 33 other locations - About 1 hr to fix
                                                                                        api/dispatcher.pb.go on lines 2256..2271
                                                                                        api/dispatcher.pb.go on lines 2277..2292
                                                                                        api/dispatcher.pb.go on lines 2298..2313
                                                                                        api/dispatcher.pb.go on lines 2319..2334
                                                                                        api/raft.pb.go on lines 1869..1884
                                                                                        api/raft.pb.go on lines 1890..1905
                                                                                        api/raft.pb.go on lines 1911..1926
                                                                                        api/raft.pb.go on lines 1932..1947
                                                                                        api/raft.pb.go on lines 1953..1968
                                                                                        api/raft.pb.go on lines 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 *StoreAction_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/raft.pb.go and 33 other locations - About 1 hr to fix
                                                                                        api/dispatcher.pb.go on lines 2256..2271
                                                                                        api/dispatcher.pb.go on lines 2277..2292
                                                                                        api/dispatcher.pb.go on lines 2298..2313
                                                                                        api/dispatcher.pb.go on lines 2319..2334
                                                                                        api/raft.pb.go on lines 1869..1884
                                                                                        api/raft.pb.go on lines 1890..1905
                                                                                        api/raft.pb.go on lines 1911..1926
                                                                                        api/raft.pb.go on lines 1932..1947
                                                                                        api/raft.pb.go on lines 1953..1968
                                                                                        api/raft.pb.go on lines 1974..1989
                                                                                        api/raft.pb.go on lines 1995..2010
                                                                                        api/raft.pb.go on lines 2016..2031
                                                                                        api/raft.pb.go on lines 2037..2052
                                                                                        api/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 *StoreAction_Extension) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                            i := len(dAtA)
                                                                                            if m.Extension != nil {
                                                                                                {
                                                                                                    size, err := m.Extension.MarshalToSizedBuffer(dAtA[:i])
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 1 hr to fix
                                                                                        api/dispatcher.pb.go on lines 2256..2271
                                                                                        api/dispatcher.pb.go on lines 2277..2292
                                                                                        api/dispatcher.pb.go on lines 2298..2313
                                                                                        api/dispatcher.pb.go on lines 2319..2334
                                                                                        api/raft.pb.go on lines 1869..1884
                                                                                        api/raft.pb.go on lines 1890..1905
                                                                                        api/raft.pb.go on lines 1911..1926
                                                                                        api/raft.pb.go on lines 1932..1947
                                                                                        api/raft.pb.go on lines 1953..1968
                                                                                        api/raft.pb.go on lines 1974..1989
                                                                                        api/raft.pb.go on lines 1995..2010
                                                                                        api/raft.pb.go on lines 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 *StoreAction_Node) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                            i := len(dAtA)
                                                                                            if m.Node != nil {
                                                                                                {
                                                                                                    size, err := m.Node.MarshalToSizedBuffer(dAtA[:i])
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 1 hr to fix
                                                                                        api/dispatcher.pb.go on lines 2256..2271
                                                                                        api/dispatcher.pb.go on lines 2277..2292
                                                                                        api/dispatcher.pb.go on lines 2298..2313
                                                                                        api/dispatcher.pb.go on lines 2319..2334
                                                                                        api/raft.pb.go on lines 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 *StoreAction_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/raft.pb.go and 33 other locations - About 1 hr to fix
                                                                                        api/dispatcher.pb.go on lines 2256..2271
                                                                                        api/dispatcher.pb.go on lines 2277..2292
                                                                                        api/dispatcher.pb.go on lines 2298..2313
                                                                                        api/dispatcher.pb.go on lines 2319..2334
                                                                                        api/raft.pb.go on lines 1869..1884
                                                                                        api/raft.pb.go on lines 1890..1905
                                                                                        api/raft.pb.go on lines 1911..1926
                                                                                        api/raft.pb.go on lines 1932..1947
                                                                                        api/raft.pb.go on lines 1953..1968
                                                                                        api/raft.pb.go on lines 1974..1989
                                                                                        api/raft.pb.go on lines 1995..2010
                                                                                        api/raft.pb.go on lines 2016..2031
                                                                                        api/raft.pb.go on lines 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 *StoreAction_Network) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                            i := len(dAtA)
                                                                                            if m.Network != nil {
                                                                                                {
                                                                                                    size, err := m.Network.MarshalToSizedBuffer(dAtA[:i])
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 1 hr to fix
                                                                                        api/dispatcher.pb.go on lines 2256..2271
                                                                                        api/dispatcher.pb.go on lines 2277..2292
                                                                                        api/dispatcher.pb.go on lines 2298..2313
                                                                                        api/dispatcher.pb.go on lines 2319..2334
                                                                                        api/raft.pb.go on lines 1869..1884
                                                                                        api/raft.pb.go on lines 1890..1905
                                                                                        api/raft.pb.go on lines 1911..1926
                                                                                        api/raft.pb.go on lines 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 *StoreAction_Resource) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                            i := len(dAtA)
                                                                                            if m.Resource != nil {
                                                                                                {
                                                                                                    size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i])
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 33 other locations - About 1 hr to fix
                                                                                        api/dispatcher.pb.go on lines 2256..2271
                                                                                        api/dispatcher.pb.go on lines 2277..2292
                                                                                        api/dispatcher.pb.go on lines 2298..2313
                                                                                        api/dispatcher.pb.go on lines 2319..2334
                                                                                        api/raft.pb.go on lines 1869..1884
                                                                                        api/raft.pb.go on lines 1890..1905
                                                                                        api/raft.pb.go on lines 1911..1926
                                                                                        api/raft.pb.go on lines 1932..1947
                                                                                        api/raft.pb.go on lines 1953..1968
                                                                                        api/raft.pb.go on lines 1974..1989
                                                                                        api/raft.pb.go on lines 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 *StoreAction_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/raft.pb.go and 33 other locations - About 1 hr to fix
                                                                                        api/dispatcher.pb.go on lines 2256..2271
                                                                                        api/dispatcher.pb.go on lines 2277..2292
                                                                                        api/dispatcher.pb.go on lines 2298..2313
                                                                                        api/dispatcher.pb.go on lines 2319..2334
                                                                                        api/raft.pb.go on lines 1869..1884
                                                                                        api/raft.pb.go on lines 1890..1905
                                                                                        api/raft.pb.go on lines 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 2 locations. Consider refactoring.
                                                                                        Open

                                                                                        func (*StoreAction) XXX_OneofWrappers() []interface{} {
                                                                                            return []interface{}{
                                                                                                (*StoreAction_Node)(nil),
                                                                                                (*StoreAction_Service)(nil),
                                                                                                (*StoreAction_Task)(nil),
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 1 other location - About 1 hr to fix
                                                                                        api/watch.pb.go on lines 245..258

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 132.

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

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

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

                                                                                        See codeclimate-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 *InternalRaftRequest) CopyFrom(src interface{}) {
                                                                                        
                                                                                            o := src.(*InternalRaftRequest)
                                                                                            *m = *o
                                                                                            if o.Action != nil {
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 2 other locations - About 1 hr to fix
                                                                                        api/logbroker.pb.go on lines 816..827
                                                                                        api/logbroker.pb.go on lines 871..882

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 130.

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

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

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

                                                                                        See codeclimate-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 *ResolveAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                                            i := len(dAtA)
                                                                                            _ = i
                                                                                            var l int
                                                                                            _ = l
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 2 other locations - About 50 mins to fix
                                                                                        api/health.pb.go on lines 347..358
                                                                                        api/specs.pb.go on lines 2449..2460

                                                                                        Duplicated Code

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

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

                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 *raftProxyRaftMembershipServer) 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/raft.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/dispatcher.pb.go on lines 2481..2490
                                                                                        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/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 10 locations. Consider refactoring.
                                                                                        Open

                                                                                        func (p *raftProxyRaftServer) 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/raft.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/dispatcher.pb.go on lines 2481..2490
                                                                                        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 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 102 locations. Consider refactoring.
                                                                                        Open

                                                                                        func (m *LeaveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                            if deterministic {
                                                                                                return xxx_messageInfo_LeaveRequest.Marshal(b, m, deterministic)
                                                                                            } else {
                                                                                                b = b[:cap(b)]
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
                                                                                        api/ca.pb.go on lines 50..61
                                                                                        api/ca.pb.go on lines 87..98
                                                                                        api/ca.pb.go on lines 131..142
                                                                                        api/ca.pb.go on lines 168..179
                                                                                        api/ca.pb.go on lines 203..214
                                                                                        api/ca.pb.go on lines 239..250
                                                                                        api/ca.pb.go on lines 274..285
                                                                                        api/ca.pb.go on lines 311..322
                                                                                        api/dispatcher.pb.go on lines 112..123
                                                                                        api/dispatcher.pb.go on lines 202..213
                                                                                        api/dispatcher.pb.go on lines 239..250
                                                                                        api/dispatcher.pb.go on lines 277..288
                                                                                        api/dispatcher.pb.go on lines 316..327
                                                                                        api/dispatcher.pb.go on lines 355..366
                                                                                        api/dispatcher.pb.go on lines 390..401
                                                                                        api/dispatcher.pb.go on lines 427..438
                                                                                        api/dispatcher.pb.go on lines 476..487
                                                                                        api/dispatcher.pb.go on lines 511..522
                                                                                        api/dispatcher.pb.go on lines 547..558
                                                                                        api/dispatcher.pb.go on lines 585..596
                                                                                        api/dispatcher.pb.go on lines 621..632
                                                                                        api/dispatcher.pb.go on lines 662..673
                                                                                        api/dispatcher.pb.go on lines 768..779
                                                                                        api/dispatcher.pb.go on lines 816..827
                                                                                        api/health.pb.go on lines 77..88
                                                                                        api/health.pb.go on lines 113..124
                                                                                        api/logbroker.pb.go on lines 105..116
                                                                                        api/logbroker.pb.go on lines 148..159
                                                                                        api/logbroker.pb.go on lines 187..198
                                                                                        api/logbroker.pb.go on lines 225..236
                                                                                        api/logbroker.pb.go on lines 273..284
                                                                                        api/logbroker.pb.go on lines 311..322
                                                                                        api/logbroker.pb.go on lines 347..358
                                                                                        api/logbroker.pb.go on lines 384..395
                                                                                        api/logbroker.pb.go on lines 432..443
                                                                                        api/logbroker.pb.go on lines 477..488
                                                                                        api/logbroker.pb.go on lines 512..523
                                                                                        api/objects.pb.go on lines 51..62
                                                                                        api/objects.pb.go on lines 123..134
                                                                                        api/objects.pb.go on lines 190..201
                                                                                        api/objects.pb.go on lines 235..246
                                                                                        api/objects.pb.go on lines 283..294
                                                                                        api/objects.pb.go on lines 382..393
                                                                                        api/objects.pb.go on lines 430..441
                                                                                        api/objects.pb.go on lines 486..497
                                                                                        api/objects.pb.go on lines 558..569
                                                                                        api/objects.pb.go on lines 602..613
                                                                                        api/objects.pb.go on lines 644..655
                                                                                        api/objects.pb.go on lines 692..703
                                                                                        api/objects.pb.go on lines 733..744
                                                                                        api/objects.pb.go on lines 790..801
                                                                                        api/raft.pb.go on lines 90..101
                                                                                        api/raft.pb.go on lines 127..138
                                                                                        api/raft.pb.go on lines 169..180
                                                                                        api/raft.pb.go on lines 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 *RaftMember) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                            if deterministic {
                                                                                                return xxx_messageInfo_RaftMember.Marshal(b, m, deterministic)
                                                                                            } else {
                                                                                                b = b[:cap(b)]
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
                                                                                        api/ca.pb.go on lines 50..61
                                                                                        api/ca.pb.go on lines 87..98
                                                                                        api/ca.pb.go on lines 131..142
                                                                                        api/ca.pb.go on lines 168..179
                                                                                        api/ca.pb.go on lines 203..214
                                                                                        api/ca.pb.go on lines 239..250
                                                                                        api/ca.pb.go on lines 274..285
                                                                                        api/ca.pb.go on lines 311..322
                                                                                        api/dispatcher.pb.go on lines 112..123
                                                                                        api/dispatcher.pb.go on lines 202..213
                                                                                        api/dispatcher.pb.go on lines 239..250
                                                                                        api/dispatcher.pb.go on lines 277..288
                                                                                        api/dispatcher.pb.go on lines 316..327
                                                                                        api/dispatcher.pb.go on lines 355..366
                                                                                        api/dispatcher.pb.go on lines 390..401
                                                                                        api/dispatcher.pb.go on lines 427..438
                                                                                        api/dispatcher.pb.go on lines 476..487
                                                                                        api/dispatcher.pb.go on lines 511..522
                                                                                        api/dispatcher.pb.go on lines 547..558
                                                                                        api/dispatcher.pb.go on lines 585..596
                                                                                        api/dispatcher.pb.go on lines 621..632
                                                                                        api/dispatcher.pb.go on lines 662..673
                                                                                        api/dispatcher.pb.go on lines 768..779
                                                                                        api/dispatcher.pb.go on lines 816..827
                                                                                        api/health.pb.go on lines 77..88
                                                                                        api/health.pb.go on lines 113..124
                                                                                        api/logbroker.pb.go on lines 105..116
                                                                                        api/logbroker.pb.go on lines 148..159
                                                                                        api/logbroker.pb.go on lines 187..198
                                                                                        api/logbroker.pb.go on lines 225..236
                                                                                        api/logbroker.pb.go on lines 273..284
                                                                                        api/logbroker.pb.go on lines 311..322
                                                                                        api/logbroker.pb.go on lines 347..358
                                                                                        api/logbroker.pb.go on lines 384..395
                                                                                        api/logbroker.pb.go on lines 432..443
                                                                                        api/logbroker.pb.go on lines 477..488
                                                                                        api/logbroker.pb.go on lines 512..523
                                                                                        api/objects.pb.go on lines 51..62
                                                                                        api/objects.pb.go on lines 123..134
                                                                                        api/objects.pb.go on lines 190..201
                                                                                        api/objects.pb.go on lines 235..246
                                                                                        api/objects.pb.go on lines 283..294
                                                                                        api/objects.pb.go on lines 382..393
                                                                                        api/objects.pb.go on lines 430..441
                                                                                        api/objects.pb.go on lines 486..497
                                                                                        api/objects.pb.go on lines 558..569
                                                                                        api/objects.pb.go on lines 602..613
                                                                                        api/objects.pb.go on lines 644..655
                                                                                        api/objects.pb.go on lines 692..703
                                                                                        api/objects.pb.go on lines 733..744
                                                                                        api/objects.pb.go on lines 790..801
                                                                                        api/raft.pb.go on lines 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 *StreamRaftMessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                            if deterministic {
                                                                                                return xxx_messageInfo_StreamRaftMessageResponse.Marshal(b, m, deterministic)
                                                                                            } else {
                                                                                                b = b[:cap(b)]
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
                                                                                        api/ca.pb.go on lines 50..61
                                                                                        api/ca.pb.go on lines 87..98
                                                                                        api/ca.pb.go on lines 131..142
                                                                                        api/ca.pb.go on lines 168..179
                                                                                        api/ca.pb.go on lines 203..214
                                                                                        api/ca.pb.go on lines 239..250
                                                                                        api/ca.pb.go on lines 274..285
                                                                                        api/ca.pb.go on lines 311..322
                                                                                        api/dispatcher.pb.go on lines 112..123
                                                                                        api/dispatcher.pb.go on lines 202..213
                                                                                        api/dispatcher.pb.go on lines 239..250
                                                                                        api/dispatcher.pb.go on lines 277..288
                                                                                        api/dispatcher.pb.go on lines 316..327
                                                                                        api/dispatcher.pb.go on lines 355..366
                                                                                        api/dispatcher.pb.go on lines 390..401
                                                                                        api/dispatcher.pb.go on lines 427..438
                                                                                        api/dispatcher.pb.go on lines 476..487
                                                                                        api/dispatcher.pb.go on lines 511..522
                                                                                        api/dispatcher.pb.go on lines 547..558
                                                                                        api/dispatcher.pb.go on lines 585..596
                                                                                        api/dispatcher.pb.go on lines 621..632
                                                                                        api/dispatcher.pb.go on lines 662..673
                                                                                        api/dispatcher.pb.go on lines 768..779
                                                                                        api/dispatcher.pb.go on lines 816..827
                                                                                        api/health.pb.go on lines 77..88
                                                                                        api/health.pb.go on lines 113..124
                                                                                        api/logbroker.pb.go on lines 105..116
                                                                                        api/logbroker.pb.go on lines 148..159
                                                                                        api/logbroker.pb.go on lines 187..198
                                                                                        api/logbroker.pb.go on lines 225..236
                                                                                        api/logbroker.pb.go on lines 273..284
                                                                                        api/logbroker.pb.go on lines 311..322
                                                                                        api/logbroker.pb.go on lines 347..358
                                                                                        api/logbroker.pb.go on lines 384..395
                                                                                        api/logbroker.pb.go on lines 432..443
                                                                                        api/logbroker.pb.go on lines 477..488
                                                                                        api/logbroker.pb.go on lines 512..523
                                                                                        api/objects.pb.go on lines 51..62
                                                                                        api/objects.pb.go on lines 123..134
                                                                                        api/objects.pb.go on lines 190..201
                                                                                        api/objects.pb.go on lines 235..246
                                                                                        api/objects.pb.go on lines 283..294
                                                                                        api/objects.pb.go on lines 382..393
                                                                                        api/objects.pb.go on lines 430..441
                                                                                        api/objects.pb.go on lines 486..497
                                                                                        api/objects.pb.go on lines 558..569
                                                                                        api/objects.pb.go on lines 602..613
                                                                                        api/objects.pb.go on lines 644..655
                                                                                        api/objects.pb.go on lines 692..703
                                                                                        api/objects.pb.go on lines 733..744
                                                                                        api/objects.pb.go on lines 790..801
                                                                                        api/raft.pb.go on lines 90..101
                                                                                        api/raft.pb.go on lines 127..138
                                                                                        api/raft.pb.go on lines 169..180
                                                                                        api/raft.pb.go on lines 205..216
                                                                                        api/raft.pb.go on lines 240..251
                                                                                        api/raft.pb.go on lines 276..287
                                                                                        api/raft.pb.go on lines 311..322
                                                                                        api/raft.pb.go on lines 348..359
                                                                                        api/raft.pb.go on lines 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 *ProcessRaftMessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                            if deterministic {
                                                                                                return xxx_messageInfo_ProcessRaftMessageResponse.Marshal(b, m, deterministic)
                                                                                            } else {
                                                                                                b = b[:cap(b)]
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
                                                                                        api/ca.pb.go on lines 50..61
                                                                                        api/ca.pb.go on lines 87..98
                                                                                        api/ca.pb.go on lines 131..142
                                                                                        api/ca.pb.go on lines 168..179
                                                                                        api/ca.pb.go on lines 203..214
                                                                                        api/ca.pb.go on lines 239..250
                                                                                        api/ca.pb.go on lines 274..285
                                                                                        api/ca.pb.go on lines 311..322
                                                                                        api/dispatcher.pb.go on lines 112..123
                                                                                        api/dispatcher.pb.go on lines 202..213
                                                                                        api/dispatcher.pb.go on lines 239..250
                                                                                        api/dispatcher.pb.go on lines 277..288
                                                                                        api/dispatcher.pb.go on lines 316..327
                                                                                        api/dispatcher.pb.go on lines 355..366
                                                                                        api/dispatcher.pb.go on lines 390..401
                                                                                        api/dispatcher.pb.go on lines 427..438
                                                                                        api/dispatcher.pb.go on lines 476..487
                                                                                        api/dispatcher.pb.go on lines 511..522
                                                                                        api/dispatcher.pb.go on lines 547..558
                                                                                        api/dispatcher.pb.go on lines 585..596
                                                                                        api/dispatcher.pb.go on lines 621..632
                                                                                        api/dispatcher.pb.go on lines 662..673
                                                                                        api/dispatcher.pb.go on lines 768..779
                                                                                        api/dispatcher.pb.go on lines 816..827
                                                                                        api/health.pb.go on lines 77..88
                                                                                        api/health.pb.go on lines 113..124
                                                                                        api/logbroker.pb.go on lines 105..116
                                                                                        api/logbroker.pb.go on lines 148..159
                                                                                        api/logbroker.pb.go on lines 187..198
                                                                                        api/logbroker.pb.go on lines 225..236
                                                                                        api/logbroker.pb.go on lines 273..284
                                                                                        api/logbroker.pb.go on lines 311..322
                                                                                        api/logbroker.pb.go on lines 347..358
                                                                                        api/logbroker.pb.go on lines 384..395
                                                                                        api/logbroker.pb.go on lines 432..443
                                                                                        api/logbroker.pb.go on lines 477..488
                                                                                        api/logbroker.pb.go on lines 512..523
                                                                                        api/objects.pb.go on lines 51..62
                                                                                        api/objects.pb.go on lines 123..134
                                                                                        api/objects.pb.go on lines 190..201
                                                                                        api/objects.pb.go on lines 235..246
                                                                                        api/objects.pb.go on lines 283..294
                                                                                        api/objects.pb.go on lines 382..393
                                                                                        api/objects.pb.go on lines 430..441
                                                                                        api/objects.pb.go on lines 486..497
                                                                                        api/objects.pb.go on lines 558..569
                                                                                        api/objects.pb.go on lines 602..613
                                                                                        api/objects.pb.go on lines 644..655
                                                                                        api/objects.pb.go on lines 692..703
                                                                                        api/objects.pb.go on lines 733..744
                                                                                        api/objects.pb.go on lines 790..801
                                                                                        api/raft.pb.go on lines 90..101
                                                                                        api/raft.pb.go on lines 127..138
                                                                                        api/raft.pb.go on lines 169..180
                                                                                        api/raft.pb.go on lines 205..216
                                                                                        api/raft.pb.go on lines 240..251
                                                                                        api/raft.pb.go on lines 276..287
                                                                                        api/raft.pb.go on lines 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 *ProcessRaftMessageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                            if deterministic {
                                                                                                return xxx_messageInfo_ProcessRaftMessageRequest.Marshal(b, m, deterministic)
                                                                                            } else {
                                                                                                b = b[:cap(b)]
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
                                                                                        api/ca.pb.go on lines 50..61
                                                                                        api/ca.pb.go on lines 87..98
                                                                                        api/ca.pb.go on lines 131..142
                                                                                        api/ca.pb.go on lines 168..179
                                                                                        api/ca.pb.go on lines 203..214
                                                                                        api/ca.pb.go on lines 239..250
                                                                                        api/ca.pb.go on lines 274..285
                                                                                        api/ca.pb.go on lines 311..322
                                                                                        api/dispatcher.pb.go on lines 112..123
                                                                                        api/dispatcher.pb.go on lines 202..213
                                                                                        api/dispatcher.pb.go on lines 239..250
                                                                                        api/dispatcher.pb.go on lines 277..288
                                                                                        api/dispatcher.pb.go on lines 316..327
                                                                                        api/dispatcher.pb.go on lines 355..366
                                                                                        api/dispatcher.pb.go on lines 390..401
                                                                                        api/dispatcher.pb.go on lines 427..438
                                                                                        api/dispatcher.pb.go on lines 476..487
                                                                                        api/dispatcher.pb.go on lines 511..522
                                                                                        api/dispatcher.pb.go on lines 547..558
                                                                                        api/dispatcher.pb.go on lines 585..596
                                                                                        api/dispatcher.pb.go on lines 621..632
                                                                                        api/dispatcher.pb.go on lines 662..673
                                                                                        api/dispatcher.pb.go on lines 768..779
                                                                                        api/dispatcher.pb.go on lines 816..827
                                                                                        api/health.pb.go on lines 77..88
                                                                                        api/health.pb.go on lines 113..124
                                                                                        api/logbroker.pb.go on lines 105..116
                                                                                        api/logbroker.pb.go on lines 148..159
                                                                                        api/logbroker.pb.go on lines 187..198
                                                                                        api/logbroker.pb.go on lines 225..236
                                                                                        api/logbroker.pb.go on lines 273..284
                                                                                        api/logbroker.pb.go on lines 311..322
                                                                                        api/logbroker.pb.go on lines 347..358
                                                                                        api/logbroker.pb.go on lines 384..395
                                                                                        api/logbroker.pb.go on lines 432..443
                                                                                        api/logbroker.pb.go on lines 477..488
                                                                                        api/logbroker.pb.go on lines 512..523
                                                                                        api/objects.pb.go on lines 51..62
                                                                                        api/objects.pb.go on lines 123..134
                                                                                        api/objects.pb.go on lines 190..201
                                                                                        api/objects.pb.go on lines 235..246
                                                                                        api/objects.pb.go on lines 283..294
                                                                                        api/objects.pb.go on lines 382..393
                                                                                        api/objects.pb.go on lines 430..441
                                                                                        api/objects.pb.go on lines 486..497
                                                                                        api/objects.pb.go on lines 558..569
                                                                                        api/objects.pb.go on lines 602..613
                                                                                        api/objects.pb.go on lines 644..655
                                                                                        api/objects.pb.go on lines 692..703
                                                                                        api/objects.pb.go on lines 733..744
                                                                                        api/objects.pb.go on lines 790..801
                                                                                        api/raft.pb.go on lines 90..101
                                                                                        api/raft.pb.go on lines 127..138
                                                                                        api/raft.pb.go on lines 169..180
                                                                                        api/raft.pb.go on lines 205..216
                                                                                        api/raft.pb.go on lines 240..251
                                                                                        api/raft.pb.go on lines 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 *StoreAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                            if deterministic {
                                                                                                return xxx_messageInfo_StoreAction.Marshal(b, m, deterministic)
                                                                                            } else {
                                                                                                b = b[:cap(b)]
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
                                                                                        api/ca.pb.go on lines 50..61
                                                                                        api/ca.pb.go on lines 87..98
                                                                                        api/ca.pb.go on lines 131..142
                                                                                        api/ca.pb.go on lines 168..179
                                                                                        api/ca.pb.go on lines 203..214
                                                                                        api/ca.pb.go on lines 239..250
                                                                                        api/ca.pb.go on lines 274..285
                                                                                        api/ca.pb.go on lines 311..322
                                                                                        api/dispatcher.pb.go on lines 112..123
                                                                                        api/dispatcher.pb.go on lines 202..213
                                                                                        api/dispatcher.pb.go on lines 239..250
                                                                                        api/dispatcher.pb.go on lines 277..288
                                                                                        api/dispatcher.pb.go on lines 316..327
                                                                                        api/dispatcher.pb.go on lines 355..366
                                                                                        api/dispatcher.pb.go on lines 390..401
                                                                                        api/dispatcher.pb.go on lines 427..438
                                                                                        api/dispatcher.pb.go on lines 476..487
                                                                                        api/dispatcher.pb.go on lines 511..522
                                                                                        api/dispatcher.pb.go on lines 547..558
                                                                                        api/dispatcher.pb.go on lines 585..596
                                                                                        api/dispatcher.pb.go on lines 621..632
                                                                                        api/dispatcher.pb.go on lines 662..673
                                                                                        api/dispatcher.pb.go on lines 768..779
                                                                                        api/dispatcher.pb.go on lines 816..827
                                                                                        api/health.pb.go on lines 77..88
                                                                                        api/health.pb.go on lines 113..124
                                                                                        api/logbroker.pb.go on lines 105..116
                                                                                        api/logbroker.pb.go on lines 148..159
                                                                                        api/logbroker.pb.go on lines 187..198
                                                                                        api/logbroker.pb.go on lines 225..236
                                                                                        api/logbroker.pb.go on lines 273..284
                                                                                        api/logbroker.pb.go on lines 311..322
                                                                                        api/logbroker.pb.go on lines 347..358
                                                                                        api/logbroker.pb.go on lines 384..395
                                                                                        api/logbroker.pb.go on lines 432..443
                                                                                        api/logbroker.pb.go on lines 477..488
                                                                                        api/logbroker.pb.go on lines 512..523
                                                                                        api/objects.pb.go on lines 51..62
                                                                                        api/objects.pb.go on lines 123..134
                                                                                        api/objects.pb.go on lines 190..201
                                                                                        api/objects.pb.go on lines 235..246
                                                                                        api/objects.pb.go on lines 283..294
                                                                                        api/objects.pb.go on lines 382..393
                                                                                        api/objects.pb.go on lines 430..441
                                                                                        api/objects.pb.go on lines 486..497
                                                                                        api/objects.pb.go on lines 558..569
                                                                                        api/objects.pb.go on lines 602..613
                                                                                        api/objects.pb.go on lines 644..655
                                                                                        api/objects.pb.go on lines 692..703
                                                                                        api/objects.pb.go on lines 733..744
                                                                                        api/objects.pb.go on lines 790..801
                                                                                        api/raft.pb.go on lines 90..101
                                                                                        api/raft.pb.go on lines 127..138
                                                                                        api/raft.pb.go on lines 169..180
                                                                                        api/raft.pb.go on lines 205..216
                                                                                        api/raft.pb.go on lines 240..251
                                                                                        api/raft.pb.go on lines 276..287
                                                                                        api/raft.pb.go on lines 311..322
                                                                                        api/raft.pb.go on lines 348..359
                                                                                        api/raft.pb.go on lines 384..395
                                                                                        api/raft.pb.go on lines 421..432
                                                                                        api/raft.pb.go on lines 458..469
                                                                                        api/raft.pb.go on lines 498..509
                                                                                        api/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 *ResolveAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                            if deterministic {
                                                                                                return xxx_messageInfo_ResolveAddressRequest.Marshal(b, m, deterministic)
                                                                                            } else {
                                                                                                b = b[:cap(b)]
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
                                                                                        api/ca.pb.go on lines 50..61
                                                                                        api/ca.pb.go on lines 87..98
                                                                                        api/ca.pb.go on lines 131..142
                                                                                        api/ca.pb.go on lines 168..179
                                                                                        api/ca.pb.go on lines 203..214
                                                                                        api/ca.pb.go on lines 239..250
                                                                                        api/ca.pb.go on lines 274..285
                                                                                        api/ca.pb.go on lines 311..322
                                                                                        api/dispatcher.pb.go on lines 112..123
                                                                                        api/dispatcher.pb.go on lines 202..213
                                                                                        api/dispatcher.pb.go on lines 239..250
                                                                                        api/dispatcher.pb.go on lines 277..288
                                                                                        api/dispatcher.pb.go on lines 316..327
                                                                                        api/dispatcher.pb.go on lines 355..366
                                                                                        api/dispatcher.pb.go on lines 390..401
                                                                                        api/dispatcher.pb.go on lines 427..438
                                                                                        api/dispatcher.pb.go on lines 476..487
                                                                                        api/dispatcher.pb.go on lines 511..522
                                                                                        api/dispatcher.pb.go on lines 547..558
                                                                                        api/dispatcher.pb.go on lines 585..596
                                                                                        api/dispatcher.pb.go on lines 621..632
                                                                                        api/dispatcher.pb.go on lines 662..673
                                                                                        api/dispatcher.pb.go on lines 768..779
                                                                                        api/dispatcher.pb.go on lines 816..827
                                                                                        api/health.pb.go on lines 77..88
                                                                                        api/health.pb.go on lines 113..124
                                                                                        api/logbroker.pb.go on lines 105..116
                                                                                        api/logbroker.pb.go on lines 148..159
                                                                                        api/logbroker.pb.go on lines 187..198
                                                                                        api/logbroker.pb.go on lines 225..236
                                                                                        api/logbroker.pb.go on lines 273..284
                                                                                        api/logbroker.pb.go on lines 311..322
                                                                                        api/logbroker.pb.go on lines 347..358
                                                                                        api/logbroker.pb.go on lines 384..395
                                                                                        api/logbroker.pb.go on lines 432..443
                                                                                        api/logbroker.pb.go on lines 477..488
                                                                                        api/logbroker.pb.go on lines 512..523
                                                                                        api/objects.pb.go on lines 51..62
                                                                                        api/objects.pb.go on lines 123..134
                                                                                        api/objects.pb.go on lines 190..201
                                                                                        api/objects.pb.go on lines 235..246
                                                                                        api/objects.pb.go on lines 283..294
                                                                                        api/objects.pb.go on lines 382..393
                                                                                        api/objects.pb.go on lines 430..441
                                                                                        api/objects.pb.go on lines 486..497
                                                                                        api/objects.pb.go on lines 558..569
                                                                                        api/objects.pb.go on lines 602..613
                                                                                        api/objects.pb.go on lines 644..655
                                                                                        api/objects.pb.go on lines 692..703
                                                                                        api/objects.pb.go on lines 733..744
                                                                                        api/objects.pb.go on lines 790..801
                                                                                        api/raft.pb.go on lines 90..101
                                                                                        api/raft.pb.go on lines 127..138
                                                                                        api/raft.pb.go on lines 169..180
                                                                                        api/raft.pb.go on lines 205..216
                                                                                        api/raft.pb.go on lines 240..251
                                                                                        api/raft.pb.go on lines 276..287
                                                                                        api/raft.pb.go on lines 311..322
                                                                                        api/raft.pb.go on lines 348..359
                                                                                        api/raft.pb.go on lines 384..395
                                                                                        api/raft.pb.go on lines 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 *JoinRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                            if deterministic {
                                                                                                return xxx_messageInfo_JoinRequest.Marshal(b, m, deterministic)
                                                                                            } else {
                                                                                                b = b[:cap(b)]
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
                                                                                        api/ca.pb.go on lines 50..61
                                                                                        api/ca.pb.go on lines 87..98
                                                                                        api/ca.pb.go on lines 131..142
                                                                                        api/ca.pb.go on lines 168..179
                                                                                        api/ca.pb.go on lines 203..214
                                                                                        api/ca.pb.go on lines 239..250
                                                                                        api/ca.pb.go on lines 274..285
                                                                                        api/ca.pb.go on lines 311..322
                                                                                        api/dispatcher.pb.go on lines 112..123
                                                                                        api/dispatcher.pb.go on lines 202..213
                                                                                        api/dispatcher.pb.go on lines 239..250
                                                                                        api/dispatcher.pb.go on lines 277..288
                                                                                        api/dispatcher.pb.go on lines 316..327
                                                                                        api/dispatcher.pb.go on lines 355..366
                                                                                        api/dispatcher.pb.go on lines 390..401
                                                                                        api/dispatcher.pb.go on lines 427..438
                                                                                        api/dispatcher.pb.go on lines 476..487
                                                                                        api/dispatcher.pb.go on lines 511..522
                                                                                        api/dispatcher.pb.go on lines 547..558
                                                                                        api/dispatcher.pb.go on lines 585..596
                                                                                        api/dispatcher.pb.go on lines 621..632
                                                                                        api/dispatcher.pb.go on lines 662..673
                                                                                        api/dispatcher.pb.go on lines 768..779
                                                                                        api/dispatcher.pb.go on lines 816..827
                                                                                        api/health.pb.go on lines 77..88
                                                                                        api/health.pb.go on lines 113..124
                                                                                        api/logbroker.pb.go on lines 105..116
                                                                                        api/logbroker.pb.go on lines 148..159
                                                                                        api/logbroker.pb.go on lines 187..198
                                                                                        api/logbroker.pb.go on lines 225..236
                                                                                        api/logbroker.pb.go on lines 273..284
                                                                                        api/logbroker.pb.go on lines 311..322
                                                                                        api/logbroker.pb.go on lines 347..358
                                                                                        api/logbroker.pb.go on lines 384..395
                                                                                        api/logbroker.pb.go on lines 432..443
                                                                                        api/logbroker.pb.go on lines 477..488
                                                                                        api/logbroker.pb.go on lines 512..523
                                                                                        api/objects.pb.go on lines 51..62
                                                                                        api/objects.pb.go on lines 123..134
                                                                                        api/objects.pb.go on lines 190..201
                                                                                        api/objects.pb.go on lines 235..246
                                                                                        api/objects.pb.go on lines 283..294
                                                                                        api/objects.pb.go on lines 382..393
                                                                                        api/objects.pb.go on lines 430..441
                                                                                        api/objects.pb.go on lines 486..497
                                                                                        api/objects.pb.go on lines 558..569
                                                                                        api/objects.pb.go on lines 602..613
                                                                                        api/objects.pb.go on lines 644..655
                                                                                        api/objects.pb.go on lines 692..703
                                                                                        api/objects.pb.go on lines 733..744
                                                                                        api/objects.pb.go on lines 790..801
                                                                                        api/raft.pb.go on lines 90..101
                                                                                        api/raft.pb.go on lines 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 *ResolveAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                            if deterministic {
                                                                                                return xxx_messageInfo_ResolveAddressResponse.Marshal(b, m, deterministic)
                                                                                            } else {
                                                                                                b = b[:cap(b)]
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
                                                                                        api/ca.pb.go on lines 50..61
                                                                                        api/ca.pb.go on lines 87..98
                                                                                        api/ca.pb.go on lines 131..142
                                                                                        api/ca.pb.go on lines 168..179
                                                                                        api/ca.pb.go on lines 203..214
                                                                                        api/ca.pb.go on lines 239..250
                                                                                        api/ca.pb.go on lines 274..285
                                                                                        api/ca.pb.go on lines 311..322
                                                                                        api/dispatcher.pb.go on lines 112..123
                                                                                        api/dispatcher.pb.go on lines 202..213
                                                                                        api/dispatcher.pb.go on lines 239..250
                                                                                        api/dispatcher.pb.go on lines 277..288
                                                                                        api/dispatcher.pb.go on lines 316..327
                                                                                        api/dispatcher.pb.go on lines 355..366
                                                                                        api/dispatcher.pb.go on lines 390..401
                                                                                        api/dispatcher.pb.go on lines 427..438
                                                                                        api/dispatcher.pb.go on lines 476..487
                                                                                        api/dispatcher.pb.go on lines 511..522
                                                                                        api/dispatcher.pb.go on lines 547..558
                                                                                        api/dispatcher.pb.go on lines 585..596
                                                                                        api/dispatcher.pb.go on lines 621..632
                                                                                        api/dispatcher.pb.go on lines 662..673
                                                                                        api/dispatcher.pb.go on lines 768..779
                                                                                        api/dispatcher.pb.go on lines 816..827
                                                                                        api/health.pb.go on lines 77..88
                                                                                        api/health.pb.go on lines 113..124
                                                                                        api/logbroker.pb.go on lines 105..116
                                                                                        api/logbroker.pb.go on lines 148..159
                                                                                        api/logbroker.pb.go on lines 187..198
                                                                                        api/logbroker.pb.go on lines 225..236
                                                                                        api/logbroker.pb.go on lines 273..284
                                                                                        api/logbroker.pb.go on lines 311..322
                                                                                        api/logbroker.pb.go on lines 347..358
                                                                                        api/logbroker.pb.go on lines 384..395
                                                                                        api/logbroker.pb.go on lines 432..443
                                                                                        api/logbroker.pb.go on lines 477..488
                                                                                        api/logbroker.pb.go on lines 512..523
                                                                                        api/objects.pb.go on lines 51..62
                                                                                        api/objects.pb.go on lines 123..134
                                                                                        api/objects.pb.go on lines 190..201
                                                                                        api/objects.pb.go on lines 235..246
                                                                                        api/objects.pb.go on lines 283..294
                                                                                        api/objects.pb.go on lines 382..393
                                                                                        api/objects.pb.go on lines 430..441
                                                                                        api/objects.pb.go on lines 486..497
                                                                                        api/objects.pb.go on lines 558..569
                                                                                        api/objects.pb.go on lines 602..613
                                                                                        api/objects.pb.go on lines 644..655
                                                                                        api/objects.pb.go on lines 692..703
                                                                                        api/objects.pb.go on lines 733..744
                                                                                        api/objects.pb.go on lines 790..801
                                                                                        api/raft.pb.go on lines 90..101
                                                                                        api/raft.pb.go on lines 127..138
                                                                                        api/raft.pb.go on lines 169..180
                                                                                        api/raft.pb.go on lines 205..216
                                                                                        api/raft.pb.go on lines 240..251
                                                                                        api/raft.pb.go on lines 276..287
                                                                                        api/raft.pb.go on lines 311..322
                                                                                        api/raft.pb.go on lines 348..359
                                                                                        api/raft.pb.go on lines 384..395
                                                                                        api/raft.pb.go on lines 421..432
                                                                                        api/raft.pb.go on lines 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 *InternalRaftRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                            if deterministic {
                                                                                                return xxx_messageInfo_InternalRaftRequest.Marshal(b, m, deterministic)
                                                                                            } else {
                                                                                                b = b[:cap(b)]
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
                                                                                        api/ca.pb.go on lines 50..61
                                                                                        api/ca.pb.go on lines 87..98
                                                                                        api/ca.pb.go on lines 131..142
                                                                                        api/ca.pb.go on lines 168..179
                                                                                        api/ca.pb.go on lines 203..214
                                                                                        api/ca.pb.go on lines 239..250
                                                                                        api/ca.pb.go on lines 274..285
                                                                                        api/ca.pb.go on lines 311..322
                                                                                        api/dispatcher.pb.go on lines 112..123
                                                                                        api/dispatcher.pb.go on lines 202..213
                                                                                        api/dispatcher.pb.go on lines 239..250
                                                                                        api/dispatcher.pb.go on lines 277..288
                                                                                        api/dispatcher.pb.go on lines 316..327
                                                                                        api/dispatcher.pb.go on lines 355..366
                                                                                        api/dispatcher.pb.go on lines 390..401
                                                                                        api/dispatcher.pb.go on lines 427..438
                                                                                        api/dispatcher.pb.go on lines 476..487
                                                                                        api/dispatcher.pb.go on lines 511..522
                                                                                        api/dispatcher.pb.go on lines 547..558
                                                                                        api/dispatcher.pb.go on lines 585..596
                                                                                        api/dispatcher.pb.go on lines 621..632
                                                                                        api/dispatcher.pb.go on lines 662..673
                                                                                        api/dispatcher.pb.go on lines 768..779
                                                                                        api/dispatcher.pb.go on lines 816..827
                                                                                        api/health.pb.go on lines 77..88
                                                                                        api/health.pb.go on lines 113..124
                                                                                        api/logbroker.pb.go on lines 105..116
                                                                                        api/logbroker.pb.go on lines 148..159
                                                                                        api/logbroker.pb.go on lines 187..198
                                                                                        api/logbroker.pb.go on lines 225..236
                                                                                        api/logbroker.pb.go on lines 273..284
                                                                                        api/logbroker.pb.go on lines 311..322
                                                                                        api/logbroker.pb.go on lines 347..358
                                                                                        api/logbroker.pb.go on lines 384..395
                                                                                        api/logbroker.pb.go on lines 432..443
                                                                                        api/logbroker.pb.go on lines 477..488
                                                                                        api/logbroker.pb.go on lines 512..523
                                                                                        api/objects.pb.go on lines 51..62
                                                                                        api/objects.pb.go on lines 123..134
                                                                                        api/objects.pb.go on lines 190..201
                                                                                        api/objects.pb.go on lines 235..246
                                                                                        api/objects.pb.go on lines 283..294
                                                                                        api/objects.pb.go on lines 382..393
                                                                                        api/objects.pb.go on lines 430..441
                                                                                        api/objects.pb.go on lines 486..497
                                                                                        api/objects.pb.go on lines 558..569
                                                                                        api/objects.pb.go on lines 602..613
                                                                                        api/objects.pb.go on lines 644..655
                                                                                        api/objects.pb.go on lines 692..703
                                                                                        api/objects.pb.go on lines 733..744
                                                                                        api/objects.pb.go on lines 790..801
                                                                                        api/raft.pb.go on lines 90..101
                                                                                        api/raft.pb.go on lines 127..138
                                                                                        api/raft.pb.go on lines 169..180
                                                                                        api/raft.pb.go on lines 205..216
                                                                                        api/raft.pb.go on lines 240..251
                                                                                        api/raft.pb.go on lines 276..287
                                                                                        api/raft.pb.go on lines 311..322
                                                                                        api/raft.pb.go on lines 348..359
                                                                                        api/raft.pb.go on lines 384..395
                                                                                        api/raft.pb.go on lines 421..432
                                                                                        api/raft.pb.go on lines 458..469
                                                                                        api/raft.pb.go on lines 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 *JoinResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                            if deterministic {
                                                                                                return xxx_messageInfo_JoinResponse.Marshal(b, m, deterministic)
                                                                                            } else {
                                                                                                b = b[:cap(b)]
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
                                                                                        api/ca.pb.go on lines 50..61
                                                                                        api/ca.pb.go on lines 87..98
                                                                                        api/ca.pb.go on lines 131..142
                                                                                        api/ca.pb.go on lines 168..179
                                                                                        api/ca.pb.go on lines 203..214
                                                                                        api/ca.pb.go on lines 239..250
                                                                                        api/ca.pb.go on lines 274..285
                                                                                        api/ca.pb.go on lines 311..322
                                                                                        api/dispatcher.pb.go on lines 112..123
                                                                                        api/dispatcher.pb.go on lines 202..213
                                                                                        api/dispatcher.pb.go on lines 239..250
                                                                                        api/dispatcher.pb.go on lines 277..288
                                                                                        api/dispatcher.pb.go on lines 316..327
                                                                                        api/dispatcher.pb.go on lines 355..366
                                                                                        api/dispatcher.pb.go on lines 390..401
                                                                                        api/dispatcher.pb.go on lines 427..438
                                                                                        api/dispatcher.pb.go on lines 476..487
                                                                                        api/dispatcher.pb.go on lines 511..522
                                                                                        api/dispatcher.pb.go on lines 547..558
                                                                                        api/dispatcher.pb.go on lines 585..596
                                                                                        api/dispatcher.pb.go on lines 621..632
                                                                                        api/dispatcher.pb.go on lines 662..673
                                                                                        api/dispatcher.pb.go on lines 768..779
                                                                                        api/dispatcher.pb.go on lines 816..827
                                                                                        api/health.pb.go on lines 77..88
                                                                                        api/health.pb.go on lines 113..124
                                                                                        api/logbroker.pb.go on lines 105..116
                                                                                        api/logbroker.pb.go on lines 148..159
                                                                                        api/logbroker.pb.go on lines 187..198
                                                                                        api/logbroker.pb.go on lines 225..236
                                                                                        api/logbroker.pb.go on lines 273..284
                                                                                        api/logbroker.pb.go on lines 311..322
                                                                                        api/logbroker.pb.go on lines 347..358
                                                                                        api/logbroker.pb.go on lines 384..395
                                                                                        api/logbroker.pb.go on lines 432..443
                                                                                        api/logbroker.pb.go on lines 477..488
                                                                                        api/logbroker.pb.go on lines 512..523
                                                                                        api/objects.pb.go on lines 51..62
                                                                                        api/objects.pb.go on lines 123..134
                                                                                        api/objects.pb.go on lines 190..201
                                                                                        api/objects.pb.go on lines 235..246
                                                                                        api/objects.pb.go on lines 283..294
                                                                                        api/objects.pb.go on lines 382..393
                                                                                        api/objects.pb.go on lines 430..441
                                                                                        api/objects.pb.go on lines 486..497
                                                                                        api/objects.pb.go on lines 558..569
                                                                                        api/objects.pb.go on lines 602..613
                                                                                        api/objects.pb.go on lines 644..655
                                                                                        api/objects.pb.go on lines 692..703
                                                                                        api/objects.pb.go on lines 733..744
                                                                                        api/objects.pb.go on lines 790..801
                                                                                        api/raft.pb.go on lines 90..101
                                                                                        api/raft.pb.go on lines 127..138
                                                                                        api/raft.pb.go on lines 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 *LeaveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                            if deterministic {
                                                                                                return xxx_messageInfo_LeaveResponse.Marshal(b, m, deterministic)
                                                                                            } else {
                                                                                                b = b[:cap(b)]
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
                                                                                        api/ca.pb.go on lines 50..61
                                                                                        api/ca.pb.go on lines 87..98
                                                                                        api/ca.pb.go on lines 131..142
                                                                                        api/ca.pb.go on lines 168..179
                                                                                        api/ca.pb.go on lines 203..214
                                                                                        api/ca.pb.go on lines 239..250
                                                                                        api/ca.pb.go on lines 274..285
                                                                                        api/ca.pb.go on lines 311..322
                                                                                        api/dispatcher.pb.go on lines 112..123
                                                                                        api/dispatcher.pb.go on lines 202..213
                                                                                        api/dispatcher.pb.go on lines 239..250
                                                                                        api/dispatcher.pb.go on lines 277..288
                                                                                        api/dispatcher.pb.go on lines 316..327
                                                                                        api/dispatcher.pb.go on lines 355..366
                                                                                        api/dispatcher.pb.go on lines 390..401
                                                                                        api/dispatcher.pb.go on lines 427..438
                                                                                        api/dispatcher.pb.go on lines 476..487
                                                                                        api/dispatcher.pb.go on lines 511..522
                                                                                        api/dispatcher.pb.go on lines 547..558
                                                                                        api/dispatcher.pb.go on lines 585..596
                                                                                        api/dispatcher.pb.go on lines 621..632
                                                                                        api/dispatcher.pb.go on lines 662..673
                                                                                        api/dispatcher.pb.go on lines 768..779
                                                                                        api/dispatcher.pb.go on lines 816..827
                                                                                        api/health.pb.go on lines 77..88
                                                                                        api/health.pb.go on lines 113..124
                                                                                        api/logbroker.pb.go on lines 105..116
                                                                                        api/logbroker.pb.go on lines 148..159
                                                                                        api/logbroker.pb.go on lines 187..198
                                                                                        api/logbroker.pb.go on lines 225..236
                                                                                        api/logbroker.pb.go on lines 273..284
                                                                                        api/logbroker.pb.go on lines 311..322
                                                                                        api/logbroker.pb.go on lines 347..358
                                                                                        api/logbroker.pb.go on lines 384..395
                                                                                        api/logbroker.pb.go on lines 432..443
                                                                                        api/logbroker.pb.go on lines 477..488
                                                                                        api/logbroker.pb.go on lines 512..523
                                                                                        api/objects.pb.go on lines 51..62
                                                                                        api/objects.pb.go on lines 123..134
                                                                                        api/objects.pb.go on lines 190..201
                                                                                        api/objects.pb.go on lines 235..246
                                                                                        api/objects.pb.go on lines 283..294
                                                                                        api/objects.pb.go on lines 382..393
                                                                                        api/objects.pb.go on lines 430..441
                                                                                        api/objects.pb.go on lines 486..497
                                                                                        api/objects.pb.go on lines 558..569
                                                                                        api/objects.pb.go on lines 602..613
                                                                                        api/objects.pb.go on lines 644..655
                                                                                        api/objects.pb.go on lines 692..703
                                                                                        api/objects.pb.go on lines 733..744
                                                                                        api/objects.pb.go on lines 790..801
                                                                                        api/raft.pb.go on lines 90..101
                                                                                        api/raft.pb.go on lines 127..138
                                                                                        api/raft.pb.go on lines 169..180
                                                                                        api/raft.pb.go on lines 205..216
                                                                                        api/raft.pb.go on lines 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 *StreamRaftMessageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                                            if deterministic {
                                                                                                return xxx_messageInfo_StreamRaftMessageRequest.Marshal(b, m, deterministic)
                                                                                            } else {
                                                                                                b = b[:cap(b)]
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 101 other locations - About 45 mins to fix
                                                                                        api/ca.pb.go on lines 50..61
                                                                                        api/ca.pb.go on lines 87..98
                                                                                        api/ca.pb.go on lines 131..142
                                                                                        api/ca.pb.go on lines 168..179
                                                                                        api/ca.pb.go on lines 203..214
                                                                                        api/ca.pb.go on lines 239..250
                                                                                        api/ca.pb.go on lines 274..285
                                                                                        api/ca.pb.go on lines 311..322
                                                                                        api/dispatcher.pb.go on lines 112..123
                                                                                        api/dispatcher.pb.go on lines 202..213
                                                                                        api/dispatcher.pb.go on lines 239..250
                                                                                        api/dispatcher.pb.go on lines 277..288
                                                                                        api/dispatcher.pb.go on lines 316..327
                                                                                        api/dispatcher.pb.go on lines 355..366
                                                                                        api/dispatcher.pb.go on lines 390..401
                                                                                        api/dispatcher.pb.go on lines 427..438
                                                                                        api/dispatcher.pb.go on lines 476..487
                                                                                        api/dispatcher.pb.go on lines 511..522
                                                                                        api/dispatcher.pb.go on lines 547..558
                                                                                        api/dispatcher.pb.go on lines 585..596
                                                                                        api/dispatcher.pb.go on lines 621..632
                                                                                        api/dispatcher.pb.go on lines 662..673
                                                                                        api/dispatcher.pb.go on lines 768..779
                                                                                        api/dispatcher.pb.go on lines 816..827
                                                                                        api/health.pb.go on lines 77..88
                                                                                        api/health.pb.go on lines 113..124
                                                                                        api/logbroker.pb.go on lines 105..116
                                                                                        api/logbroker.pb.go on lines 148..159
                                                                                        api/logbroker.pb.go on lines 187..198
                                                                                        api/logbroker.pb.go on lines 225..236
                                                                                        api/logbroker.pb.go on lines 273..284
                                                                                        api/logbroker.pb.go on lines 311..322
                                                                                        api/logbroker.pb.go on lines 347..358
                                                                                        api/logbroker.pb.go on lines 384..395
                                                                                        api/logbroker.pb.go on lines 432..443
                                                                                        api/logbroker.pb.go on lines 477..488
                                                                                        api/logbroker.pb.go on lines 512..523
                                                                                        api/objects.pb.go on lines 51..62
                                                                                        api/objects.pb.go on lines 123..134
                                                                                        api/objects.pb.go on lines 190..201
                                                                                        api/objects.pb.go on lines 235..246
                                                                                        api/objects.pb.go on lines 283..294
                                                                                        api/objects.pb.go on lines 382..393
                                                                                        api/objects.pb.go on lines 430..441
                                                                                        api/objects.pb.go on lines 486..497
                                                                                        api/objects.pb.go on lines 558..569
                                                                                        api/objects.pb.go on lines 602..613
                                                                                        api/objects.pb.go on lines 644..655
                                                                                        api/objects.pb.go on lines 692..703
                                                                                        api/objects.pb.go on lines 733..744
                                                                                        api/objects.pb.go on lines 790..801
                                                                                        api/raft.pb.go on lines 90..101
                                                                                        api/raft.pb.go on lines 127..138
                                                                                        api/raft.pb.go on lines 169..180
                                                                                        api/raft.pb.go on lines 205..216
                                                                                        api/raft.pb.go on lines 240..251
                                                                                        api/raft.pb.go on lines 276..287
                                                                                        api/raft.pb.go on lines 311..322
                                                                                        api/raft.pb.go on lines 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 2 locations. Consider refactoring.
                                                                                        Open

                                                                                        func (c *raftClient) StreamRaftMessage(ctx context.Context, opts ...grpc.CallOption) (Raft_StreamRaftMessageClient, error) {
                                                                                            stream, err := c.cc.NewStream(ctx, &_Raft_serviceDesc.Streams[0], "/docker.swarmkit.v1.Raft/StreamRaftMessage", opts...)
                                                                                            if err != nil {
                                                                                                return nil, err
                                                                                            }
                                                                                        Severity: Minor
                                                                                        Found in api/raft.pb.go and 1 other location - About 40 mins to fix
                                                                                        api/logbroker.pb.go on lines 1069..1076

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 110.

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

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

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

                                                                                        See codeclimate-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 *StoreAction_Volume) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
                                                                                        api/dispatcher.pb.go on lines 2989..3000
                                                                                        api/dispatcher.pb.go on lines 3001..3012
                                                                                        api/dispatcher.pb.go on lines 3013..3024
                                                                                        api/dispatcher.pb.go on lines 3025..3036
                                                                                        api/raft.pb.go on lines 2485..2496
                                                                                        api/raft.pb.go on lines 2507..2518
                                                                                        api/raft.pb.go on lines 2529..2540
                                                                                        api/raft.pb.go on lines 2609..2620
                                                                                        api/raft.pb.go on lines 2621..2632
                                                                                        api/raft.pb.go on lines 2633..2644
                                                                                        api/raft.pb.go on lines 2645..2656
                                                                                        api/raft.pb.go on lines 2657..2668
                                                                                        api/raft.pb.go on lines 2669..2680
                                                                                        api/raft.pb.go on lines 2681..2692
                                                                                        api/raft.pb.go on lines 2693..2704
                                                                                        api/raft.pb.go on lines 2705..2716
                                                                                        api/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 *StreamRaftMessageRequest) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
                                                                                        api/dispatcher.pb.go on lines 2989..3000
                                                                                        api/dispatcher.pb.go on lines 3001..3012
                                                                                        api/dispatcher.pb.go on lines 3013..3024
                                                                                        api/dispatcher.pb.go on lines 3025..3036
                                                                                        api/raft.pb.go on lines 2485..2496
                                                                                        api/raft.pb.go on lines 2507..2518
                                                                                        api/raft.pb.go on lines 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 *StoreAction_Cluster) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
                                                                                        api/dispatcher.pb.go on lines 2989..3000
                                                                                        api/dispatcher.pb.go on lines 3001..3012
                                                                                        api/dispatcher.pb.go on lines 3013..3024
                                                                                        api/dispatcher.pb.go on lines 3025..3036
                                                                                        api/raft.pb.go on lines 2485..2496
                                                                                        api/raft.pb.go on lines 2507..2518
                                                                                        api/raft.pb.go on lines 2529..2540
                                                                                        api/raft.pb.go on lines 2609..2620
                                                                                        api/raft.pb.go on lines 2621..2632
                                                                                        api/raft.pb.go on lines 2633..2644
                                                                                        api/raft.pb.go on lines 2645..2656
                                                                                        api/raft.pb.go on lines 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 *ProcessRaftMessageRequest) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
                                                                                        api/dispatcher.pb.go on lines 2989..3000
                                                                                        api/dispatcher.pb.go on lines 3001..3012
                                                                                        api/dispatcher.pb.go on lines 3013..3024
                                                                                        api/dispatcher.pb.go on lines 3025..3036
                                                                                        api/raft.pb.go on lines 2485..2496
                                                                                        api/raft.pb.go on lines 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 *StoreAction_Secret) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
                                                                                        api/dispatcher.pb.go on lines 2989..3000
                                                                                        api/dispatcher.pb.go on lines 3001..3012
                                                                                        api/dispatcher.pb.go on lines 3013..3024
                                                                                        api/dispatcher.pb.go on lines 3025..3036
                                                                                        api/raft.pb.go on lines 2485..2496
                                                                                        api/raft.pb.go on lines 2507..2518
                                                                                        api/raft.pb.go on lines 2529..2540
                                                                                        api/raft.pb.go on lines 2609..2620
                                                                                        api/raft.pb.go on lines 2621..2632
                                                                                        api/raft.pb.go on lines 2633..2644
                                                                                        api/raft.pb.go on lines 2645..2656
                                                                                        api/raft.pb.go on lines 2657..2668
                                                                                        api/raft.pb.go on lines 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 *StoreAction_Node) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
                                                                                        api/dispatcher.pb.go on lines 2989..3000
                                                                                        api/dispatcher.pb.go on lines 3001..3012
                                                                                        api/dispatcher.pb.go on lines 3013..3024
                                                                                        api/dispatcher.pb.go on lines 3025..3036
                                                                                        api/raft.pb.go on lines 2485..2496
                                                                                        api/raft.pb.go on lines 2507..2518
                                                                                        api/raft.pb.go on lines 2529..2540
                                                                                        api/raft.pb.go on lines 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 *StoreAction_Config) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
                                                                                        api/dispatcher.pb.go on lines 2989..3000
                                                                                        api/dispatcher.pb.go on lines 3001..3012
                                                                                        api/dispatcher.pb.go on lines 3013..3024
                                                                                        api/dispatcher.pb.go on lines 3025..3036
                                                                                        api/raft.pb.go on lines 2485..2496
                                                                                        api/raft.pb.go on lines 2507..2518
                                                                                        api/raft.pb.go on lines 2529..2540
                                                                                        api/raft.pb.go on lines 2609..2620
                                                                                        api/raft.pb.go on lines 2621..2632
                                                                                        api/raft.pb.go on lines 2633..2644
                                                                                        api/raft.pb.go on lines 2645..2656
                                                                                        api/raft.pb.go on lines 2657..2668
                                                                                        api/raft.pb.go on lines 2669..2680
                                                                                        api/raft.pb.go on lines 2681..2692
                                                                                        api/raft.pb.go on lines 2693..2704
                                                                                        api/raft.pb.go on lines 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 *StoreAction_Service) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
                                                                                        api/dispatcher.pb.go on lines 2989..3000
                                                                                        api/dispatcher.pb.go on lines 3001..3012
                                                                                        api/dispatcher.pb.go on lines 3013..3024
                                                                                        api/dispatcher.pb.go on lines 3025..3036
                                                                                        api/raft.pb.go on lines 2485..2496
                                                                                        api/raft.pb.go on lines 2507..2518
                                                                                        api/raft.pb.go on lines 2529..2540
                                                                                        api/raft.pb.go on lines 2609..2620
                                                                                        api/raft.pb.go on lines 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 *StoreAction_Task) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
                                                                                        api/dispatcher.pb.go on lines 2989..3000
                                                                                        api/dispatcher.pb.go on lines 3001..3012
                                                                                        api/dispatcher.pb.go on lines 3013..3024
                                                                                        api/dispatcher.pb.go on lines 3025..3036
                                                                                        api/raft.pb.go on lines 2485..2496
                                                                                        api/raft.pb.go on lines 2507..2518
                                                                                        api/raft.pb.go on lines 2529..2540
                                                                                        api/raft.pb.go on lines 2609..2620
                                                                                        api/raft.pb.go on lines 2621..2632
                                                                                        api/raft.pb.go on lines 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 *StoreAction_Network) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
                                                                                        api/dispatcher.pb.go on lines 2989..3000
                                                                                        api/dispatcher.pb.go on lines 3001..3012
                                                                                        api/dispatcher.pb.go on lines 3013..3024
                                                                                        api/dispatcher.pb.go on lines 3025..3036
                                                                                        api/raft.pb.go on lines 2485..2496
                                                                                        api/raft.pb.go on lines 2507..2518
                                                                                        api/raft.pb.go on lines 2529..2540
                                                                                        api/raft.pb.go on lines 2609..2620
                                                                                        api/raft.pb.go on lines 2621..2632
                                                                                        api/raft.pb.go on lines 2633..2644
                                                                                        api/raft.pb.go on lines 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 *LeaveRequest) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
                                                                                        api/dispatcher.pb.go on lines 2989..3000
                                                                                        api/dispatcher.pb.go on lines 3001..3012
                                                                                        api/dispatcher.pb.go on lines 3013..3024
                                                                                        api/dispatcher.pb.go on lines 3025..3036
                                                                                        api/raft.pb.go on lines 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 *StoreAction_Extension) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
                                                                                        api/dispatcher.pb.go on lines 2989..3000
                                                                                        api/dispatcher.pb.go on lines 3001..3012
                                                                                        api/dispatcher.pb.go on lines 3013..3024
                                                                                        api/dispatcher.pb.go on lines 3025..3036
                                                                                        api/raft.pb.go on lines 2485..2496
                                                                                        api/raft.pb.go on lines 2507..2518
                                                                                        api/raft.pb.go on lines 2529..2540
                                                                                        api/raft.pb.go on lines 2609..2620
                                                                                        api/raft.pb.go on lines 2621..2632
                                                                                        api/raft.pb.go on lines 2633..2644
                                                                                        api/raft.pb.go on lines 2645..2656
                                                                                        api/raft.pb.go on lines 2657..2668
                                                                                        api/raft.pb.go on lines 2669..2680
                                                                                        api/raft.pb.go on lines 2681..2692
                                                                                        api/raft.pb.go on lines 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 *StoreAction_Resource) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 37 other locations - About 40 mins to fix
                                                                                        api/dispatcher.pb.go on lines 2989..3000
                                                                                        api/dispatcher.pb.go on lines 3001..3012
                                                                                        api/dispatcher.pb.go on lines 3013..3024
                                                                                        api/dispatcher.pb.go on lines 3025..3036
                                                                                        api/raft.pb.go on lines 2485..2496
                                                                                        api/raft.pb.go on lines 2507..2518
                                                                                        api/raft.pb.go on lines 2529..2540
                                                                                        api/raft.pb.go on lines 2609..2620
                                                                                        api/raft.pb.go on lines 2621..2632
                                                                                        api/raft.pb.go on lines 2633..2644
                                                                                        api/raft.pb.go on lines 2645..2656
                                                                                        api/raft.pb.go on lines 2657..2668
                                                                                        api/raft.pb.go on lines 2669..2680
                                                                                        api/raft.pb.go on lines 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 *raftMembershipClient) Join(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (*JoinResponse, error) {
                                                                                            out := new(JoinResponse)
                                                                                            err := c.cc.Invoke(ctx, "/docker.swarmkit.v1.RaftMembership/Join", in, out, opts...)
                                                                                            if err != nil {
                                                                                                return nil, err
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/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 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 *raftClient) ResolveAddress(ctx context.Context, in *ResolveAddressRequest, opts ...grpc.CallOption) (*ResolveAddressResponse, error) {
                                                                                            out := new(ResolveAddressResponse)
                                                                                            err := c.cc.Invoke(ctx, "/docker.swarmkit.v1.Raft/ResolveAddress", in, out, opts...)
                                                                                            if err != nil {
                                                                                                return nil, err
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/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 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 *raftMembershipClient) Leave(ctx context.Context, in *LeaveRequest, opts ...grpc.CallOption) (*LeaveResponse, error) {
                                                                                            out := new(LeaveResponse)
                                                                                            err := c.cc.Invoke(ctx, "/docker.swarmkit.v1.RaftMembership/Leave", in, out, opts...)
                                                                                            if err != nil {
                                                                                                return nil, err
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/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/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 *StoreAction) String() string {
                                                                                            if this == nil {
                                                                                                return "nil"
                                                                                            }
                                                                                            s := strings.Join([]string{`&StoreAction{`,
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 7 other locations - About 35 mins to fix
                                                                                        api/ca.pb.go on lines 1527..1537
                                                                                        api/dispatcher.pb.go on lines 3192..3202
                                                                                        api/logbroker.pb.go on lines 2275..2285
                                                                                        api/objects.pb.go on lines 6088..6098
                                                                                        api/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 14 locations. Consider refactoring.
                                                                                        Open

                                                                                        func (c *raftClient) ProcessRaftMessage(ctx context.Context, in *ProcessRaftMessageRequest, opts ...grpc.CallOption) (*ProcessRaftMessageResponse, error) {
                                                                                            out := new(ProcessRaftMessageResponse)
                                                                                            err := c.cc.Invoke(ctx, "/docker.swarmkit.v1.Raft/ProcessRaftMessage", in, out, opts...)
                                                                                            if err != nil {
                                                                                                return nil, err
                                                                                        Severity: Major
                                                                                        Found in api/raft.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/dispatcher.pb.go on lines 1434..1441
                                                                                        api/health.pb.go on lines 245..252
                                                                                        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 encodeVarintRaft(dAtA []byte, offset int, v uint64) int {
                                                                                            offset -= sovRaft(v)
                                                                                            base := offset
                                                                                            for v >= 1<<7 {
                                                                                                dAtA[offset] = uint8(v&0x7f | 0x80)
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 10 other locations - About 35 mins to fix
                                                                                        api/ca.pb.go on lines 1076..1086
                                                                                        api/dispatcher.pb.go on lines 2431..2441
                                                                                        api/health.pb.go on lines 360..370
                                                                                        api/logbroker.pb.go on lines 1704..1714
                                                                                        api/objects.pb.go on lines 2619..2629
                                                                                        api/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 2 locations. Consider refactoring.
                                                                                        Open

                                                                                        func (x *raftStreamRaftMessageClient) CloseAndRecv() (*StreamRaftMessageResponse, error) {
                                                                                            if err := x.ClientStream.CloseSend(); err != nil {
                                                                                                return nil, err
                                                                                            }
                                                                                            m := new(StreamRaftMessageResponse)
                                                                                        Severity: Minor
                                                                                        Found in api/raft.pb.go and 1 other location - About 35 mins to fix
                                                                                        api/logbroker.pb.go on lines 1092..1101

                                                                                        Duplicated Code

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

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

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

                                                                                        Tuning

                                                                                        This issue has a mass of 106.

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

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

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

                                                                                        See codeclimate-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 *JoinRequest) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 11 other locations - About 30 mins to fix
                                                                                        api/ca.pb.go on lines 1372..1383
                                                                                        api/ca.pb.go on lines 1450..1461
                                                                                        api/dispatcher.pb.go on lines 2823..2834
                                                                                        api/dispatcher.pb.go on lines 2936..2947
                                                                                        api/dispatcher.pb.go on lines 2964..2975
                                                                                        api/health.pb.go on lines 479..490
                                                                                        api/raft.pb.go on lines 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 *ResolveAddressResponse) Size() (n int) {
                                                                                            if m == nil {
                                                                                                return 0
                                                                                            }
                                                                                            var l int
                                                                                        Severity: Major
                                                                                        Found in api/raft.pb.go and 11 other locations - About 30 mins to fix
                                                                                        api/ca.pb.go on lines 1372..1383
                                                                                        api/ca.pb.go on lines 1450..1461
                                                                                        api/dispatcher.pb.go on lines 2823..2834
                                                                                        api/dispatcher.pb.go on lines 2936..2947
                                                                                        api/dispatcher.pb.go on lines 2964..2975
                                                                                        api/health.pb.go on lines 479..490
                                                                                        api/raft.pb.go on lines 2449..2460
                                                                                        api/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

                                                                                        There are no issues that match your filters.

                                                                                        Category
                                                                                        Status