docker/swarmkit

View on GitHub
api/logbroker.pb.go

Summary

Maintainability
F
2 mos
Test Coverage

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

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

package api

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Method LogSelector.Unmarshal has 143 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

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

            Method LogContext.Unmarshal has 143 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

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

              Method PublishLogsMessage.Unmarshal has 133 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

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

                Method SubscribeLogsRequest.Unmarshal has 119 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

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

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

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

                    Method LogMessage.Unmarshal has 39 return statements (exceeds 4 allowed).
                    Open

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Method SubscribeLogsRequest.Unmarshal has 23 return statements (exceeds 4 allowed).
                                  Open

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

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

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

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

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

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

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

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

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

                                          Method LogMessage.MarshalToSizedBuffer has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                                          Open

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

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

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

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

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

                                                Method raftProxyLogBrokerServer.PublishLogs has 9 return statements (exceeds 4 allowed).
                                                Open

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

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

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

                                                    Method raftProxyLogBrokerServer.ListenSubscriptions has 8 return statements (exceeds 4 allowed).
                                                    Open

                                                    func (p *raftProxyLogBrokerServer) ListenSubscriptions(r *ListenSubscriptionsRequest, stream LogBroker_ListenSubscriptionsServer) error {
                                                        ctx := stream.Context()
                                                        conn, err := p.connSelector.LeaderConn(ctx)
                                                        if err != nil {
                                                            if err == raftselector.ErrIsLeader {
                                                    Severity: Major
                                                    Found in api/logbroker.pb.go - About 50 mins to fix

                                                      Method raftProxyLogsServer.SubscribeLogs has 8 return statements (exceeds 4 allowed).
                                                      Open

                                                      func (p *raftProxyLogsServer) SubscribeLogs(r *SubscribeLogsRequest, stream Logs_SubscribeLogsServer) error {
                                                          ctx := stream.Context()
                                                          conn, err := p.connSelector.LeaderConn(ctx)
                                                          if err != nil {
                                                              if err == raftselector.ErrIsLeader {
                                                      Severity: Major
                                                      Found in api/logbroker.pb.go - About 50 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

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

                                                          Avoid deeply nested control flow statements.
                                                          Open

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

                                                            Avoid deeply nested control flow statements.
                                                            Open

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

                                                              Avoid deeply nested control flow statements.
                                                              Open

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

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

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

                                                                    Avoid deeply nested control flow statements.
                                                                    Open

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

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

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

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

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 1006.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 979.

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

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

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

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 841.

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

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

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

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 769.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func skipLogbroker(dAtA []byte) (n int, err error) {
                                                                              l := len(dAtA)
                                                                              iNdEx := 0
                                                                              depth := 0
                                                                              for iNdEx < l {
                                                                          Severity: Major
                                                                          Found in api/logbroker.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/objects.pb.go on lines 10049..10126
                                                                          api/raft.pb.go on lines 4496..4573
                                                                          api/resource.pb.go on lines 1144..1221
                                                                          api/snapshot.pb.go on lines 1528..1605
                                                                          api/specs.pb.go on lines 9221..9298
                                                                          api/watch.pb.go on lines 4796..4873
                                                                          protobuf/plugin/plugin.pb.go on lines 1190..1267

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 483.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 455.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func NewRaftProxyLogBrokerServer(local LogBrokerServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) LogBrokerServer {
                                                                              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/logbroker.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/raft.pb.go on lines 2092..2123
                                                                          api/raft.pb.go on lines 2291..2322
                                                                          api/resource.pb.go on lines 570..601
                                                                          api/watch.pb.go on lines 2155..2186

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 415.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func NewRaftProxyLogsServer(local LogsServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) LogsServer {
                                                                              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/logbroker.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 1845..1876
                                                                          api/raft.pb.go on lines 2092..2123
                                                                          api/raft.pb.go on lines 2291..2322
                                                                          api/resource.pb.go on lines 570..601
                                                                          api/watch.pb.go on lines 2155..2186

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 415.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *PublishLogsResponse) Unmarshal(dAtA []byte) error {
                                                                              l := len(dAtA)
                                                                              iNdEx := 0
                                                                              for iNdEx < l {
                                                                                  preIndex := iNdEx
                                                                          Severity: Major
                                                                          Found in api/logbroker.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/raft.pb.go on lines 3501..3550
                                                                          api/raft.pb.go on lines 3637..3686
                                                                          api/raft.pb.go on lines 3773..3822
                                                                          api/resource.pb.go on lines 1094..1143
                                                                          api/specs.pb.go on lines 5503..5552
                                                                          api/specs.pb.go on lines 5641..5690

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 349.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *ListenSubscriptionsRequest) Unmarshal(dAtA []byte) error {
                                                                              l := len(dAtA)
                                                                              iNdEx := 0
                                                                              for iNdEx < l {
                                                                                  preIndex := iNdEx
                                                                          Severity: Major
                                                                          Found in api/logbroker.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 3759..3808
                                                                          api/raft.pb.go on lines 3501..3550
                                                                          api/raft.pb.go on lines 3637..3686
                                                                          api/raft.pb.go on lines 3773..3822
                                                                          api/resource.pb.go on lines 1094..1143
                                                                          api/specs.pb.go on lines 5503..5552
                                                                          api/specs.pb.go on lines 5641..5690

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 349.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *LogContext) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                              i := len(dAtA)
                                                                              _ = i
                                                                              var l int
                                                                              _ = l
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 1 other location - About 4 hrs to fix
                                                                          api/watch.pb.go on lines 1626..1653

                                                                          Duplicated Code

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

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

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                                                                          Open

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

                                                                          Duplicated Code

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

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

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 299.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 299.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                                  case 1:
                                                                                      if wireType != 2 {
                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType)
                                                                                      }
                                                                                      var msglen int
                                                                          Severity: Major
                                                                          Found in api/logbroker.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 3684..3717
                                                                          api/raft.pb.go on lines 4022..4055
                                                                          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 6 locations. Consider refactoring.
                                                                          Open

                                                                                  case 5:
                                                                                      if wireType != 2 {
                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType)
                                                                                      }
                                                                                      var msglen int
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 5 other locations - About 3 hrs to fix
                                                                          api/logbroker.pb.go on lines 3344..3377
                                                                          api/logbroker.pb.go on lines 3684..3717
                                                                          api/raft.pb.go on lines 4022..4055
                                                                          api/specs.pb.go on lines 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 6 locations. Consider refactoring.
                                                                          Open

                                                                                  case 2:
                                                                                      if wireType != 2 {
                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType)
                                                                                      }
                                                                                      var msglen int
                                                                          Severity: Major
                                                                          Found in api/logbroker.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/raft.pb.go on lines 4022..4055
                                                                          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 *SubscribeLogsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                                              i := len(dAtA)
                                                                              _ = i
                                                                              var l int
                                                                              _ = l
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 1 other location - About 2 hrs to fix
                                                                          api/ca.pb.go on lines 846..876

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 245.

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

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

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

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 244.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 241.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 237.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                                  case 1:
                                                                                      if wireType != 2 {
                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType)
                                                                                      }
                                                                                      var msglen int
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 46 other locations - About 2 hrs to fix
                                                                          api/ca.pb.go on lines 2291..2323
                                                                          api/objects.pb.go on lines 6328..6360
                                                                          api/objects.pb.go on lines 6515..6547
                                                                          api/objects.pb.go on lines 6548..6580
                                                                          api/objects.pb.go on lines 6617..6649
                                                                          api/objects.pb.go on lines 6722..6754
                                                                          api/objects.pb.go on lines 6909..6941
                                                                          api/objects.pb.go on lines 6942..6974
                                                                          api/objects.pb.go on lines 7561..7593
                                                                          api/objects.pb.go on lines 7594..7626
                                                                          api/objects.pb.go on lines 7710..7742
                                                                          api/objects.pb.go on lines 7743..7775
                                                                          api/objects.pb.go on lines 7776..7808
                                                                          api/objects.pb.go on lines 8433..8465
                                                                          api/objects.pb.go on lines 8466..8498
                                                                          api/objects.pb.go on lines 8673..8705
                                                                          api/objects.pb.go on lines 8706..8738
                                                                          api/objects.pb.go on lines 8739..8771
                                                                          api/objects.pb.go on lines 9160..9192
                                                                          api/objects.pb.go on lines 9193..9225
                                                                          api/objects.pb.go on lines 9328..9360
                                                                          api/objects.pb.go on lines 9361..9393
                                                                          api/objects.pb.go on lines 9476..9508
                                                                          api/objects.pb.go on lines 9509..9541
                                                                          api/objects.pb.go on lines 9692..9724
                                                                          api/objects.pb.go on lines 9725..9757
                                                                          api/objects.pb.go on lines 9872..9904
                                                                          api/objects.pb.go on lines 9905..9937
                                                                          api/raft.pb.go on lines 3100..3132
                                                                          api/snapshot.pb.go on lines 1441..1473
                                                                          api/snapshot.pb.go on lines 1474..1506
                                                                          api/specs.pb.go on lines 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 *raftProxyLogsServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
                                                                              ticker := rafttime.NewTicker(500 * rafttime.Millisecond)
                                                                              defer ticker.Stop()
                                                                              for {
                                                                                  select {
                                                                          Severity: Major
                                                                          Found in api/logbroker.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 1887..1909
                                                                          api/raft.pb.go on lines 2134..2156
                                                                          api/raft.pb.go on lines 2333..2355
                                                                          api/resource.pb.go on lines 612..634
                                                                          api/watch.pb.go on lines 2197..2219

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 212.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (p *raftProxyLogBrokerServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
                                                                              ticker := rafttime.NewTicker(500 * rafttime.Millisecond)
                                                                              defer ticker.Stop()
                                                                              for {
                                                                                  select {
                                                                          Severity: Major
                                                                          Found in api/logbroker.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/raft.pb.go on lines 2134..2156
                                                                          api/raft.pb.go on lines 2333..2355
                                                                          api/resource.pb.go on lines 612..634
                                                                          api/watch.pb.go on lines 2197..2219

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 212.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *LogSelector) CopyFrom(src interface{}) {
                                                                          
                                                                              o := src.(*LogSelector)
                                                                              *m = *o
                                                                              if o.ServiceIDs != nil {
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 1 other location - About 2 hrs to fix
                                                                          api/specs.pb.go on lines 1992..2011

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 210.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 201.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *LogContext) Size() (n int) {
                                                                              if m == nil {
                                                                                  return 0
                                                                              }
                                                                              var l int
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 1 other location - About 2 hrs to fix
                                                                          api/watch.pb.go on lines 2420..2439

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 190.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (c *logsClient) SubscribeLogs(ctx context.Context, in *SubscribeLogsRequest, opts ...grpc.CallOption) (Logs_SubscribeLogsClient, error) {
                                                                              stream, err := c.cc.NewStream(ctx, &_Logs_serviceDesc.Streams[0], "/docker.swarmkit.v1.Logs/SubscribeLogs", opts...)
                                                                              if err != nil {
                                                                                  return nil, err
                                                                              }
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 4 other locations - About 1 hr to fix
                                                                          api/dispatcher.pb.go on lines 1384..1397
                                                                          api/dispatcher.pb.go on lines 1476..1489
                                                                          api/logbroker.pb.go on lines 1037..1050
                                                                          api/watch.pb.go on lines 1245..1258

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 179.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (c *logBrokerClient) ListenSubscriptions(ctx context.Context, in *ListenSubscriptionsRequest, opts ...grpc.CallOption) (LogBroker_ListenSubscriptionsClient, error) {
                                                                              stream, err := c.cc.NewStream(ctx, &_LogBroker_serviceDesc.Streams[0], "/docker.swarmkit.v1.LogBroker/ListenSubscriptions", opts...)
                                                                              if err != nil {
                                                                                  return nil, err
                                                                              }
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 4 other locations - About 1 hr to fix
                                                                          api/dispatcher.pb.go on lines 1384..1397
                                                                          api/dispatcher.pb.go on lines 1476..1489
                                                                          api/logbroker.pb.go on lines 924..937
                                                                          api/watch.pb.go on lines 1245..1258

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 179.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *SubscribeLogsRequest) Size() (n int) {
                                                                              if m == nil {
                                                                                  return 0
                                                                              }
                                                                              var l int
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 1 other location - About 1 hr to fix
                                                                          api/ca.pb.go on lines 1385..1400

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 158.

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

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

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

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 146.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                                  case 2:
                                                                                      if wireType != 0 {
                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Follow", wireType)
                                                                                      }
                                                                                      var v int
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 16 other locations - About 1 hr to fix
                                                                          api/dispatcher.pb.go on lines 4298..4317
                                                                          api/logbroker.pb.go on lines 3582..3601
                                                                          api/logbroker.pb.go on lines 3718..3737
                                                                          api/objects.pb.go on lines 7083..7102
                                                                          api/objects.pb.go on lines 8571..8590
                                                                          api/objects.pb.go on lines 8988..9007
                                                                          api/objects.pb.go on lines 9226..9245
                                                                          api/objects.pb.go on lines 10008..10027
                                                                          api/specs.pb.go on lines 6898..6917
                                                                          api/specs.pb.go on lines 7054..7073
                                                                          api/specs.pb.go on lines 7074..7093
                                                                          api/specs.pb.go on lines 8084..8103
                                                                          api/specs.pb.go on lines 8104..8123
                                                                          api/specs.pb.go on lines 8160..8179
                                                                          api/specs.pb.go on lines 8180..8199
                                                                          api/watch.pb.go on lines 4359..4378

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 142.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                                  case 3:
                                                                                      if wireType != 0 {
                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Close", wireType)
                                                                                      }
                                                                                      var v int
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 16 other locations - About 1 hr to fix
                                                                          api/dispatcher.pb.go on lines 4298..4317
                                                                          api/logbroker.pb.go on lines 2485..2504
                                                                          api/logbroker.pb.go on lines 3582..3601
                                                                          api/objects.pb.go on lines 7083..7102
                                                                          api/objects.pb.go on lines 8571..8590
                                                                          api/objects.pb.go on lines 8988..9007
                                                                          api/objects.pb.go on lines 9226..9245
                                                                          api/objects.pb.go on lines 10008..10027
                                                                          api/specs.pb.go on lines 6898..6917
                                                                          api/specs.pb.go on lines 7054..7073
                                                                          api/specs.pb.go on lines 7074..7093
                                                                          api/specs.pb.go on lines 8084..8103
                                                                          api/specs.pb.go on lines 8104..8123
                                                                          api/specs.pb.go on lines 8160..8179
                                                                          api/specs.pb.go on lines 8180..8199
                                                                          api/watch.pb.go on lines 4359..4378

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 142.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                                  case 4:
                                                                                      if wireType != 0 {
                                                                                          return fmt.Errorf("proto: wrong wireType = %d for field Close", wireType)
                                                                                      }
                                                                                      var v int
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 16 other locations - About 1 hr to fix
                                                                          api/dispatcher.pb.go on lines 4298..4317
                                                                          api/logbroker.pb.go on lines 2485..2504
                                                                          api/logbroker.pb.go on lines 3718..3737
                                                                          api/objects.pb.go on lines 7083..7102
                                                                          api/objects.pb.go on lines 8571..8590
                                                                          api/objects.pb.go on lines 8988..9007
                                                                          api/objects.pb.go on lines 9226..9245
                                                                          api/objects.pb.go on lines 10008..10027
                                                                          api/specs.pb.go on lines 6898..6917
                                                                          api/specs.pb.go on lines 7054..7073
                                                                          api/specs.pb.go on lines 7074..7093
                                                                          api/specs.pb.go on lines 8084..8103
                                                                          api/specs.pb.go on lines 8104..8123
                                                                          api/specs.pb.go on lines 8160..8179
                                                                          api/specs.pb.go on lines 8180..8199
                                                                          api/watch.pb.go on lines 4359..4378

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 142.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *SubscriptionMessage) CopyFrom(src interface{}) {
                                                                          
                                                                              o := src.(*SubscriptionMessage)
                                                                              *m = *o
                                                                              if o.Selector != nil {
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 3 other locations - About 1 hr to fix
                                                                          api/ca.pb.go on lines 466..478
                                                                          api/logbroker.pb.go on lines 793..805
                                                                          api/watch.pb.go on lines 1203..1215

                                                                          Duplicated Code

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

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

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
                                                                          Open

                                                                          func (m *SubscribeLogsRequest) CopyFrom(src interface{}) {
                                                                          
                                                                              o := src.(*SubscribeLogsRequest)
                                                                              *m = *o
                                                                              if o.Selector != nil {
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 3 other locations - About 1 hr to fix
                                                                          api/ca.pb.go on lines 466..478
                                                                          api/logbroker.pb.go on lines 848..860
                                                                          api/watch.pb.go on lines 1203..1215

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 142.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *PublishLogsMessage) CopyFrom(src interface{}) {
                                                                          
                                                                              o := src.(*PublishLogsMessage)
                                                                              *m = *o
                                                                              if o.Messages != nil {
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 2 other locations - About 1 hr to fix
                                                                          api/logbroker.pb.go on lines 816..827
                                                                          api/raft.pb.go on lines 1014..1025

                                                                          Duplicated Code

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

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

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 *SubscribeLogsMessage) CopyFrom(src interface{}) {
                                                                          
                                                                              o := src.(*SubscribeLogsMessage)
                                                                              *m = *o
                                                                              if o.Messages != nil {
                                                                          Severity: Major
                                                                          Found in api/logbroker.pb.go and 2 other locations - About 1 hr to fix
                                                                          api/logbroker.pb.go on lines 871..882
                                                                          api/raft.pb.go on lines 1014..1025

                                                                          Duplicated Code

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

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

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 5 locations. Consider refactoring.
                                                                          Open

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 129.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 129.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

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

                                                                          Duplicated Code

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

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

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 *raftProxyLogBrokerServer) 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/logbroker.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/raft.pb.go on lines 2124..2133
                                                                          api/raft.pb.go on lines 2323..2332
                                                                          api/resource.pb.go on lines 602..611
                                                                          api/watch.pb.go on lines 2187..2196

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 120.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (p *raftProxyLogsServer) 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/logbroker.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 1877..1886
                                                                          api/raft.pb.go on lines 2124..2133
                                                                          api/raft.pb.go on lines 2323..2332
                                                                          api/resource.pb.go on lines 602..611
                                                                          api/watch.pb.go on lines 2187..2196

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 120.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *SubscribeLogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                              if deterministic {
                                                                                  return xxx_messageInfo_SubscribeLogsRequest.Marshal(b, m, deterministic)
                                                                              } else {
                                                                                  b = b[:cap(b)]
                                                                          Severity: Major
                                                                          Found in api/logbroker.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 347..358
                                                                          api/logbroker.pb.go on lines 384..395
                                                                          api/logbroker.pb.go on lines 432..443
                                                                          api/logbroker.pb.go on lines 477..488
                                                                          api/logbroker.pb.go on lines 512..523
                                                                          api/objects.pb.go on lines 51..62
                                                                          api/objects.pb.go on lines 123..134
                                                                          api/objects.pb.go on lines 190..201
                                                                          api/objects.pb.go on lines 235..246
                                                                          api/objects.pb.go on lines 283..294
                                                                          api/objects.pb.go on lines 382..393
                                                                          api/objects.pb.go on lines 430..441
                                                                          api/objects.pb.go on lines 486..497
                                                                          api/objects.pb.go on lines 558..569
                                                                          api/objects.pb.go on lines 602..613
                                                                          api/objects.pb.go on lines 644..655
                                                                          api/objects.pb.go on lines 692..703
                                                                          api/objects.pb.go on lines 733..744
                                                                          api/objects.pb.go on lines 790..801
                                                                          api/raft.pb.go on lines 90..101
                                                                          api/raft.pb.go on lines 127..138
                                                                          api/raft.pb.go on lines 169..180
                                                                          api/raft.pb.go on lines 205..216
                                                                          api/raft.pb.go on lines 240..251
                                                                          api/raft.pb.go on lines 276..287
                                                                          api/raft.pb.go on lines 311..322
                                                                          api/raft.pb.go on lines 348..359
                                                                          api/raft.pb.go on lines 384..395
                                                                          api/raft.pb.go on lines 421..432
                                                                          api/raft.pb.go on lines 458..469
                                                                          api/raft.pb.go on lines 498..509
                                                                          api/raft.pb.go on lines 547..558
                                                                          api/resource.pb.go on lines 51..62
                                                                          api/resource.pb.go on lines 87..98
                                                                          api/resource.pb.go on lines 123..134
                                                                          api/resource.pb.go on lines 158..169
                                                                          api/snapshot.pb.go on lines 73..84
                                                                          api/snapshot.pb.go on lines 111..122
                                                                          api/snapshot.pb.go on lines 149..160
                                                                          api/specs.pb.go on lines 211..222
                                                                          api/specs.pb.go on lines 274..285
                                                                          api/specs.pb.go on lines 380..391
                                                                          api/specs.pb.go on lines 416..427
                                                                          api/specs.pb.go on lines 461..472
                                                                          api/specs.pb.go on lines 498..509
                                                                          api/specs.pb.go on lines 565..576
                                                                          api/specs.pb.go on lines 659..670
                                                                          api/specs.pb.go on lines 696..707
                                                                          api/specs.pb.go on lines 736..747
                                                                          api/specs.pb.go on lines 891..902
                                                                          api/specs.pb.go on lines 932..943
                                                                          api/specs.pb.go on lines 977..988
                                                                          api/specs.pb.go on lines 1015..1026
                                                                          api/specs.pb.go on lines 1056..1067
                                                                          api/specs.pb.go on lines 1119..1130
                                                                          api/specs.pb.go on lines 1205..1216
                                                                          api/specs.pb.go on lines 1252..1263
                                                                          api/specs.pb.go on lines 1299..1310
                                                                          api/specs.pb.go on lines 1376..1387
                                                                          api/watch.pb.go on lines 95..106
                                                                          api/watch.pb.go on lines 275..286
                                                                          api/watch.pb.go on lines 313..324
                                                                          api/watch.pb.go on lines 370..381
                                                                          api/watch.pb.go on lines 633..644
                                                                          api/watch.pb.go on lines 677..688
                                                                          api/watch.pb.go on lines 719..730
                                                                          api/watch.pb.go on lines 764..775
                                                                          protobuf/plugin/plugin.pb.go on lines 58..69
                                                                          protobuf/plugin/plugin.pb.go on lines 94..105
                                                                          protobuf/plugin/plugin.pb.go on lines 135..146

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 115.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *SubscriptionMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                              if deterministic {
                                                                                  return xxx_messageInfo_SubscriptionMessage.Marshal(b, m, deterministic)
                                                                              } else {
                                                                                  b = b[:cap(b)]
                                                                          Severity: Major
                                                                          Found in api/logbroker.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 477..488
                                                                          api/logbroker.pb.go on lines 512..523
                                                                          api/objects.pb.go on lines 51..62
                                                                          api/objects.pb.go on lines 123..134
                                                                          api/objects.pb.go on lines 190..201
                                                                          api/objects.pb.go on lines 235..246
                                                                          api/objects.pb.go on lines 283..294
                                                                          api/objects.pb.go on lines 382..393
                                                                          api/objects.pb.go on lines 430..441
                                                                          api/objects.pb.go on lines 486..497
                                                                          api/objects.pb.go on lines 558..569
                                                                          api/objects.pb.go on lines 602..613
                                                                          api/objects.pb.go on lines 644..655
                                                                          api/objects.pb.go on lines 692..703
                                                                          api/objects.pb.go on lines 733..744
                                                                          api/objects.pb.go on lines 790..801
                                                                          api/raft.pb.go on lines 90..101
                                                                          api/raft.pb.go on lines 127..138
                                                                          api/raft.pb.go on lines 169..180
                                                                          api/raft.pb.go on lines 205..216
                                                                          api/raft.pb.go on lines 240..251
                                                                          api/raft.pb.go on lines 276..287
                                                                          api/raft.pb.go on lines 311..322
                                                                          api/raft.pb.go on lines 348..359
                                                                          api/raft.pb.go on lines 384..395
                                                                          api/raft.pb.go on lines 421..432
                                                                          api/raft.pb.go on lines 458..469
                                                                          api/raft.pb.go on lines 498..509
                                                                          api/raft.pb.go on lines 547..558
                                                                          api/resource.pb.go on lines 51..62
                                                                          api/resource.pb.go on lines 87..98
                                                                          api/resource.pb.go on lines 123..134
                                                                          api/resource.pb.go on lines 158..169
                                                                          api/snapshot.pb.go on lines 73..84
                                                                          api/snapshot.pb.go on lines 111..122
                                                                          api/snapshot.pb.go on lines 149..160
                                                                          api/specs.pb.go on lines 211..222
                                                                          api/specs.pb.go on lines 274..285
                                                                          api/specs.pb.go on lines 380..391
                                                                          api/specs.pb.go on lines 416..427
                                                                          api/specs.pb.go on lines 461..472
                                                                          api/specs.pb.go on lines 498..509
                                                                          api/specs.pb.go on lines 565..576
                                                                          api/specs.pb.go on lines 659..670
                                                                          api/specs.pb.go on lines 696..707
                                                                          api/specs.pb.go on lines 736..747
                                                                          api/specs.pb.go on lines 891..902
                                                                          api/specs.pb.go on lines 932..943
                                                                          api/specs.pb.go on lines 977..988
                                                                          api/specs.pb.go on lines 1015..1026
                                                                          api/specs.pb.go on lines 1056..1067
                                                                          api/specs.pb.go on lines 1119..1130
                                                                          api/specs.pb.go on lines 1205..1216
                                                                          api/specs.pb.go on lines 1252..1263
                                                                          api/specs.pb.go on lines 1299..1310
                                                                          api/specs.pb.go on lines 1376..1387
                                                                          api/watch.pb.go on lines 95..106
                                                                          api/watch.pb.go on lines 275..286
                                                                          api/watch.pb.go on lines 313..324
                                                                          api/watch.pb.go on lines 370..381
                                                                          api/watch.pb.go on lines 633..644
                                                                          api/watch.pb.go on lines 677..688
                                                                          api/watch.pb.go on lines 719..730
                                                                          api/watch.pb.go on lines 764..775
                                                                          protobuf/plugin/plugin.pb.go on lines 58..69
                                                                          protobuf/plugin/plugin.pb.go on lines 94..105
                                                                          protobuf/plugin/plugin.pb.go on lines 135..146

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 115.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *ListenSubscriptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                              if deterministic {
                                                                                  return xxx_messageInfo_ListenSubscriptionsRequest.Marshal(b, m, deterministic)
                                                                              } else {
                                                                                  b = b[:cap(b)]
                                                                          Severity: Major
                                                                          Found in api/logbroker.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 432..443
                                                                          api/logbroker.pb.go on lines 477..488
                                                                          api/logbroker.pb.go on lines 512..523
                                                                          api/objects.pb.go on lines 51..62
                                                                          api/objects.pb.go on lines 123..134
                                                                          api/objects.pb.go on lines 190..201
                                                                          api/objects.pb.go on lines 235..246
                                                                          api/objects.pb.go on lines 283..294
                                                                          api/objects.pb.go on lines 382..393
                                                                          api/objects.pb.go on lines 430..441
                                                                          api/objects.pb.go on lines 486..497
                                                                          api/objects.pb.go on lines 558..569
                                                                          api/objects.pb.go on lines 602..613
                                                                          api/objects.pb.go on lines 644..655
                                                                          api/objects.pb.go on lines 692..703
                                                                          api/objects.pb.go on lines 733..744
                                                                          api/objects.pb.go on lines 790..801
                                                                          api/raft.pb.go on lines 90..101
                                                                          api/raft.pb.go on lines 127..138
                                                                          api/raft.pb.go on lines 169..180
                                                                          api/raft.pb.go on lines 205..216
                                                                          api/raft.pb.go on lines 240..251
                                                                          api/raft.pb.go on lines 276..287
                                                                          api/raft.pb.go on lines 311..322
                                                                          api/raft.pb.go on lines 348..359
                                                                          api/raft.pb.go on lines 384..395
                                                                          api/raft.pb.go on lines 421..432
                                                                          api/raft.pb.go on lines 458..469
                                                                          api/raft.pb.go on lines 498..509
                                                                          api/raft.pb.go on lines 547..558
                                                                          api/resource.pb.go on lines 51..62
                                                                          api/resource.pb.go on lines 87..98
                                                                          api/resource.pb.go on lines 123..134
                                                                          api/resource.pb.go on lines 158..169
                                                                          api/snapshot.pb.go on lines 73..84
                                                                          api/snapshot.pb.go on lines 111..122
                                                                          api/snapshot.pb.go on lines 149..160
                                                                          api/specs.pb.go on lines 211..222
                                                                          api/specs.pb.go on lines 274..285
                                                                          api/specs.pb.go on lines 380..391
                                                                          api/specs.pb.go on lines 416..427
                                                                          api/specs.pb.go on lines 461..472
                                                                          api/specs.pb.go on lines 498..509
                                                                          api/specs.pb.go on lines 565..576
                                                                          api/specs.pb.go on lines 659..670
                                                                          api/specs.pb.go on lines 696..707
                                                                          api/specs.pb.go on lines 736..747
                                                                          api/specs.pb.go on lines 891..902
                                                                          api/specs.pb.go on lines 932..943
                                                                          api/specs.pb.go on lines 977..988
                                                                          api/specs.pb.go on lines 1015..1026
                                                                          api/specs.pb.go on lines 1056..1067
                                                                          api/specs.pb.go on lines 1119..1130
                                                                          api/specs.pb.go on lines 1205..1216
                                                                          api/specs.pb.go on lines 1252..1263
                                                                          api/specs.pb.go on lines 1299..1310
                                                                          api/specs.pb.go on lines 1376..1387
                                                                          api/watch.pb.go on lines 95..106
                                                                          api/watch.pb.go on lines 275..286
                                                                          api/watch.pb.go on lines 313..324
                                                                          api/watch.pb.go on lines 370..381
                                                                          api/watch.pb.go on lines 633..644
                                                                          api/watch.pb.go on lines 677..688
                                                                          api/watch.pb.go on lines 719..730
                                                                          api/watch.pb.go on lines 764..775
                                                                          protobuf/plugin/plugin.pb.go on lines 58..69
                                                                          protobuf/plugin/plugin.pb.go on lines 94..105
                                                                          protobuf/plugin/plugin.pb.go on lines 135..146

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 115.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *PublishLogsMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                              if deterministic {
                                                                                  return xxx_messageInfo_PublishLogsMessage.Marshal(b, m, deterministic)
                                                                              } else {
                                                                                  b = b[:cap(b)]
                                                                          Severity: Major
                                                                          Found in api/logbroker.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 512..523
                                                                          api/objects.pb.go on lines 51..62
                                                                          api/objects.pb.go on lines 123..134
                                                                          api/objects.pb.go on lines 190..201
                                                                          api/objects.pb.go on lines 235..246
                                                                          api/objects.pb.go on lines 283..294
                                                                          api/objects.pb.go on lines 382..393
                                                                          api/objects.pb.go on lines 430..441
                                                                          api/objects.pb.go on lines 486..497
                                                                          api/objects.pb.go on lines 558..569
                                                                          api/objects.pb.go on lines 602..613
                                                                          api/objects.pb.go on lines 644..655
                                                                          api/objects.pb.go on lines 692..703
                                                                          api/objects.pb.go on lines 733..744
                                                                          api/objects.pb.go on lines 790..801
                                                                          api/raft.pb.go on lines 90..101
                                                                          api/raft.pb.go on lines 127..138
                                                                          api/raft.pb.go on lines 169..180
                                                                          api/raft.pb.go on lines 205..216
                                                                          api/raft.pb.go on lines 240..251
                                                                          api/raft.pb.go on lines 276..287
                                                                          api/raft.pb.go on lines 311..322
                                                                          api/raft.pb.go on lines 348..359
                                                                          api/raft.pb.go on lines 384..395
                                                                          api/raft.pb.go on lines 421..432
                                                                          api/raft.pb.go on lines 458..469
                                                                          api/raft.pb.go on lines 498..509
                                                                          api/raft.pb.go on lines 547..558
                                                                          api/resource.pb.go on lines 51..62
                                                                          api/resource.pb.go on lines 87..98
                                                                          api/resource.pb.go on lines 123..134
                                                                          api/resource.pb.go on lines 158..169
                                                                          api/snapshot.pb.go on lines 73..84
                                                                          api/snapshot.pb.go on lines 111..122
                                                                          api/snapshot.pb.go on lines 149..160
                                                                          api/specs.pb.go on lines 211..222
                                                                          api/specs.pb.go on lines 274..285
                                                                          api/specs.pb.go on lines 380..391
                                                                          api/specs.pb.go on lines 416..427
                                                                          api/specs.pb.go on lines 461..472
                                                                          api/specs.pb.go on lines 498..509
                                                                          api/specs.pb.go on lines 565..576
                                                                          api/specs.pb.go on lines 659..670
                                                                          api/specs.pb.go on lines 696..707
                                                                          api/specs.pb.go on lines 736..747
                                                                          api/specs.pb.go on lines 891..902
                                                                          api/specs.pb.go on lines 932..943
                                                                          api/specs.pb.go on lines 977..988
                                                                          api/specs.pb.go on lines 1015..1026
                                                                          api/specs.pb.go on lines 1056..1067
                                                                          api/specs.pb.go on lines 1119..1130
                                                                          api/specs.pb.go on lines 1205..1216
                                                                          api/specs.pb.go on lines 1252..1263
                                                                          api/specs.pb.go on lines 1299..1310
                                                                          api/specs.pb.go on lines 1376..1387
                                                                          api/watch.pb.go on lines 95..106
                                                                          api/watch.pb.go on lines 275..286
                                                                          api/watch.pb.go on lines 313..324
                                                                          api/watch.pb.go on lines 370..381
                                                                          api/watch.pb.go on lines 633..644
                                                                          api/watch.pb.go on lines 677..688
                                                                          api/watch.pb.go on lines 719..730
                                                                          api/watch.pb.go on lines 764..775
                                                                          protobuf/plugin/plugin.pb.go on lines 58..69
                                                                          protobuf/plugin/plugin.pb.go on lines 94..105
                                                                          protobuf/plugin/plugin.pb.go on lines 135..146

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 115.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *LogSubscriptionOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                              if deterministic {
                                                                                  return xxx_messageInfo_LogSubscriptionOptions.Marshal(b, m, deterministic)
                                                                              } else {
                                                                                  b = b[:cap(b)]
                                                                          Severity: Major
                                                                          Found in api/logbroker.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 148..159
                                                                          api/logbroker.pb.go on lines 187..198
                                                                          api/logbroker.pb.go on lines 225..236
                                                                          api/logbroker.pb.go on lines 273..284
                                                                          api/logbroker.pb.go on lines 311..322
                                                                          api/logbroker.pb.go on lines 347..358
                                                                          api/logbroker.pb.go on lines 384..395
                                                                          api/logbroker.pb.go on lines 432..443
                                                                          api/logbroker.pb.go on lines 477..488
                                                                          api/logbroker.pb.go on lines 512..523
                                                                          api/objects.pb.go on lines 51..62
                                                                          api/objects.pb.go on lines 123..134
                                                                          api/objects.pb.go on lines 190..201
                                                                          api/objects.pb.go on lines 235..246
                                                                          api/objects.pb.go on lines 283..294
                                                                          api/objects.pb.go on lines 382..393
                                                                          api/objects.pb.go on lines 430..441
                                                                          api/objects.pb.go on lines 486..497
                                                                          api/objects.pb.go on lines 558..569
                                                                          api/objects.pb.go on lines 602..613
                                                                          api/objects.pb.go on lines 644..655
                                                                          api/objects.pb.go on lines 692..703
                                                                          api/objects.pb.go on lines 733..744
                                                                          api/objects.pb.go on lines 790..801
                                                                          api/raft.pb.go on lines 90..101
                                                                          api/raft.pb.go on lines 127..138
                                                                          api/raft.pb.go on lines 169..180
                                                                          api/raft.pb.go on lines 205..216
                                                                          api/raft.pb.go on lines 240..251
                                                                          api/raft.pb.go on lines 276..287
                                                                          api/raft.pb.go on lines 311..322
                                                                          api/raft.pb.go on lines 348..359
                                                                          api/raft.pb.go on lines 384..395
                                                                          api/raft.pb.go on lines 421..432
                                                                          api/raft.pb.go on lines 458..469
                                                                          api/raft.pb.go on lines 498..509
                                                                          api/raft.pb.go on lines 547..558
                                                                          api/resource.pb.go on lines 51..62
                                                                          api/resource.pb.go on lines 87..98
                                                                          api/resource.pb.go on lines 123..134
                                                                          api/resource.pb.go on lines 158..169
                                                                          api/snapshot.pb.go on lines 73..84
                                                                          api/snapshot.pb.go on lines 111..122
                                                                          api/snapshot.pb.go on lines 149..160
                                                                          api/specs.pb.go on lines 211..222
                                                                          api/specs.pb.go on lines 274..285
                                                                          api/specs.pb.go on lines 380..391
                                                                          api/specs.pb.go on lines 416..427
                                                                          api/specs.pb.go on lines 461..472
                                                                          api/specs.pb.go on lines 498..509
                                                                          api/specs.pb.go on lines 565..576
                                                                          api/specs.pb.go on lines 659..670
                                                                          api/specs.pb.go on lines 696..707
                                                                          api/specs.pb.go on lines 736..747
                                                                          api/specs.pb.go on lines 891..902
                                                                          api/specs.pb.go on lines 932..943
                                                                          api/specs.pb.go on lines 977..988
                                                                          api/specs.pb.go on lines 1015..1026
                                                                          api/specs.pb.go on lines 1056..1067
                                                                          api/specs.pb.go on lines 1119..1130
                                                                          api/specs.pb.go on lines 1205..1216
                                                                          api/specs.pb.go on lines 1252..1263
                                                                          api/specs.pb.go on lines 1299..1310
                                                                          api/specs.pb.go on lines 1376..1387
                                                                          api/watch.pb.go on lines 95..106
                                                                          api/watch.pb.go on lines 275..286
                                                                          api/watch.pb.go on lines 313..324
                                                                          api/watch.pb.go on lines 370..381
                                                                          api/watch.pb.go on lines 633..644
                                                                          api/watch.pb.go on lines 677..688
                                                                          api/watch.pb.go on lines 719..730
                                                                          api/watch.pb.go on lines 764..775
                                                                          protobuf/plugin/plugin.pb.go on lines 58..69
                                                                          protobuf/plugin/plugin.pb.go on lines 94..105
                                                                          protobuf/plugin/plugin.pb.go on lines 135..146

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 115.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *LogMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                              if deterministic {
                                                                                  return xxx_messageInfo_LogMessage.Marshal(b, m, deterministic)
                                                                              } else {
                                                                                  b = b[:cap(b)]
                                                                          Severity: Major
                                                                          Found in api/logbroker.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 311..322
                                                                          api/logbroker.pb.go on lines 347..358
                                                                          api/logbroker.pb.go on lines 384..395
                                                                          api/logbroker.pb.go on lines 432..443
                                                                          api/logbroker.pb.go on lines 477..488
                                                                          api/logbroker.pb.go on lines 512..523
                                                                          api/objects.pb.go on lines 51..62
                                                                          api/objects.pb.go on lines 123..134
                                                                          api/objects.pb.go on lines 190..201
                                                                          api/objects.pb.go on lines 235..246
                                                                          api/objects.pb.go on lines 283..294
                                                                          api/objects.pb.go on lines 382..393
                                                                          api/objects.pb.go on lines 430..441
                                                                          api/objects.pb.go on lines 486..497
                                                                          api/objects.pb.go on lines 558..569
                                                                          api/objects.pb.go on lines 602..613
                                                                          api/objects.pb.go on lines 644..655
                                                                          api/objects.pb.go on lines 692..703
                                                                          api/objects.pb.go on lines 733..744
                                                                          api/objects.pb.go on lines 790..801
                                                                          api/raft.pb.go on lines 90..101
                                                                          api/raft.pb.go on lines 127..138
                                                                          api/raft.pb.go on lines 169..180
                                                                          api/raft.pb.go on lines 205..216
                                                                          api/raft.pb.go on lines 240..251
                                                                          api/raft.pb.go on lines 276..287
                                                                          api/raft.pb.go on lines 311..322
                                                                          api/raft.pb.go on lines 348..359
                                                                          api/raft.pb.go on lines 384..395
                                                                          api/raft.pb.go on lines 421..432
                                                                          api/raft.pb.go on lines 458..469
                                                                          api/raft.pb.go on lines 498..509
                                                                          api/raft.pb.go on lines 547..558
                                                                          api/resource.pb.go on lines 51..62
                                                                          api/resource.pb.go on lines 87..98
                                                                          api/resource.pb.go on lines 123..134
                                                                          api/resource.pb.go on lines 158..169
                                                                          api/snapshot.pb.go on lines 73..84
                                                                          api/snapshot.pb.go on lines 111..122
                                                                          api/snapshot.pb.go on lines 149..160
                                                                          api/specs.pb.go on lines 211..222
                                                                          api/specs.pb.go on lines 274..285
                                                                          api/specs.pb.go on lines 380..391
                                                                          api/specs.pb.go on lines 416..427
                                                                          api/specs.pb.go on lines 461..472
                                                                          api/specs.pb.go on lines 498..509
                                                                          api/specs.pb.go on lines 565..576
                                                                          api/specs.pb.go on lines 659..670
                                                                          api/specs.pb.go on lines 696..707
                                                                          api/specs.pb.go on lines 736..747
                                                                          api/specs.pb.go on lines 891..902
                                                                          api/specs.pb.go on lines 932..943
                                                                          api/specs.pb.go on lines 977..988
                                                                          api/specs.pb.go on lines 1015..1026
                                                                          api/specs.pb.go on lines 1056..1067
                                                                          api/specs.pb.go on lines 1119..1130
                                                                          api/specs.pb.go on lines 1205..1216
                                                                          api/specs.pb.go on lines 1252..1263
                                                                          api/specs.pb.go on lines 1299..1310
                                                                          api/specs.pb.go on lines 1376..1387
                                                                          api/watch.pb.go on lines 95..106
                                                                          api/watch.pb.go on lines 275..286
                                                                          api/watch.pb.go on lines 313..324
                                                                          api/watch.pb.go on lines 370..381
                                                                          api/watch.pb.go on lines 633..644
                                                                          api/watch.pb.go on lines 677..688
                                                                          api/watch.pb.go on lines 719..730
                                                                          api/watch.pb.go on lines 764..775
                                                                          protobuf/plugin/plugin.pb.go on lines 58..69
                                                                          protobuf/plugin/plugin.pb.go on lines 94..105
                                                                          protobuf/plugin/plugin.pb.go on lines 135..146

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 115.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *LogContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                              if deterministic {
                                                                                  return xxx_messageInfo_LogContext.Marshal(b, m, deterministic)
                                                                              } else {
                                                                                  b = b[:cap(b)]
                                                                          Severity: Major
                                                                          Found in api/logbroker.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 225..236
                                                                          api/logbroker.pb.go on lines 273..284
                                                                          api/logbroker.pb.go on lines 311..322
                                                                          api/logbroker.pb.go on lines 347..358
                                                                          api/logbroker.pb.go on lines 384..395
                                                                          api/logbroker.pb.go on lines 432..443
                                                                          api/logbroker.pb.go on lines 477..488
                                                                          api/logbroker.pb.go on lines 512..523
                                                                          api/objects.pb.go on lines 51..62
                                                                          api/objects.pb.go on lines 123..134
                                                                          api/objects.pb.go on lines 190..201
                                                                          api/objects.pb.go on lines 235..246
                                                                          api/objects.pb.go on lines 283..294
                                                                          api/objects.pb.go on lines 382..393
                                                                          api/objects.pb.go on lines 430..441
                                                                          api/objects.pb.go on lines 486..497
                                                                          api/objects.pb.go on lines 558..569
                                                                          api/objects.pb.go on lines 602..613
                                                                          api/objects.pb.go on lines 644..655
                                                                          api/objects.pb.go on lines 692..703
                                                                          api/objects.pb.go on lines 733..744
                                                                          api/objects.pb.go on lines 790..801
                                                                          api/raft.pb.go on lines 90..101
                                                                          api/raft.pb.go on lines 127..138
                                                                          api/raft.pb.go on lines 169..180
                                                                          api/raft.pb.go on lines 205..216
                                                                          api/raft.pb.go on lines 240..251
                                                                          api/raft.pb.go on lines 276..287
                                                                          api/raft.pb.go on lines 311..322
                                                                          api/raft.pb.go on lines 348..359
                                                                          api/raft.pb.go on lines 384..395
                                                                          api/raft.pb.go on lines 421..432
                                                                          api/raft.pb.go on lines 458..469
                                                                          api/raft.pb.go on lines 498..509
                                                                          api/raft.pb.go on lines 547..558
                                                                          api/resource.pb.go on lines 51..62
                                                                          api/resource.pb.go on lines 87..98
                                                                          api/resource.pb.go on lines 123..134
                                                                          api/resource.pb.go on lines 158..169
                                                                          api/snapshot.pb.go on lines 73..84
                                                                          api/snapshot.pb.go on lines 111..122
                                                                          api/snapshot.pb.go on lines 149..160
                                                                          api/specs.pb.go on lines 211..222
                                                                          api/specs.pb.go on lines 274..285
                                                                          api/specs.pb.go on lines 380..391
                                                                          api/specs.pb.go on lines 416..427
                                                                          api/specs.pb.go on lines 461..472
                                                                          api/specs.pb.go on lines 498..509
                                                                          api/specs.pb.go on lines 565..576
                                                                          api/specs.pb.go on lines 659..670
                                                                          api/specs.pb.go on lines 696..707
                                                                          api/specs.pb.go on lines 736..747
                                                                          api/specs.pb.go on lines 891..902
                                                                          api/specs.pb.go on lines 932..943
                                                                          api/specs.pb.go on lines 977..988
                                                                          api/specs.pb.go on lines 1015..1026
                                                                          api/specs.pb.go on lines 1056..1067
                                                                          api/specs.pb.go on lines 1119..1130
                                                                          api/specs.pb.go on lines 1205..1216
                                                                          api/specs.pb.go on lines 1252..1263
                                                                          api/specs.pb.go on lines 1299..1310
                                                                          api/specs.pb.go on lines 1376..1387
                                                                          api/watch.pb.go on lines 95..106
                                                                          api/watch.pb.go on lines 275..286
                                                                          api/watch.pb.go on lines 313..324
                                                                          api/watch.pb.go on lines 370..381
                                                                          api/watch.pb.go on lines 633..644
                                                                          api/watch.pb.go on lines 677..688
                                                                          api/watch.pb.go on lines 719..730
                                                                          api/watch.pb.go on lines 764..775
                                                                          protobuf/plugin/plugin.pb.go on lines 58..69
                                                                          protobuf/plugin/plugin.pb.go on lines 94..105
                                                                          protobuf/plugin/plugin.pb.go on lines 135..146

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 115.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *LogSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                              if deterministic {
                                                                                  return xxx_messageInfo_LogSelector.Marshal(b, m, deterministic)
                                                                              } else {
                                                                                  b = b[:cap(b)]
                                                                          Severity: Major
                                                                          Found in api/logbroker.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 187..198
                                                                          api/logbroker.pb.go on lines 225..236
                                                                          api/logbroker.pb.go on lines 273..284
                                                                          api/logbroker.pb.go on lines 311..322
                                                                          api/logbroker.pb.go on lines 347..358
                                                                          api/logbroker.pb.go on lines 384..395
                                                                          api/logbroker.pb.go on lines 432..443
                                                                          api/logbroker.pb.go on lines 477..488
                                                                          api/logbroker.pb.go on lines 512..523
                                                                          api/objects.pb.go on lines 51..62
                                                                          api/objects.pb.go on lines 123..134
                                                                          api/objects.pb.go on lines 190..201
                                                                          api/objects.pb.go on lines 235..246
                                                                          api/objects.pb.go on lines 283..294
                                                                          api/objects.pb.go on lines 382..393
                                                                          api/objects.pb.go on lines 430..441
                                                                          api/objects.pb.go on lines 486..497
                                                                          api/objects.pb.go on lines 558..569
                                                                          api/objects.pb.go on lines 602..613
                                                                          api/objects.pb.go on lines 644..655
                                                                          api/objects.pb.go on lines 692..703
                                                                          api/objects.pb.go on lines 733..744
                                                                          api/objects.pb.go on lines 790..801
                                                                          api/raft.pb.go on lines 90..101
                                                                          api/raft.pb.go on lines 127..138
                                                                          api/raft.pb.go on lines 169..180
                                                                          api/raft.pb.go on lines 205..216
                                                                          api/raft.pb.go on lines 240..251
                                                                          api/raft.pb.go on lines 276..287
                                                                          api/raft.pb.go on lines 311..322
                                                                          api/raft.pb.go on lines 348..359
                                                                          api/raft.pb.go on lines 384..395
                                                                          api/raft.pb.go on lines 421..432
                                                                          api/raft.pb.go on lines 458..469
                                                                          api/raft.pb.go on lines 498..509
                                                                          api/raft.pb.go on lines 547..558
                                                                          api/resource.pb.go on lines 51..62
                                                                          api/resource.pb.go on lines 87..98
                                                                          api/resource.pb.go on lines 123..134
                                                                          api/resource.pb.go on lines 158..169
                                                                          api/snapshot.pb.go on lines 73..84
                                                                          api/snapshot.pb.go on lines 111..122
                                                                          api/snapshot.pb.go on lines 149..160
                                                                          api/specs.pb.go on lines 211..222
                                                                          api/specs.pb.go on lines 274..285
                                                                          api/specs.pb.go on lines 380..391
                                                                          api/specs.pb.go on lines 416..427
                                                                          api/specs.pb.go on lines 461..472
                                                                          api/specs.pb.go on lines 498..509
                                                                          api/specs.pb.go on lines 565..576
                                                                          api/specs.pb.go on lines 659..670
                                                                          api/specs.pb.go on lines 696..707
                                                                          api/specs.pb.go on lines 736..747
                                                                          api/specs.pb.go on lines 891..902
                                                                          api/specs.pb.go on lines 932..943
                                                                          api/specs.pb.go on lines 977..988
                                                                          api/specs.pb.go on lines 1015..1026
                                                                          api/specs.pb.go on lines 1056..1067
                                                                          api/specs.pb.go on lines 1119..1130
                                                                          api/specs.pb.go on lines 1205..1216
                                                                          api/specs.pb.go on lines 1252..1263
                                                                          api/specs.pb.go on lines 1299..1310
                                                                          api/specs.pb.go on lines 1376..1387
                                                                          api/watch.pb.go on lines 95..106
                                                                          api/watch.pb.go on lines 275..286
                                                                          api/watch.pb.go on lines 313..324
                                                                          api/watch.pb.go on lines 370..381
                                                                          api/watch.pb.go on lines 633..644
                                                                          api/watch.pb.go on lines 677..688
                                                                          api/watch.pb.go on lines 719..730
                                                                          api/watch.pb.go on lines 764..775
                                                                          protobuf/plugin/plugin.pb.go on lines 58..69
                                                                          protobuf/plugin/plugin.pb.go on lines 94..105
                                                                          protobuf/plugin/plugin.pb.go on lines 135..146

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 115.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *SubscribeLogsMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                              if deterministic {
                                                                                  return xxx_messageInfo_SubscribeLogsMessage.Marshal(b, m, deterministic)
                                                                              } else {
                                                                                  b = b[:cap(b)]
                                                                          Severity: Major
                                                                          Found in api/logbroker.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 384..395
                                                                          api/logbroker.pb.go on lines 432..443
                                                                          api/logbroker.pb.go on lines 477..488
                                                                          api/logbroker.pb.go on lines 512..523
                                                                          api/objects.pb.go on lines 51..62
                                                                          api/objects.pb.go on lines 123..134
                                                                          api/objects.pb.go on lines 190..201
                                                                          api/objects.pb.go on lines 235..246
                                                                          api/objects.pb.go on lines 283..294
                                                                          api/objects.pb.go on lines 382..393
                                                                          api/objects.pb.go on lines 430..441
                                                                          api/objects.pb.go on lines 486..497
                                                                          api/objects.pb.go on lines 558..569
                                                                          api/objects.pb.go on lines 602..613
                                                                          api/objects.pb.go on lines 644..655
                                                                          api/objects.pb.go on lines 692..703
                                                                          api/objects.pb.go on lines 733..744
                                                                          api/objects.pb.go on lines 790..801
                                                                          api/raft.pb.go on lines 90..101
                                                                          api/raft.pb.go on lines 127..138
                                                                          api/raft.pb.go on lines 169..180
                                                                          api/raft.pb.go on lines 205..216
                                                                          api/raft.pb.go on lines 240..251
                                                                          api/raft.pb.go on lines 276..287
                                                                          api/raft.pb.go on lines 311..322
                                                                          api/raft.pb.go on lines 348..359
                                                                          api/raft.pb.go on lines 384..395
                                                                          api/raft.pb.go on lines 421..432
                                                                          api/raft.pb.go on lines 458..469
                                                                          api/raft.pb.go on lines 498..509
                                                                          api/raft.pb.go on lines 547..558
                                                                          api/resource.pb.go on lines 51..62
                                                                          api/resource.pb.go on lines 87..98
                                                                          api/resource.pb.go on lines 123..134
                                                                          api/resource.pb.go on lines 158..169
                                                                          api/snapshot.pb.go on lines 73..84
                                                                          api/snapshot.pb.go on lines 111..122
                                                                          api/snapshot.pb.go on lines 149..160
                                                                          api/specs.pb.go on lines 211..222
                                                                          api/specs.pb.go on lines 274..285
                                                                          api/specs.pb.go on lines 380..391
                                                                          api/specs.pb.go on lines 416..427
                                                                          api/specs.pb.go on lines 461..472
                                                                          api/specs.pb.go on lines 498..509
                                                                          api/specs.pb.go on lines 565..576
                                                                          api/specs.pb.go on lines 659..670
                                                                          api/specs.pb.go on lines 696..707
                                                                          api/specs.pb.go on lines 736..747
                                                                          api/specs.pb.go on lines 891..902
                                                                          api/specs.pb.go on lines 932..943
                                                                          api/specs.pb.go on lines 977..988
                                                                          api/specs.pb.go on lines 1015..1026
                                                                          api/specs.pb.go on lines 1056..1067
                                                                          api/specs.pb.go on lines 1119..1130
                                                                          api/specs.pb.go on lines 1205..1216
                                                                          api/specs.pb.go on lines 1252..1263
                                                                          api/specs.pb.go on lines 1299..1310
                                                                          api/specs.pb.go on lines 1376..1387
                                                                          api/watch.pb.go on lines 95..106
                                                                          api/watch.pb.go on lines 275..286
                                                                          api/watch.pb.go on lines 313..324
                                                                          api/watch.pb.go on lines 370..381
                                                                          api/watch.pb.go on lines 633..644
                                                                          api/watch.pb.go on lines 677..688
                                                                          api/watch.pb.go on lines 719..730
                                                                          api/watch.pb.go on lines 764..775
                                                                          protobuf/plugin/plugin.pb.go on lines 58..69
                                                                          protobuf/plugin/plugin.pb.go on lines 94..105
                                                                          protobuf/plugin/plugin.pb.go on lines 135..146

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 115.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *PublishLogsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                              if deterministic {
                                                                                  return xxx_messageInfo_PublishLogsResponse.Marshal(b, m, deterministic)
                                                                              } else {
                                                                                  b = b[:cap(b)]
                                                                          Severity: Major
                                                                          Found in api/logbroker.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/objects.pb.go on lines 51..62
                                                                          api/objects.pb.go on lines 123..134
                                                                          api/objects.pb.go on lines 190..201
                                                                          api/objects.pb.go on lines 235..246
                                                                          api/objects.pb.go on lines 283..294
                                                                          api/objects.pb.go on lines 382..393
                                                                          api/objects.pb.go on lines 430..441
                                                                          api/objects.pb.go on lines 486..497
                                                                          api/objects.pb.go on lines 558..569
                                                                          api/objects.pb.go on lines 602..613
                                                                          api/objects.pb.go on lines 644..655
                                                                          api/objects.pb.go on lines 692..703
                                                                          api/objects.pb.go on lines 733..744
                                                                          api/objects.pb.go on lines 790..801
                                                                          api/raft.pb.go on lines 90..101
                                                                          api/raft.pb.go on lines 127..138
                                                                          api/raft.pb.go on lines 169..180
                                                                          api/raft.pb.go on lines 205..216
                                                                          api/raft.pb.go on lines 240..251
                                                                          api/raft.pb.go on lines 276..287
                                                                          api/raft.pb.go on lines 311..322
                                                                          api/raft.pb.go on lines 348..359
                                                                          api/raft.pb.go on lines 384..395
                                                                          api/raft.pb.go on lines 421..432
                                                                          api/raft.pb.go on lines 458..469
                                                                          api/raft.pb.go on lines 498..509
                                                                          api/raft.pb.go on lines 547..558
                                                                          api/resource.pb.go on lines 51..62
                                                                          api/resource.pb.go on lines 87..98
                                                                          api/resource.pb.go on lines 123..134
                                                                          api/resource.pb.go on lines 158..169
                                                                          api/snapshot.pb.go on lines 73..84
                                                                          api/snapshot.pb.go on lines 111..122
                                                                          api/snapshot.pb.go on lines 149..160
                                                                          api/specs.pb.go on lines 211..222
                                                                          api/specs.pb.go on lines 274..285
                                                                          api/specs.pb.go on lines 380..391
                                                                          api/specs.pb.go on lines 416..427
                                                                          api/specs.pb.go on lines 461..472
                                                                          api/specs.pb.go on lines 498..509
                                                                          api/specs.pb.go on lines 565..576
                                                                          api/specs.pb.go on lines 659..670
                                                                          api/specs.pb.go on lines 696..707
                                                                          api/specs.pb.go on lines 736..747
                                                                          api/specs.pb.go on lines 891..902
                                                                          api/specs.pb.go on lines 932..943
                                                                          api/specs.pb.go on lines 977..988
                                                                          api/specs.pb.go on lines 1015..1026
                                                                          api/specs.pb.go on lines 1056..1067
                                                                          api/specs.pb.go on lines 1119..1130
                                                                          api/specs.pb.go on lines 1205..1216
                                                                          api/specs.pb.go on lines 1252..1263
                                                                          api/specs.pb.go on lines 1299..1310
                                                                          api/specs.pb.go on lines 1376..1387
                                                                          api/watch.pb.go on lines 95..106
                                                                          api/watch.pb.go on lines 275..286
                                                                          api/watch.pb.go on lines 313..324
                                                                          api/watch.pb.go on lines 370..381
                                                                          api/watch.pb.go on lines 633..644
                                                                          api/watch.pb.go on lines 677..688
                                                                          api/watch.pb.go on lines 719..730
                                                                          api/watch.pb.go on lines 764..775
                                                                          protobuf/plugin/plugin.pb.go on lines 58..69
                                                                          protobuf/plugin/plugin.pb.go on lines 94..105
                                                                          protobuf/plugin/plugin.pb.go on lines 135..146

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 115.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (m *LogAttr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                                              if deterministic {
                                                                                  return xxx_messageInfo_LogAttr.Marshal(b, m, deterministic)
                                                                              } else {
                                                                                  b = b[:cap(b)]
                                                                          Severity: Major
                                                                          Found in api/logbroker.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 273..284
                                                                          api/logbroker.pb.go on lines 311..322
                                                                          api/logbroker.pb.go on lines 347..358
                                                                          api/logbroker.pb.go on lines 384..395
                                                                          api/logbroker.pb.go on lines 432..443
                                                                          api/logbroker.pb.go on lines 477..488
                                                                          api/logbroker.pb.go on lines 512..523
                                                                          api/objects.pb.go on lines 51..62
                                                                          api/objects.pb.go on lines 123..134
                                                                          api/objects.pb.go on lines 190..201
                                                                          api/objects.pb.go on lines 235..246
                                                                          api/objects.pb.go on lines 283..294
                                                                          api/objects.pb.go on lines 382..393
                                                                          api/objects.pb.go on lines 430..441
                                                                          api/objects.pb.go on lines 486..497
                                                                          api/objects.pb.go on lines 558..569
                                                                          api/objects.pb.go on lines 602..613
                                                                          api/objects.pb.go on lines 644..655
                                                                          api/objects.pb.go on lines 692..703
                                                                          api/objects.pb.go on lines 733..744
                                                                          api/objects.pb.go on lines 790..801
                                                                          api/raft.pb.go on lines 90..101
                                                                          api/raft.pb.go on lines 127..138
                                                                          api/raft.pb.go on lines 169..180
                                                                          api/raft.pb.go on lines 205..216
                                                                          api/raft.pb.go on lines 240..251
                                                                          api/raft.pb.go on lines 276..287
                                                                          api/raft.pb.go on lines 311..322
                                                                          api/raft.pb.go on lines 348..359
                                                                          api/raft.pb.go on lines 384..395
                                                                          api/raft.pb.go on lines 421..432
                                                                          api/raft.pb.go on lines 458..469
                                                                          api/raft.pb.go on lines 498..509
                                                                          api/raft.pb.go on lines 547..558
                                                                          api/resource.pb.go on lines 51..62
                                                                          api/resource.pb.go on lines 87..98
                                                                          api/resource.pb.go on lines 123..134
                                                                          api/resource.pb.go on lines 158..169
                                                                          api/snapshot.pb.go on lines 73..84
                                                                          api/snapshot.pb.go on lines 111..122
                                                                          api/snapshot.pb.go on lines 149..160
                                                                          api/specs.pb.go on lines 211..222
                                                                          api/specs.pb.go on lines 274..285
                                                                          api/specs.pb.go on lines 380..391
                                                                          api/specs.pb.go on lines 416..427
                                                                          api/specs.pb.go on lines 461..472
                                                                          api/specs.pb.go on lines 498..509
                                                                          api/specs.pb.go on lines 565..576
                                                                          api/specs.pb.go on lines 659..670
                                                                          api/specs.pb.go on lines 696..707
                                                                          api/specs.pb.go on lines 736..747
                                                                          api/specs.pb.go on lines 891..902
                                                                          api/specs.pb.go on lines 932..943
                                                                          api/specs.pb.go on lines 977..988
                                                                          api/specs.pb.go on lines 1015..1026
                                                                          api/specs.pb.go on lines 1056..1067
                                                                          api/specs.pb.go on lines 1119..1130
                                                                          api/specs.pb.go on lines 1205..1216
                                                                          api/specs.pb.go on lines 1252..1263
                                                                          api/specs.pb.go on lines 1299..1310
                                                                          api/specs.pb.go on lines 1376..1387
                                                                          api/watch.pb.go on lines 95..106
                                                                          api/watch.pb.go on lines 275..286
                                                                          api/watch.pb.go on lines 313..324
                                                                          api/watch.pb.go on lines 370..381
                                                                          api/watch.pb.go on lines 633..644
                                                                          api/watch.pb.go on lines 677..688
                                                                          api/watch.pb.go on lines 719..730
                                                                          api/watch.pb.go on lines 764..775
                                                                          protobuf/plugin/plugin.pb.go on lines 58..69
                                                                          protobuf/plugin/plugin.pb.go on lines 94..105
                                                                          protobuf/plugin/plugin.pb.go on lines 135..146

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 115.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func (c *logBrokerClient) PublishLogs(ctx context.Context, opts ...grpc.CallOption) (LogBroker_PublishLogsClient, error) {
                                                                              stream, err := c.cc.NewStream(ctx, &_LogBroker_serviceDesc.Streams[1], "/docker.swarmkit.v1.LogBroker/PublishLogs", opts...)
                                                                              if err != nil {
                                                                                  return nil, err
                                                                              }
                                                                          Severity: Minor
                                                                          Found in api/logbroker.pb.go and 1 other location - About 40 mins to fix
                                                                          api/raft.pb.go on lines 1149..1156

                                                                          Duplicated Code

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

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

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 8 locations. Consider refactoring.
                                                                          Open

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

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 107.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

                                                                          func encodeVarintLogbroker(dAtA []byte, offset int, v uint64) int {
                                                                              offset -= sovLogbroker(v)
                                                                              base := offset
                                                                              for v >= 1<<7 {
                                                                                  dAtA[offset] = uint8(v&0x7f | 0x80)
                                                                          Severity: Major
                                                                          Found in api/logbroker.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/objects.pb.go on lines 2619..2629
                                                                          api/raft.pb.go on lines 2074..2084
                                                                          api/resource.pb.go on lines 552..562
                                                                          api/snapshot.pb.go on lines 616..626
                                                                          api/specs.pb.go on lines 3796..3806
                                                                          api/watch.pb.go on lines 2137..2147
                                                                          protobuf/plugin/plugin.pb.go on lines 526..536

                                                                          Duplicated Code

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

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

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

                                                                          Tuning

                                                                          This issue has a mass of 107.

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

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

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

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

                                                                          Refactorings

                                                                          Further Reading

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

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

                                                                          Duplicated Code

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

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

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                                          There are no issues that match your filters.

                                                                          Category
                                                                          Status