docker/swarmkit

View on GitHub
api/watch.pb.go

Summary

Maintainability
F
2 mos
Test Coverage

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

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

package api

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

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

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

    Cognitive Complexity

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

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

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

    Further reading

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

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

    Cognitive Complexity

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

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

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

    Further reading

    Method SelectBy.Unmarshal has 532 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

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

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

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

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

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

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

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

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

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

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

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

          Method Object.Unmarshal has 79 return statements (exceeds 4 allowed).
          Open

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

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

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

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

              Method WatchMessage_Event.Unmarshal has 138 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

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

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

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

                  SelectBy has 34 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  type SelectBy struct {
                      // TODO(aaronl): Are all of these things we want to expose in
                      // the API? Exposing them may commit us to maintaining those
                      // internal indices going forward.
                      //
                  Severity: Minor
                  Found in api/watch.pb.go - About 4 hrs to fix

                    Method WatchRequest_WatchEntry.Unmarshal has 132 lines of code (exceeds 50 allowed). Consider refactoring.
                    Open

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

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

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

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

                        type Object struct {
                            // Types that are valid to be assigned to Object:
                            //    *Object_Node
                            //    *Object_Service
                            //    *Object_Network
                        Severity: Minor
                        Found in api/watch.pb.go - About 3 hrs to fix

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

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

                            Method SelectBy.CopyFrom has 89 lines of code (exceeds 50 allowed). Consider refactoring.
                            Open

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

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

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

                                Method WatchRequest.Unmarshal has 26 return statements (exceeds 4 allowed).
                                Open

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

                                  Method WatchMessage_Event.Unmarshal has 26 return statements (exceeds 4 allowed).
                                  Open

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

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

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

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

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

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

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

                                          Method SelectBySlot.Unmarshal has 18 return statements (exceeds 4 allowed).
                                          Open

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

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

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

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

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

                                                Method raftProxyWatchServer.Watch has 8 return statements (exceeds 4 allowed).
                                                Open

                                                func (p *raftProxyWatchServer) Watch(r *WatchRequest, stream Watch_WatchServer) error {
                                                    ctx := stream.Context()
                                                    conn, err := p.connSelector.LeaderConn(ctx)
                                                    if err != nil {
                                                        if err == raftselector.ErrIsLeader {
                                                Severity: Major
                                                Found in api/watch.pb.go - About 50 mins to fix

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

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

                                                  Duplicated Code

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

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

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 688.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 636.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 483.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func NewRaftProxyWatchServer(local WatchServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) WatchServer {
                                                      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/watch.pb.go and 9 other locations - About 5 hrs to fix
                                                  api/ca.pb.go on lines 1094..1125
                                                  api/ca.pb.go on lines 1236..1267
                                                  api/dispatcher.pb.go on lines 2449..2480
                                                  api/health.pb.go on lines 378..409
                                                  api/logbroker.pb.go on lines 1722..1753
                                                  api/logbroker.pb.go on lines 1845..1876
                                                  api/raft.pb.go on lines 2092..2123
                                                  api/raft.pb.go on lines 2291..2322
                                                  api/resource.pb.go on lines 570..601

                                                  Duplicated Code

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

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

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

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

                                                  Duplicated Code

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

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

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 *raftProxyWatchServer) Watch(r *WatchRequest, stream Watch_WatchServer) error {
                                                      ctx := stream.Context()
                                                      conn, err := p.connSelector.LeaderConn(ctx)
                                                      if err != nil {
                                                          if err == raftselector.ErrIsLeader {
                                                  Severity: Major
                                                  Found in api/watch.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/logbroker.pb.go on lines 1920..1960

                                                  Duplicated Code

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

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

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

                                                          case 6:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field CustomPrefix", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
                                                  api/dispatcher.pb.go on lines 4666..4700
                                                  api/dispatcher.pb.go on lines 4701..4735
                                                  api/dispatcher.pb.go on lines 4736..4770
                                                  api/dispatcher.pb.go on lines 4771..4805
                                                  api/raft.pb.go on lines 4125..4159
                                                  api/raft.pb.go on lines 4160..4194
                                                  api/raft.pb.go on lines 4195..4229
                                                  api/raft.pb.go on lines 4230..4264
                                                  api/raft.pb.go on lines 4265..4299
                                                  api/raft.pb.go on lines 4300..4334
                                                  api/raft.pb.go on lines 4335..4369
                                                  api/raft.pb.go on lines 4370..4404
                                                  api/raft.pb.go on lines 4405..4439
                                                  api/raft.pb.go on lines 4440..4474
                                                  api/specs.pb.go on lines 5131..5165
                                                  api/specs.pb.go on lines 5166..5200
                                                  api/specs.pb.go on lines 5343..5377
                                                  api/specs.pb.go on lines 5378..5412
                                                  api/specs.pb.go on lines 5720..5754
                                                  api/specs.pb.go on lines 5933..5967
                                                  api/specs.pb.go on lines 5987..6021
                                                  api/watch.pb.go on lines 3107..3141
                                                  api/watch.pb.go on lines 3142..3176
                                                  api/watch.pb.go on lines 3177..3211
                                                  api/watch.pb.go on lines 3212..3246
                                                  api/watch.pb.go on lines 3247..3281
                                                  api/watch.pb.go on lines 3282..3316
                                                  api/watch.pb.go on lines 3317..3351
                                                  api/watch.pb.go on lines 3352..3386
                                                  api/watch.pb.go on lines 3387..3421
                                                  api/watch.pb.go on lines 3422..3456
                                                  api/watch.pb.go on lines 3882..3916
                                                  api/watch.pb.go on lines 4016..4050

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 239.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 6:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
                                                  api/dispatcher.pb.go on lines 4666..4700
                                                  api/dispatcher.pb.go on lines 4701..4735
                                                  api/dispatcher.pb.go on lines 4736..4770
                                                  api/dispatcher.pb.go on lines 4771..4805
                                                  api/raft.pb.go on lines 4125..4159
                                                  api/raft.pb.go on lines 4160..4194
                                                  api/raft.pb.go on lines 4195..4229
                                                  api/raft.pb.go on lines 4230..4264
                                                  api/raft.pb.go on lines 4265..4299
                                                  api/raft.pb.go on lines 4300..4334
                                                  api/raft.pb.go on lines 4335..4369
                                                  api/raft.pb.go on lines 4370..4404
                                                  api/raft.pb.go on lines 4405..4439
                                                  api/raft.pb.go on lines 4440..4474
                                                  api/specs.pb.go on lines 5131..5165
                                                  api/specs.pb.go on lines 5166..5200
                                                  api/specs.pb.go on lines 5343..5377
                                                  api/specs.pb.go on lines 5378..5412
                                                  api/specs.pb.go on lines 5720..5754
                                                  api/specs.pb.go on lines 5933..5967
                                                  api/specs.pb.go on lines 5987..6021
                                                  api/watch.pb.go on lines 3107..3141
                                                  api/watch.pb.go on lines 3142..3176
                                                  api/watch.pb.go on lines 3177..3211
                                                  api/watch.pb.go on lines 3212..3246
                                                  api/watch.pb.go on lines 3247..3281
                                                  api/watch.pb.go on lines 3317..3351
                                                  api/watch.pb.go on lines 3352..3386
                                                  api/watch.pb.go on lines 3387..3421
                                                  api/watch.pb.go on lines 3422..3456
                                                  api/watch.pb.go on lines 3882..3916
                                                  api/watch.pb.go on lines 3917..3951
                                                  api/watch.pb.go on lines 4016..4050

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 239.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 7:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
                                                  api/dispatcher.pb.go on lines 4666..4700
                                                  api/dispatcher.pb.go on lines 4701..4735
                                                  api/dispatcher.pb.go on lines 4736..4770
                                                  api/dispatcher.pb.go on lines 4771..4805
                                                  api/raft.pb.go on lines 4125..4159
                                                  api/raft.pb.go on lines 4160..4194
                                                  api/raft.pb.go on lines 4195..4229
                                                  api/raft.pb.go on lines 4230..4264
                                                  api/raft.pb.go on lines 4265..4299
                                                  api/raft.pb.go on lines 4300..4334
                                                  api/raft.pb.go on lines 4335..4369
                                                  api/raft.pb.go on lines 4370..4404
                                                  api/raft.pb.go on lines 4405..4439
                                                  api/raft.pb.go on lines 4440..4474
                                                  api/specs.pb.go on lines 5131..5165
                                                  api/specs.pb.go on lines 5166..5200
                                                  api/specs.pb.go on lines 5343..5377
                                                  api/specs.pb.go on lines 5378..5412
                                                  api/specs.pb.go on lines 5720..5754
                                                  api/specs.pb.go on lines 5933..5967
                                                  api/specs.pb.go on lines 5987..6021
                                                  api/watch.pb.go on lines 3107..3141
                                                  api/watch.pb.go on lines 3142..3176
                                                  api/watch.pb.go on lines 3177..3211
                                                  api/watch.pb.go on lines 3212..3246
                                                  api/watch.pb.go on lines 3247..3281
                                                  api/watch.pb.go on lines 3282..3316
                                                  api/watch.pb.go on lines 3352..3386
                                                  api/watch.pb.go on lines 3387..3421
                                                  api/watch.pb.go on lines 3422..3456
                                                  api/watch.pb.go on lines 3882..3916
                                                  api/watch.pb.go on lines 3917..3951
                                                  api/watch.pb.go on lines 4016..4050

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 239.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 5:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Custom", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
                                                  api/dispatcher.pb.go on lines 4666..4700
                                                  api/dispatcher.pb.go on lines 4701..4735
                                                  api/dispatcher.pb.go on lines 4736..4770
                                                  api/dispatcher.pb.go on lines 4771..4805
                                                  api/raft.pb.go on lines 4125..4159
                                                  api/raft.pb.go on lines 4160..4194
                                                  api/raft.pb.go on lines 4195..4229
                                                  api/raft.pb.go on lines 4230..4264
                                                  api/raft.pb.go on lines 4265..4299
                                                  api/raft.pb.go on lines 4300..4334
                                                  api/raft.pb.go on lines 4335..4369
                                                  api/raft.pb.go on lines 4370..4404
                                                  api/raft.pb.go on lines 4405..4439
                                                  api/raft.pb.go on lines 4440..4474
                                                  api/specs.pb.go on lines 5131..5165
                                                  api/specs.pb.go on lines 5166..5200
                                                  api/specs.pb.go on lines 5343..5377
                                                  api/specs.pb.go on lines 5378..5412
                                                  api/specs.pb.go on lines 5720..5754
                                                  api/specs.pb.go on lines 5933..5967
                                                  api/specs.pb.go on lines 5987..6021
                                                  api/watch.pb.go on lines 3107..3141
                                                  api/watch.pb.go on lines 3142..3176
                                                  api/watch.pb.go on lines 3177..3211
                                                  api/watch.pb.go on lines 3212..3246
                                                  api/watch.pb.go on lines 3247..3281
                                                  api/watch.pb.go on lines 3282..3316
                                                  api/watch.pb.go on lines 3317..3351
                                                  api/watch.pb.go on lines 3352..3386
                                                  api/watch.pb.go on lines 3387..3421
                                                  api/watch.pb.go on lines 3422..3456
                                                  api/watch.pb.go on lines 3917..3951
                                                  api/watch.pb.go on lines 4016..4050

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 239.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 4:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
                                                  api/dispatcher.pb.go on lines 4666..4700
                                                  api/dispatcher.pb.go on lines 4701..4735
                                                  api/dispatcher.pb.go on lines 4736..4770
                                                  api/dispatcher.pb.go on lines 4771..4805
                                                  api/raft.pb.go on lines 4125..4159
                                                  api/raft.pb.go on lines 4160..4194
                                                  api/raft.pb.go on lines 4195..4229
                                                  api/raft.pb.go on lines 4230..4264
                                                  api/raft.pb.go on lines 4265..4299
                                                  api/raft.pb.go on lines 4300..4334
                                                  api/raft.pb.go on lines 4335..4369
                                                  api/raft.pb.go on lines 4370..4404
                                                  api/raft.pb.go on lines 4405..4439
                                                  api/raft.pb.go on lines 4440..4474
                                                  api/specs.pb.go on lines 5131..5165
                                                  api/specs.pb.go on lines 5166..5200
                                                  api/specs.pb.go on lines 5343..5377
                                                  api/specs.pb.go on lines 5378..5412
                                                  api/specs.pb.go on lines 5720..5754
                                                  api/specs.pb.go on lines 5933..5967
                                                  api/specs.pb.go on lines 5987..6021
                                                  api/watch.pb.go on lines 3107..3141
                                                  api/watch.pb.go on lines 3142..3176
                                                  api/watch.pb.go on lines 3177..3211
                                                  api/watch.pb.go on lines 3247..3281
                                                  api/watch.pb.go on lines 3282..3316
                                                  api/watch.pb.go on lines 3317..3351
                                                  api/watch.pb.go on lines 3352..3386
                                                  api/watch.pb.go on lines 3387..3421
                                                  api/watch.pb.go on lines 3422..3456
                                                  api/watch.pb.go on lines 3882..3916
                                                  api/watch.pb.go on lines 3917..3951
                                                  api/watch.pb.go on lines 4016..4050

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 239.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 8:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
                                                  api/dispatcher.pb.go on lines 4666..4700
                                                  api/dispatcher.pb.go on lines 4701..4735
                                                  api/dispatcher.pb.go on lines 4736..4770
                                                  api/dispatcher.pb.go on lines 4771..4805
                                                  api/raft.pb.go on lines 4125..4159
                                                  api/raft.pb.go on lines 4160..4194
                                                  api/raft.pb.go on lines 4195..4229
                                                  api/raft.pb.go on lines 4230..4264
                                                  api/raft.pb.go on lines 4265..4299
                                                  api/raft.pb.go on lines 4300..4334
                                                  api/raft.pb.go on lines 4335..4369
                                                  api/raft.pb.go on lines 4370..4404
                                                  api/raft.pb.go on lines 4405..4439
                                                  api/raft.pb.go on lines 4440..4474
                                                  api/specs.pb.go on lines 5131..5165
                                                  api/specs.pb.go on lines 5166..5200
                                                  api/specs.pb.go on lines 5343..5377
                                                  api/specs.pb.go on lines 5378..5412
                                                  api/specs.pb.go on lines 5720..5754
                                                  api/specs.pb.go on lines 5933..5967
                                                  api/specs.pb.go on lines 5987..6021
                                                  api/watch.pb.go on lines 3107..3141
                                                  api/watch.pb.go on lines 3142..3176
                                                  api/watch.pb.go on lines 3177..3211
                                                  api/watch.pb.go on lines 3212..3246
                                                  api/watch.pb.go on lines 3247..3281
                                                  api/watch.pb.go on lines 3282..3316
                                                  api/watch.pb.go on lines 3317..3351
                                                  api/watch.pb.go on lines 3387..3421
                                                  api/watch.pb.go on lines 3422..3456
                                                  api/watch.pb.go on lines 3882..3916
                                                  api/watch.pb.go on lines 3917..3951
                                                  api/watch.pb.go on lines 4016..4050

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 239.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 1:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
                                                  api/dispatcher.pb.go on lines 4666..4700
                                                  api/dispatcher.pb.go on lines 4701..4735
                                                  api/dispatcher.pb.go on lines 4736..4770
                                                  api/dispatcher.pb.go on lines 4771..4805
                                                  api/raft.pb.go on lines 4125..4159
                                                  api/raft.pb.go on lines 4160..4194
                                                  api/raft.pb.go on lines 4195..4229
                                                  api/raft.pb.go on lines 4230..4264
                                                  api/raft.pb.go on lines 4265..4299
                                                  api/raft.pb.go on lines 4300..4334
                                                  api/raft.pb.go on lines 4335..4369
                                                  api/raft.pb.go on lines 4370..4404
                                                  api/raft.pb.go on lines 4405..4439
                                                  api/raft.pb.go on lines 4440..4474
                                                  api/specs.pb.go on lines 5131..5165
                                                  api/specs.pb.go on lines 5166..5200
                                                  api/specs.pb.go on lines 5343..5377
                                                  api/specs.pb.go on lines 5378..5412
                                                  api/specs.pb.go on lines 5720..5754
                                                  api/specs.pb.go on lines 5933..5967
                                                  api/specs.pb.go on lines 5987..6021
                                                  api/watch.pb.go on lines 3142..3176
                                                  api/watch.pb.go on lines 3177..3211
                                                  api/watch.pb.go on lines 3212..3246
                                                  api/watch.pb.go on lines 3247..3281
                                                  api/watch.pb.go on lines 3282..3316
                                                  api/watch.pb.go on lines 3317..3351
                                                  api/watch.pb.go on lines 3352..3386
                                                  api/watch.pb.go on lines 3387..3421
                                                  api/watch.pb.go on lines 3422..3456
                                                  api/watch.pb.go on lines 3882..3916
                                                  api/watch.pb.go on lines 3917..3951
                                                  api/watch.pb.go on lines 4016..4050

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 239.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 3:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
                                                  api/dispatcher.pb.go on lines 4666..4700
                                                  api/dispatcher.pb.go on lines 4701..4735
                                                  api/dispatcher.pb.go on lines 4736..4770
                                                  api/dispatcher.pb.go on lines 4771..4805
                                                  api/raft.pb.go on lines 4125..4159
                                                  api/raft.pb.go on lines 4160..4194
                                                  api/raft.pb.go on lines 4195..4229
                                                  api/raft.pb.go on lines 4230..4264
                                                  api/raft.pb.go on lines 4265..4299
                                                  api/raft.pb.go on lines 4300..4334
                                                  api/raft.pb.go on lines 4335..4369
                                                  api/raft.pb.go on lines 4370..4404
                                                  api/raft.pb.go on lines 4405..4439
                                                  api/raft.pb.go on lines 4440..4474
                                                  api/specs.pb.go on lines 5131..5165
                                                  api/specs.pb.go on lines 5166..5200
                                                  api/specs.pb.go on lines 5343..5377
                                                  api/specs.pb.go on lines 5378..5412
                                                  api/specs.pb.go on lines 5720..5754
                                                  api/specs.pb.go on lines 5933..5967
                                                  api/specs.pb.go on lines 5987..6021
                                                  api/watch.pb.go on lines 3107..3141
                                                  api/watch.pb.go on lines 3142..3176
                                                  api/watch.pb.go on lines 3212..3246
                                                  api/watch.pb.go on lines 3247..3281
                                                  api/watch.pb.go on lines 3282..3316
                                                  api/watch.pb.go on lines 3317..3351
                                                  api/watch.pb.go on lines 3352..3386
                                                  api/watch.pb.go on lines 3387..3421
                                                  api/watch.pb.go on lines 3422..3456
                                                  api/watch.pb.go on lines 3882..3916
                                                  api/watch.pb.go on lines 3917..3951
                                                  api/watch.pb.go on lines 4016..4050

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 239.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 5:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
                                                  api/dispatcher.pb.go on lines 4666..4700
                                                  api/dispatcher.pb.go on lines 4701..4735
                                                  api/dispatcher.pb.go on lines 4736..4770
                                                  api/dispatcher.pb.go on lines 4771..4805
                                                  api/raft.pb.go on lines 4125..4159
                                                  api/raft.pb.go on lines 4160..4194
                                                  api/raft.pb.go on lines 4195..4229
                                                  api/raft.pb.go on lines 4230..4264
                                                  api/raft.pb.go on lines 4265..4299
                                                  api/raft.pb.go on lines 4300..4334
                                                  api/raft.pb.go on lines 4335..4369
                                                  api/raft.pb.go on lines 4370..4404
                                                  api/raft.pb.go on lines 4405..4439
                                                  api/raft.pb.go on lines 4440..4474
                                                  api/specs.pb.go on lines 5131..5165
                                                  api/specs.pb.go on lines 5166..5200
                                                  api/specs.pb.go on lines 5343..5377
                                                  api/specs.pb.go on lines 5378..5412
                                                  api/specs.pb.go on lines 5720..5754
                                                  api/specs.pb.go on lines 5933..5967
                                                  api/specs.pb.go on lines 5987..6021
                                                  api/watch.pb.go on lines 3107..3141
                                                  api/watch.pb.go on lines 3142..3176
                                                  api/watch.pb.go on lines 3177..3211
                                                  api/watch.pb.go on lines 3212..3246
                                                  api/watch.pb.go on lines 3282..3316
                                                  api/watch.pb.go on lines 3317..3351
                                                  api/watch.pb.go on lines 3352..3386
                                                  api/watch.pb.go on lines 3387..3421
                                                  api/watch.pb.go on lines 3422..3456
                                                  api/watch.pb.go on lines 3882..3916
                                                  api/watch.pb.go on lines 3917..3951
                                                  api/watch.pb.go on lines 4016..4050

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 239.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 9:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
                                                  api/dispatcher.pb.go on lines 4666..4700
                                                  api/dispatcher.pb.go on lines 4701..4735
                                                  api/dispatcher.pb.go on lines 4736..4770
                                                  api/dispatcher.pb.go on lines 4771..4805
                                                  api/raft.pb.go on lines 4125..4159
                                                  api/raft.pb.go on lines 4160..4194
                                                  api/raft.pb.go on lines 4195..4229
                                                  api/raft.pb.go on lines 4230..4264
                                                  api/raft.pb.go on lines 4265..4299
                                                  api/raft.pb.go on lines 4300..4334
                                                  api/raft.pb.go on lines 4335..4369
                                                  api/raft.pb.go on lines 4370..4404
                                                  api/raft.pb.go on lines 4405..4439
                                                  api/raft.pb.go on lines 4440..4474
                                                  api/specs.pb.go on lines 5131..5165
                                                  api/specs.pb.go on lines 5166..5200
                                                  api/specs.pb.go on lines 5343..5377
                                                  api/specs.pb.go on lines 5378..5412
                                                  api/specs.pb.go on lines 5720..5754
                                                  api/specs.pb.go on lines 5933..5967
                                                  api/specs.pb.go on lines 5987..6021
                                                  api/watch.pb.go on lines 3107..3141
                                                  api/watch.pb.go on lines 3142..3176
                                                  api/watch.pb.go on lines 3177..3211
                                                  api/watch.pb.go on lines 3212..3246
                                                  api/watch.pb.go on lines 3247..3281
                                                  api/watch.pb.go on lines 3282..3316
                                                  api/watch.pb.go on lines 3317..3351
                                                  api/watch.pb.go on lines 3352..3386
                                                  api/watch.pb.go on lines 3387..3421
                                                  api/watch.pb.go on lines 3422..3456
                                                  api/watch.pb.go on lines 3882..3916
                                                  api/watch.pb.go on lines 3917..3951

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 239.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 10:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
                                                  api/dispatcher.pb.go on lines 4666..4700
                                                  api/dispatcher.pb.go on lines 4701..4735
                                                  api/dispatcher.pb.go on lines 4736..4770
                                                  api/dispatcher.pb.go on lines 4771..4805
                                                  api/raft.pb.go on lines 4125..4159
                                                  api/raft.pb.go on lines 4160..4194
                                                  api/raft.pb.go on lines 4195..4229
                                                  api/raft.pb.go on lines 4230..4264
                                                  api/raft.pb.go on lines 4265..4299
                                                  api/raft.pb.go on lines 4300..4334
                                                  api/raft.pb.go on lines 4335..4369
                                                  api/raft.pb.go on lines 4370..4404
                                                  api/raft.pb.go on lines 4405..4439
                                                  api/raft.pb.go on lines 4440..4474
                                                  api/specs.pb.go on lines 5131..5165
                                                  api/specs.pb.go on lines 5166..5200
                                                  api/specs.pb.go on lines 5343..5377
                                                  api/specs.pb.go on lines 5378..5412
                                                  api/specs.pb.go on lines 5720..5754
                                                  api/specs.pb.go on lines 5933..5967
                                                  api/specs.pb.go on lines 5987..6021
                                                  api/watch.pb.go on lines 3107..3141
                                                  api/watch.pb.go on lines 3142..3176
                                                  api/watch.pb.go on lines 3177..3211
                                                  api/watch.pb.go on lines 3212..3246
                                                  api/watch.pb.go on lines 3247..3281
                                                  api/watch.pb.go on lines 3282..3316
                                                  api/watch.pb.go on lines 3317..3351
                                                  api/watch.pb.go on lines 3352..3386
                                                  api/watch.pb.go on lines 3387..3421
                                                  api/watch.pb.go on lines 3882..3916
                                                  api/watch.pb.go on lines 3917..3951
                                                  api/watch.pb.go on lines 4016..4050

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 239.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 2:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
                                                  api/dispatcher.pb.go on lines 4666..4700
                                                  api/dispatcher.pb.go on lines 4701..4735
                                                  api/dispatcher.pb.go on lines 4736..4770
                                                  api/dispatcher.pb.go on lines 4771..4805
                                                  api/raft.pb.go on lines 4125..4159
                                                  api/raft.pb.go on lines 4160..4194
                                                  api/raft.pb.go on lines 4195..4229
                                                  api/raft.pb.go on lines 4230..4264
                                                  api/raft.pb.go on lines 4265..4299
                                                  api/raft.pb.go on lines 4300..4334
                                                  api/raft.pb.go on lines 4335..4369
                                                  api/raft.pb.go on lines 4370..4404
                                                  api/raft.pb.go on lines 4405..4439
                                                  api/raft.pb.go on lines 4440..4474
                                                  api/specs.pb.go on lines 5131..5165
                                                  api/specs.pb.go on lines 5166..5200
                                                  api/specs.pb.go on lines 5343..5377
                                                  api/specs.pb.go on lines 5378..5412
                                                  api/specs.pb.go on lines 5720..5754
                                                  api/specs.pb.go on lines 5933..5967
                                                  api/specs.pb.go on lines 5987..6021
                                                  api/watch.pb.go on lines 3107..3141
                                                  api/watch.pb.go on lines 3177..3211
                                                  api/watch.pb.go on lines 3212..3246
                                                  api/watch.pb.go on lines 3247..3281
                                                  api/watch.pb.go on lines 3282..3316
                                                  api/watch.pb.go on lines 3317..3351
                                                  api/watch.pb.go on lines 3352..3386
                                                  api/watch.pb.go on lines 3387..3421
                                                  api/watch.pb.go on lines 3422..3456
                                                  api/watch.pb.go on lines 3882..3916
                                                  api/watch.pb.go on lines 3917..3951
                                                  api/watch.pb.go on lines 4016..4050

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 239.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 9:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 2 hrs to fix
                                                  api/dispatcher.pb.go on lines 4666..4700
                                                  api/dispatcher.pb.go on lines 4701..4735
                                                  api/dispatcher.pb.go on lines 4736..4770
                                                  api/dispatcher.pb.go on lines 4771..4805
                                                  api/raft.pb.go on lines 4125..4159
                                                  api/raft.pb.go on lines 4160..4194
                                                  api/raft.pb.go on lines 4195..4229
                                                  api/raft.pb.go on lines 4230..4264
                                                  api/raft.pb.go on lines 4265..4299
                                                  api/raft.pb.go on lines 4300..4334
                                                  api/raft.pb.go on lines 4335..4369
                                                  api/raft.pb.go on lines 4370..4404
                                                  api/raft.pb.go on lines 4405..4439
                                                  api/raft.pb.go on lines 4440..4474
                                                  api/specs.pb.go on lines 5131..5165
                                                  api/specs.pb.go on lines 5166..5200
                                                  api/specs.pb.go on lines 5343..5377
                                                  api/specs.pb.go on lines 5378..5412
                                                  api/specs.pb.go on lines 5720..5754
                                                  api/specs.pb.go on lines 5933..5967
                                                  api/specs.pb.go on lines 5987..6021
                                                  api/watch.pb.go on lines 3107..3141
                                                  api/watch.pb.go on lines 3142..3176
                                                  api/watch.pb.go on lines 3177..3211
                                                  api/watch.pb.go on lines 3212..3246
                                                  api/watch.pb.go on lines 3247..3281
                                                  api/watch.pb.go on lines 3282..3316
                                                  api/watch.pb.go on lines 3317..3351
                                                  api/watch.pb.go on lines 3352..3386
                                                  api/watch.pb.go on lines 3422..3456
                                                  api/watch.pb.go on lines 3882..3916
                                                  api/watch.pb.go on lines 3917..3951
                                                  api/watch.pb.go on lines 4016..4050

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 239.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 216.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 216.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 216.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 216.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 216.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 216.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 216.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 216.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 216.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 216.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 204.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *WatchRequest) CopyFrom(src interface{}) {
                                                  
                                                      o := src.(*WatchRequest)
                                                      *m = *o
                                                      if o.Entries != nil {
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 1 other location - About 2 hrs to fix
                                                  api/watch.pb.go on lines 1176..1192

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 192.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *WatchMessage) CopyFrom(src interface{}) {
                                                  
                                                      o := src.(*WatchMessage)
                                                      *m = *o
                                                      if o.Events != nil {
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 1 other location - About 2 hrs to fix
                                                  api/watch.pb.go on lines 1126..1142

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 192.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 *watchClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Watch_WatchClient, error) {
                                                      stream, err := c.cc.NewStream(ctx, &_Watch_serviceDesc.Streams[0], "/docker.swarmkit.v1.Watch/Watch", opts...)
                                                      if err != nil {
                                                          return nil, err
                                                      }
                                                  Severity: Major
                                                  Found in api/watch.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/logbroker.pb.go on lines 1037..1050

                                                  Duplicated Code

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

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

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

                                                  func (m *Object) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      _ = i
                                                      var l int
                                                      _ = l
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 2 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2234..2249
                                                  api/watch.pb.go on lines 1670..1685

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 150.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *SelectBy) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      _ = i
                                                      var l int
                                                      _ = l
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 2 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2234..2249
                                                  api/watch.pb.go on lines 1349..1364

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 150.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *WatchRequest_WatchEntry) CopyFrom(src interface{}) {
                                                  
                                                      o := src.(*WatchRequest_WatchEntry)
                                                      *m = *o
                                                      if o.Filters != nil {
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 5 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 1099..1111
                                                  api/dispatcher.pb.go on lines 1151..1163
                                                  api/dispatcher.pb.go on lines 1214..1226
                                                  api/dispatcher.pb.go on lines 1315..1327
                                                  api/specs.pb.go on lines 2037..2049

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 145.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *Object_Network) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      if m.Network != nil {
                                                          {
                                                              size, err := m.Network.MarshalToSizedBuffer(dAtA[:i])
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2256..2271
                                                  api/dispatcher.pb.go on lines 2277..2292
                                                  api/dispatcher.pb.go on lines 2298..2313
                                                  api/dispatcher.pb.go on lines 2319..2334
                                                  api/raft.pb.go on lines 1869..1884
                                                  api/raft.pb.go on lines 1890..1905
                                                  api/raft.pb.go on lines 1911..1926
                                                  api/raft.pb.go on lines 1932..1947
                                                  api/raft.pb.go on lines 1953..1968
                                                  api/raft.pb.go on lines 1974..1989
                                                  api/raft.pb.go on lines 1995..2010
                                                  api/raft.pb.go on lines 2016..2031
                                                  api/raft.pb.go on lines 2037..2052
                                                  api/raft.pb.go on lines 2058..2073
                                                  api/specs.pb.go on lines 2355..2370
                                                  api/specs.pb.go on lines 2376..2391
                                                  api/specs.pb.go on lines 2397..2412
                                                  api/specs.pb.go on lines 2418..2433
                                                  api/specs.pb.go on lines 2659..2674
                                                  api/specs.pb.go on lines 2680..2695
                                                  api/specs.pb.go on lines 2701..2716
                                                  api/watch.pb.go on lines 1371..1386
                                                  api/watch.pb.go on lines 1392..1407
                                                  api/watch.pb.go on lines 1434..1449
                                                  api/watch.pb.go on lines 1455..1470
                                                  api/watch.pb.go on lines 1476..1491
                                                  api/watch.pb.go on lines 1497..1512
                                                  api/watch.pb.go on lines 1518..1533
                                                  api/watch.pb.go on lines 1539..1554
                                                  api/watch.pb.go on lines 1560..1575
                                                  api/watch.pb.go on lines 1748..1763
                                                  api/watch.pb.go on lines 1769..1784
                                                  api/watch.pb.go on lines 1818..1833

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *Object_Volume) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      if m.Volume != nil {
                                                          {
                                                              size, err := m.Volume.MarshalToSizedBuffer(dAtA[:i])
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2256..2271
                                                  api/dispatcher.pb.go on lines 2277..2292
                                                  api/dispatcher.pb.go on lines 2298..2313
                                                  api/dispatcher.pb.go on lines 2319..2334
                                                  api/raft.pb.go on lines 1869..1884
                                                  api/raft.pb.go on lines 1890..1905
                                                  api/raft.pb.go on lines 1911..1926
                                                  api/raft.pb.go on lines 1932..1947
                                                  api/raft.pb.go on lines 1953..1968
                                                  api/raft.pb.go on lines 1974..1989
                                                  api/raft.pb.go on lines 1995..2010
                                                  api/raft.pb.go on lines 2016..2031
                                                  api/raft.pb.go on lines 2037..2052
                                                  api/raft.pb.go on lines 2058..2073
                                                  api/specs.pb.go on lines 2355..2370
                                                  api/specs.pb.go on lines 2376..2391
                                                  api/specs.pb.go on lines 2397..2412
                                                  api/specs.pb.go on lines 2418..2433
                                                  api/specs.pb.go on lines 2659..2674
                                                  api/specs.pb.go on lines 2680..2695
                                                  api/specs.pb.go on lines 2701..2716
                                                  api/watch.pb.go on lines 1371..1386
                                                  api/watch.pb.go on lines 1392..1407
                                                  api/watch.pb.go on lines 1413..1428
                                                  api/watch.pb.go on lines 1434..1449
                                                  api/watch.pb.go on lines 1455..1470
                                                  api/watch.pb.go on lines 1476..1491
                                                  api/watch.pb.go on lines 1497..1512
                                                  api/watch.pb.go on lines 1518..1533
                                                  api/watch.pb.go on lines 1539..1554
                                                  api/watch.pb.go on lines 1748..1763
                                                  api/watch.pb.go on lines 1769..1784
                                                  api/watch.pb.go on lines 1818..1833

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *Object_Node) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      if m.Node != nil {
                                                          {
                                                              size, err := m.Node.MarshalToSizedBuffer(dAtA[:i])
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2256..2271
                                                  api/dispatcher.pb.go on lines 2277..2292
                                                  api/dispatcher.pb.go on lines 2298..2313
                                                  api/dispatcher.pb.go on lines 2319..2334
                                                  api/raft.pb.go on lines 1869..1884
                                                  api/raft.pb.go on lines 1890..1905
                                                  api/raft.pb.go on lines 1911..1926
                                                  api/raft.pb.go on lines 1932..1947
                                                  api/raft.pb.go on lines 1953..1968
                                                  api/raft.pb.go on lines 1974..1989
                                                  api/raft.pb.go on lines 1995..2010
                                                  api/raft.pb.go on lines 2016..2031
                                                  api/raft.pb.go on lines 2037..2052
                                                  api/raft.pb.go on lines 2058..2073
                                                  api/specs.pb.go on lines 2355..2370
                                                  api/specs.pb.go on lines 2376..2391
                                                  api/specs.pb.go on lines 2397..2412
                                                  api/specs.pb.go on lines 2418..2433
                                                  api/specs.pb.go on lines 2659..2674
                                                  api/specs.pb.go on lines 2680..2695
                                                  api/specs.pb.go on lines 2701..2716
                                                  api/watch.pb.go on lines 1392..1407
                                                  api/watch.pb.go on lines 1413..1428
                                                  api/watch.pb.go on lines 1434..1449
                                                  api/watch.pb.go on lines 1455..1470
                                                  api/watch.pb.go on lines 1476..1491
                                                  api/watch.pb.go on lines 1497..1512
                                                  api/watch.pb.go on lines 1518..1533
                                                  api/watch.pb.go on lines 1539..1554
                                                  api/watch.pb.go on lines 1560..1575
                                                  api/watch.pb.go on lines 1748..1763
                                                  api/watch.pb.go on lines 1769..1784
                                                  api/watch.pb.go on lines 1818..1833

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *Object_Extension) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      if m.Extension != nil {
                                                          {
                                                              size, err := m.Extension.MarshalToSizedBuffer(dAtA[:i])
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2256..2271
                                                  api/dispatcher.pb.go on lines 2277..2292
                                                  api/dispatcher.pb.go on lines 2298..2313
                                                  api/dispatcher.pb.go on lines 2319..2334
                                                  api/raft.pb.go on lines 1869..1884
                                                  api/raft.pb.go on lines 1890..1905
                                                  api/raft.pb.go on lines 1911..1926
                                                  api/raft.pb.go on lines 1932..1947
                                                  api/raft.pb.go on lines 1953..1968
                                                  api/raft.pb.go on lines 1974..1989
                                                  api/raft.pb.go on lines 1995..2010
                                                  api/raft.pb.go on lines 2016..2031
                                                  api/raft.pb.go on lines 2037..2052
                                                  api/raft.pb.go on lines 2058..2073
                                                  api/specs.pb.go on lines 2355..2370
                                                  api/specs.pb.go on lines 2376..2391
                                                  api/specs.pb.go on lines 2397..2412
                                                  api/specs.pb.go on lines 2418..2433
                                                  api/specs.pb.go on lines 2659..2674
                                                  api/specs.pb.go on lines 2680..2695
                                                  api/specs.pb.go on lines 2701..2716
                                                  api/watch.pb.go on lines 1371..1386
                                                  api/watch.pb.go on lines 1392..1407
                                                  api/watch.pb.go on lines 1413..1428
                                                  api/watch.pb.go on lines 1434..1449
                                                  api/watch.pb.go on lines 1455..1470
                                                  api/watch.pb.go on lines 1476..1491
                                                  api/watch.pb.go on lines 1497..1512
                                                  api/watch.pb.go on lines 1539..1554
                                                  api/watch.pb.go on lines 1560..1575
                                                  api/watch.pb.go on lines 1748..1763
                                                  api/watch.pb.go on lines 1769..1784
                                                  api/watch.pb.go on lines 1818..1833

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *Object_Config) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      if m.Config != nil {
                                                          {
                                                              size, err := m.Config.MarshalToSizedBuffer(dAtA[:i])
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2256..2271
                                                  api/dispatcher.pb.go on lines 2277..2292
                                                  api/dispatcher.pb.go on lines 2298..2313
                                                  api/dispatcher.pb.go on lines 2319..2334
                                                  api/raft.pb.go on lines 1869..1884
                                                  api/raft.pb.go on lines 1890..1905
                                                  api/raft.pb.go on lines 1911..1926
                                                  api/raft.pb.go on lines 1932..1947
                                                  api/raft.pb.go on lines 1953..1968
                                                  api/raft.pb.go on lines 1974..1989
                                                  api/raft.pb.go on lines 1995..2010
                                                  api/raft.pb.go on lines 2016..2031
                                                  api/raft.pb.go on lines 2037..2052
                                                  api/raft.pb.go on lines 2058..2073
                                                  api/specs.pb.go on lines 2355..2370
                                                  api/specs.pb.go on lines 2376..2391
                                                  api/specs.pb.go on lines 2397..2412
                                                  api/specs.pb.go on lines 2418..2433
                                                  api/specs.pb.go on lines 2659..2674
                                                  api/specs.pb.go on lines 2680..2695
                                                  api/specs.pb.go on lines 2701..2716
                                                  api/watch.pb.go on lines 1371..1386
                                                  api/watch.pb.go on lines 1392..1407
                                                  api/watch.pb.go on lines 1413..1428
                                                  api/watch.pb.go on lines 1434..1449
                                                  api/watch.pb.go on lines 1455..1470
                                                  api/watch.pb.go on lines 1476..1491
                                                  api/watch.pb.go on lines 1497..1512
                                                  api/watch.pb.go on lines 1518..1533
                                                  api/watch.pb.go on lines 1560..1575
                                                  api/watch.pb.go on lines 1748..1763
                                                  api/watch.pb.go on lines 1769..1784
                                                  api/watch.pb.go on lines 1818..1833

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *SelectBy_Slot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      if m.Slot != nil {
                                                          {
                                                              size, err := m.Slot.MarshalToSizedBuffer(dAtA[:i])
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2256..2271
                                                  api/dispatcher.pb.go on lines 2277..2292
                                                  api/dispatcher.pb.go on lines 2298..2313
                                                  api/dispatcher.pb.go on lines 2319..2334
                                                  api/raft.pb.go on lines 1869..1884
                                                  api/raft.pb.go on lines 1890..1905
                                                  api/raft.pb.go on lines 1911..1926
                                                  api/raft.pb.go on lines 1932..1947
                                                  api/raft.pb.go on lines 1953..1968
                                                  api/raft.pb.go on lines 1974..1989
                                                  api/raft.pb.go on lines 1995..2010
                                                  api/raft.pb.go on lines 2016..2031
                                                  api/raft.pb.go on lines 2037..2052
                                                  api/raft.pb.go on lines 2058..2073
                                                  api/specs.pb.go on lines 2355..2370
                                                  api/specs.pb.go on lines 2376..2391
                                                  api/specs.pb.go on lines 2397..2412
                                                  api/specs.pb.go on lines 2418..2433
                                                  api/specs.pb.go on lines 2659..2674
                                                  api/specs.pb.go on lines 2680..2695
                                                  api/specs.pb.go on lines 2701..2716
                                                  api/watch.pb.go on lines 1371..1386
                                                  api/watch.pb.go on lines 1392..1407
                                                  api/watch.pb.go on lines 1413..1428
                                                  api/watch.pb.go on lines 1434..1449
                                                  api/watch.pb.go on lines 1455..1470
                                                  api/watch.pb.go on lines 1476..1491
                                                  api/watch.pb.go on lines 1497..1512
                                                  api/watch.pb.go on lines 1518..1533
                                                  api/watch.pb.go on lines 1539..1554
                                                  api/watch.pb.go on lines 1560..1575
                                                  api/watch.pb.go on lines 1748..1763
                                                  api/watch.pb.go on lines 1769..1784

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *Object_Secret) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      if m.Secret != nil {
                                                          {
                                                              size, err := m.Secret.MarshalToSizedBuffer(dAtA[:i])
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2256..2271
                                                  api/dispatcher.pb.go on lines 2277..2292
                                                  api/dispatcher.pb.go on lines 2298..2313
                                                  api/dispatcher.pb.go on lines 2319..2334
                                                  api/raft.pb.go on lines 1869..1884
                                                  api/raft.pb.go on lines 1890..1905
                                                  api/raft.pb.go on lines 1911..1926
                                                  api/raft.pb.go on lines 1932..1947
                                                  api/raft.pb.go on lines 1953..1968
                                                  api/raft.pb.go on lines 1974..1989
                                                  api/raft.pb.go on lines 1995..2010
                                                  api/raft.pb.go on lines 2016..2031
                                                  api/raft.pb.go on lines 2037..2052
                                                  api/raft.pb.go on lines 2058..2073
                                                  api/specs.pb.go on lines 2355..2370
                                                  api/specs.pb.go on lines 2376..2391
                                                  api/specs.pb.go on lines 2397..2412
                                                  api/specs.pb.go on lines 2418..2433
                                                  api/specs.pb.go on lines 2659..2674
                                                  api/specs.pb.go on lines 2680..2695
                                                  api/specs.pb.go on lines 2701..2716
                                                  api/watch.pb.go on lines 1371..1386
                                                  api/watch.pb.go on lines 1392..1407
                                                  api/watch.pb.go on lines 1413..1428
                                                  api/watch.pb.go on lines 1434..1449
                                                  api/watch.pb.go on lines 1455..1470
                                                  api/watch.pb.go on lines 1497..1512
                                                  api/watch.pb.go on lines 1518..1533
                                                  api/watch.pb.go on lines 1539..1554
                                                  api/watch.pb.go on lines 1560..1575
                                                  api/watch.pb.go on lines 1748..1763
                                                  api/watch.pb.go on lines 1769..1784
                                                  api/watch.pb.go on lines 1818..1833

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *Object_Task) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      if m.Task != nil {
                                                          {
                                                              size, err := m.Task.MarshalToSizedBuffer(dAtA[:i])
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2256..2271
                                                  api/dispatcher.pb.go on lines 2277..2292
                                                  api/dispatcher.pb.go on lines 2298..2313
                                                  api/dispatcher.pb.go on lines 2319..2334
                                                  api/raft.pb.go on lines 1869..1884
                                                  api/raft.pb.go on lines 1890..1905
                                                  api/raft.pb.go on lines 1911..1926
                                                  api/raft.pb.go on lines 1932..1947
                                                  api/raft.pb.go on lines 1953..1968
                                                  api/raft.pb.go on lines 1974..1989
                                                  api/raft.pb.go on lines 1995..2010
                                                  api/raft.pb.go on lines 2016..2031
                                                  api/raft.pb.go on lines 2037..2052
                                                  api/raft.pb.go on lines 2058..2073
                                                  api/specs.pb.go on lines 2355..2370
                                                  api/specs.pb.go on lines 2376..2391
                                                  api/specs.pb.go on lines 2397..2412
                                                  api/specs.pb.go on lines 2418..2433
                                                  api/specs.pb.go on lines 2659..2674
                                                  api/specs.pb.go on lines 2680..2695
                                                  api/specs.pb.go on lines 2701..2716
                                                  api/watch.pb.go on lines 1371..1386
                                                  api/watch.pb.go on lines 1392..1407
                                                  api/watch.pb.go on lines 1413..1428
                                                  api/watch.pb.go on lines 1455..1470
                                                  api/watch.pb.go on lines 1476..1491
                                                  api/watch.pb.go on lines 1497..1512
                                                  api/watch.pb.go on lines 1518..1533
                                                  api/watch.pb.go on lines 1539..1554
                                                  api/watch.pb.go on lines 1560..1575
                                                  api/watch.pb.go on lines 1748..1763
                                                  api/watch.pb.go on lines 1769..1784
                                                  api/watch.pb.go on lines 1818..1833

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *Object_Service) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      if m.Service != nil {
                                                          {
                                                              size, err := m.Service.MarshalToSizedBuffer(dAtA[:i])
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2256..2271
                                                  api/dispatcher.pb.go on lines 2277..2292
                                                  api/dispatcher.pb.go on lines 2298..2313
                                                  api/dispatcher.pb.go on lines 2319..2334
                                                  api/raft.pb.go on lines 1869..1884
                                                  api/raft.pb.go on lines 1890..1905
                                                  api/raft.pb.go on lines 1911..1926
                                                  api/raft.pb.go on lines 1932..1947
                                                  api/raft.pb.go on lines 1953..1968
                                                  api/raft.pb.go on lines 1974..1989
                                                  api/raft.pb.go on lines 1995..2010
                                                  api/raft.pb.go on lines 2016..2031
                                                  api/raft.pb.go on lines 2037..2052
                                                  api/raft.pb.go on lines 2058..2073
                                                  api/specs.pb.go on lines 2355..2370
                                                  api/specs.pb.go on lines 2376..2391
                                                  api/specs.pb.go on lines 2397..2412
                                                  api/specs.pb.go on lines 2418..2433
                                                  api/specs.pb.go on lines 2659..2674
                                                  api/specs.pb.go on lines 2680..2695
                                                  api/specs.pb.go on lines 2701..2716
                                                  api/watch.pb.go on lines 1371..1386
                                                  api/watch.pb.go on lines 1413..1428
                                                  api/watch.pb.go on lines 1434..1449
                                                  api/watch.pb.go on lines 1455..1470
                                                  api/watch.pb.go on lines 1476..1491
                                                  api/watch.pb.go on lines 1497..1512
                                                  api/watch.pb.go on lines 1518..1533
                                                  api/watch.pb.go on lines 1539..1554
                                                  api/watch.pb.go on lines 1560..1575
                                                  api/watch.pb.go on lines 1748..1763
                                                  api/watch.pb.go on lines 1769..1784
                                                  api/watch.pb.go on lines 1818..1833

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *Object_Resource) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      if m.Resource != nil {
                                                          {
                                                              size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i])
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2256..2271
                                                  api/dispatcher.pb.go on lines 2277..2292
                                                  api/dispatcher.pb.go on lines 2298..2313
                                                  api/dispatcher.pb.go on lines 2319..2334
                                                  api/raft.pb.go on lines 1869..1884
                                                  api/raft.pb.go on lines 1890..1905
                                                  api/raft.pb.go on lines 1911..1926
                                                  api/raft.pb.go on lines 1932..1947
                                                  api/raft.pb.go on lines 1953..1968
                                                  api/raft.pb.go on lines 1974..1989
                                                  api/raft.pb.go on lines 1995..2010
                                                  api/raft.pb.go on lines 2016..2031
                                                  api/raft.pb.go on lines 2037..2052
                                                  api/raft.pb.go on lines 2058..2073
                                                  api/specs.pb.go on lines 2355..2370
                                                  api/specs.pb.go on lines 2376..2391
                                                  api/specs.pb.go on lines 2397..2412
                                                  api/specs.pb.go on lines 2418..2433
                                                  api/specs.pb.go on lines 2659..2674
                                                  api/specs.pb.go on lines 2680..2695
                                                  api/specs.pb.go on lines 2701..2716
                                                  api/watch.pb.go on lines 1371..1386
                                                  api/watch.pb.go on lines 1392..1407
                                                  api/watch.pb.go on lines 1413..1428
                                                  api/watch.pb.go on lines 1434..1449
                                                  api/watch.pb.go on lines 1455..1470
                                                  api/watch.pb.go on lines 1476..1491
                                                  api/watch.pb.go on lines 1518..1533
                                                  api/watch.pb.go on lines 1539..1554
                                                  api/watch.pb.go on lines 1560..1575
                                                  api/watch.pb.go on lines 1748..1763
                                                  api/watch.pb.go on lines 1769..1784
                                                  api/watch.pb.go on lines 1818..1833

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *SelectBy_Custom) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      if m.Custom != nil {
                                                          {
                                                              size, err := m.Custom.MarshalToSizedBuffer(dAtA[:i])
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2256..2271
                                                  api/dispatcher.pb.go on lines 2277..2292
                                                  api/dispatcher.pb.go on lines 2298..2313
                                                  api/dispatcher.pb.go on lines 2319..2334
                                                  api/raft.pb.go on lines 1869..1884
                                                  api/raft.pb.go on lines 1890..1905
                                                  api/raft.pb.go on lines 1911..1926
                                                  api/raft.pb.go on lines 1932..1947
                                                  api/raft.pb.go on lines 1953..1968
                                                  api/raft.pb.go on lines 1974..1989
                                                  api/raft.pb.go on lines 1995..2010
                                                  api/raft.pb.go on lines 2016..2031
                                                  api/raft.pb.go on lines 2037..2052
                                                  api/raft.pb.go on lines 2058..2073
                                                  api/specs.pb.go on lines 2355..2370
                                                  api/specs.pb.go on lines 2376..2391
                                                  api/specs.pb.go on lines 2397..2412
                                                  api/specs.pb.go on lines 2418..2433
                                                  api/specs.pb.go on lines 2659..2674
                                                  api/specs.pb.go on lines 2680..2695
                                                  api/specs.pb.go on lines 2701..2716
                                                  api/watch.pb.go on lines 1371..1386
                                                  api/watch.pb.go on lines 1392..1407
                                                  api/watch.pb.go on lines 1413..1428
                                                  api/watch.pb.go on lines 1434..1449
                                                  api/watch.pb.go on lines 1455..1470
                                                  api/watch.pb.go on lines 1476..1491
                                                  api/watch.pb.go on lines 1497..1512
                                                  api/watch.pb.go on lines 1518..1533
                                                  api/watch.pb.go on lines 1539..1554
                                                  api/watch.pb.go on lines 1560..1575
                                                  api/watch.pb.go on lines 1769..1784
                                                  api/watch.pb.go on lines 1818..1833

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *Object_Cluster) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      if m.Cluster != nil {
                                                          {
                                                              size, err := m.Cluster.MarshalToSizedBuffer(dAtA[:i])
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2256..2271
                                                  api/dispatcher.pb.go on lines 2277..2292
                                                  api/dispatcher.pb.go on lines 2298..2313
                                                  api/dispatcher.pb.go on lines 2319..2334
                                                  api/raft.pb.go on lines 1869..1884
                                                  api/raft.pb.go on lines 1890..1905
                                                  api/raft.pb.go on lines 1911..1926
                                                  api/raft.pb.go on lines 1932..1947
                                                  api/raft.pb.go on lines 1953..1968
                                                  api/raft.pb.go on lines 1974..1989
                                                  api/raft.pb.go on lines 1995..2010
                                                  api/raft.pb.go on lines 2016..2031
                                                  api/raft.pb.go on lines 2037..2052
                                                  api/raft.pb.go on lines 2058..2073
                                                  api/specs.pb.go on lines 2355..2370
                                                  api/specs.pb.go on lines 2376..2391
                                                  api/specs.pb.go on lines 2397..2412
                                                  api/specs.pb.go on lines 2418..2433
                                                  api/specs.pb.go on lines 2659..2674
                                                  api/specs.pb.go on lines 2680..2695
                                                  api/specs.pb.go on lines 2701..2716
                                                  api/watch.pb.go on lines 1371..1386
                                                  api/watch.pb.go on lines 1392..1407
                                                  api/watch.pb.go on lines 1413..1428
                                                  api/watch.pb.go on lines 1434..1449
                                                  api/watch.pb.go on lines 1476..1491
                                                  api/watch.pb.go on lines 1497..1512
                                                  api/watch.pb.go on lines 1518..1533
                                                  api/watch.pb.go on lines 1539..1554
                                                  api/watch.pb.go on lines 1560..1575
                                                  api/watch.pb.go on lines 1748..1763
                                                  api/watch.pb.go on lines 1769..1784
                                                  api/watch.pb.go on lines 1818..1833

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *SelectBy_CustomPrefix) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                                                      i := len(dAtA)
                                                      if m.CustomPrefix != nil {
                                                          {
                                                              size, err := m.CustomPrefix.MarshalToSizedBuffer(dAtA[:i])
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 33 other locations - About 1 hr to fix
                                                  api/dispatcher.pb.go on lines 2256..2271
                                                  api/dispatcher.pb.go on lines 2277..2292
                                                  api/dispatcher.pb.go on lines 2298..2313
                                                  api/dispatcher.pb.go on lines 2319..2334
                                                  api/raft.pb.go on lines 1869..1884
                                                  api/raft.pb.go on lines 1890..1905
                                                  api/raft.pb.go on lines 1911..1926
                                                  api/raft.pb.go on lines 1932..1947
                                                  api/raft.pb.go on lines 1953..1968
                                                  api/raft.pb.go on lines 1974..1989
                                                  api/raft.pb.go on lines 1995..2010
                                                  api/raft.pb.go on lines 2016..2031
                                                  api/raft.pb.go on lines 2037..2052
                                                  api/raft.pb.go on lines 2058..2073
                                                  api/specs.pb.go on lines 2355..2370
                                                  api/specs.pb.go on lines 2376..2391
                                                  api/specs.pb.go on lines 2397..2412
                                                  api/specs.pb.go on lines 2418..2433
                                                  api/specs.pb.go on lines 2659..2674
                                                  api/specs.pb.go on lines 2680..2695
                                                  api/specs.pb.go on lines 2701..2716
                                                  api/watch.pb.go on lines 1371..1386
                                                  api/watch.pb.go on lines 1392..1407
                                                  api/watch.pb.go on lines 1413..1428
                                                  api/watch.pb.go on lines 1434..1449
                                                  api/watch.pb.go on lines 1455..1470
                                                  api/watch.pb.go on lines 1476..1491
                                                  api/watch.pb.go on lines 1497..1512
                                                  api/watch.pb.go on lines 1518..1533
                                                  api/watch.pb.go on lines 1539..1554
                                                  api/watch.pb.go on lines 1560..1575
                                                  api/watch.pb.go on lines 1748..1763
                                                  api/watch.pb.go on lines 1818..1833

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 142.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *WatchMessage_Event) CopyFrom(src interface{}) {
                                                  
                                                      o := src.(*WatchMessage_Event)
                                                      *m = *o
                                                      if o.Object != nil {
                                                  Severity: Major
                                                  Found in api/watch.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/logbroker.pb.go on lines 848..860

                                                  Duplicated Code

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

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

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

                                                          case 10:
                                                              if wireType != 0 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field DesiredState", wireType)
                                                              }
                                                              var v TaskState
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 2 other locations - About 1 hr to fix
                                                  api/watch.pb.go on lines 4071..4090
                                                  api/watch.pb.go on lines 4091..4110

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 140.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 11:
                                                              if wireType != 0 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
                                                              }
                                                              var v NodeRole
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 2 other locations - About 1 hr to fix
                                                  api/watch.pb.go on lines 4051..4070
                                                  api/watch.pb.go on lines 4091..4110

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 140.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 12:
                                                              if wireType != 0 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Membership", wireType)
                                                              }
                                                              var v NodeSpec_Membership
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 2 other locations - About 1 hr to fix
                                                  api/watch.pb.go on lines 4051..4070
                                                  api/watch.pb.go on lines 4071..4090

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 140.

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

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

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

                                                  See codeclimate-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 *SelectBySlot) Size() (n int) {
                                                      if m == nil {
                                                          return 0
                                                      }
                                                      var l int
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 2 other locations - About 1 hr to fix
                                                  api/ca.pb.go on lines 1425..1439
                                                  api/specs.pb.go on lines 4033..4047

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 137.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (*Object) XXX_OneofWrappers() []interface{} {
                                                      return []interface{}{
                                                          (*Object_Node)(nil),
                                                          (*Object_Service)(nil),
                                                          (*Object_Network)(nil),
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 1 other location - About 1 hr to fix
                                                  api/raft.pb.go on lines 697..710

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 132.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 122.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 122.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 122.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 122.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 122.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 122.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 122.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 122.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 122.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (p *raftProxyWatchServer) 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/watch.pb.go and 9 other locations - About 50 mins to fix
                                                  api/ca.pb.go on lines 1126..1135
                                                  api/ca.pb.go on lines 1268..1277
                                                  api/dispatcher.pb.go on lines 2481..2490
                                                  api/health.pb.go on lines 410..419
                                                  api/logbroker.pb.go on lines 1754..1763
                                                  api/logbroker.pb.go on lines 1877..1886
                                                  api/raft.pb.go on lines 2124..2133
                                                  api/raft.pb.go on lines 2323..2332
                                                  api/resource.pb.go on lines 602..611

                                                  Duplicated Code

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

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

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 *SelectBySlot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                      if deterministic {
                                                          return xxx_messageInfo_SelectBySlot.Marshal(b, m, deterministic)
                                                      } else {
                                                          b = b[:cap(b)]
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 101 other locations - About 45 mins to fix
                                                  api/ca.pb.go on lines 50..61
                                                  api/ca.pb.go on lines 87..98
                                                  api/ca.pb.go on lines 131..142
                                                  api/ca.pb.go on lines 168..179
                                                  api/ca.pb.go on lines 203..214
                                                  api/ca.pb.go on lines 239..250
                                                  api/ca.pb.go on lines 274..285
                                                  api/ca.pb.go on lines 311..322
                                                  api/dispatcher.pb.go on lines 112..123
                                                  api/dispatcher.pb.go on lines 202..213
                                                  api/dispatcher.pb.go on lines 239..250
                                                  api/dispatcher.pb.go on lines 277..288
                                                  api/dispatcher.pb.go on lines 316..327
                                                  api/dispatcher.pb.go on lines 355..366
                                                  api/dispatcher.pb.go on lines 390..401
                                                  api/dispatcher.pb.go on lines 427..438
                                                  api/dispatcher.pb.go on lines 476..487
                                                  api/dispatcher.pb.go on lines 511..522
                                                  api/dispatcher.pb.go on lines 547..558
                                                  api/dispatcher.pb.go on lines 585..596
                                                  api/dispatcher.pb.go on lines 621..632
                                                  api/dispatcher.pb.go on lines 662..673
                                                  api/dispatcher.pb.go on lines 768..779
                                                  api/dispatcher.pb.go on lines 816..827
                                                  api/health.pb.go on lines 77..88
                                                  api/health.pb.go on lines 113..124
                                                  api/logbroker.pb.go on lines 105..116
                                                  api/logbroker.pb.go on lines 148..159
                                                  api/logbroker.pb.go on lines 187..198
                                                  api/logbroker.pb.go on lines 225..236
                                                  api/logbroker.pb.go on lines 273..284
                                                  api/logbroker.pb.go on lines 311..322
                                                  api/logbroker.pb.go on lines 347..358
                                                  api/logbroker.pb.go on lines 384..395
                                                  api/logbroker.pb.go on lines 432..443
                                                  api/logbroker.pb.go on lines 477..488
                                                  api/logbroker.pb.go on lines 512..523
                                                  api/objects.pb.go on lines 51..62
                                                  api/objects.pb.go on lines 123..134
                                                  api/objects.pb.go on lines 190..201
                                                  api/objects.pb.go on lines 235..246
                                                  api/objects.pb.go on lines 283..294
                                                  api/objects.pb.go on lines 382..393
                                                  api/objects.pb.go on lines 430..441
                                                  api/objects.pb.go on lines 486..497
                                                  api/objects.pb.go on lines 558..569
                                                  api/objects.pb.go on lines 602..613
                                                  api/objects.pb.go on lines 644..655
                                                  api/objects.pb.go on lines 692..703
                                                  api/objects.pb.go on lines 733..744
                                                  api/objects.pb.go on lines 790..801
                                                  api/raft.pb.go on lines 90..101
                                                  api/raft.pb.go on lines 127..138
                                                  api/raft.pb.go on lines 169..180
                                                  api/raft.pb.go on lines 205..216
                                                  api/raft.pb.go on lines 240..251
                                                  api/raft.pb.go on lines 276..287
                                                  api/raft.pb.go on lines 311..322
                                                  api/raft.pb.go on lines 348..359
                                                  api/raft.pb.go on lines 384..395
                                                  api/raft.pb.go on lines 421..432
                                                  api/raft.pb.go on lines 458..469
                                                  api/raft.pb.go on lines 498..509
                                                  api/raft.pb.go on lines 547..558
                                                  api/resource.pb.go on lines 51..62
                                                  api/resource.pb.go on lines 87..98
                                                  api/resource.pb.go on lines 123..134
                                                  api/resource.pb.go on lines 158..169
                                                  api/snapshot.pb.go on lines 73..84
                                                  api/snapshot.pb.go on lines 111..122
                                                  api/snapshot.pb.go on lines 149..160
                                                  api/specs.pb.go on lines 211..222
                                                  api/specs.pb.go on lines 274..285
                                                  api/specs.pb.go on lines 380..391
                                                  api/specs.pb.go on lines 416..427
                                                  api/specs.pb.go on lines 461..472
                                                  api/specs.pb.go on lines 498..509
                                                  api/specs.pb.go on lines 565..576
                                                  api/specs.pb.go on lines 659..670
                                                  api/specs.pb.go on lines 696..707
                                                  api/specs.pb.go on lines 736..747
                                                  api/specs.pb.go on lines 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 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 *SelectByCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                      if deterministic {
                                                          return xxx_messageInfo_SelectByCustom.Marshal(b, m, deterministic)
                                                      } else {
                                                          b = b[:cap(b)]
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 101 other locations - About 45 mins to fix
                                                  api/ca.pb.go on lines 50..61
                                                  api/ca.pb.go on lines 87..98
                                                  api/ca.pb.go on lines 131..142
                                                  api/ca.pb.go on lines 168..179
                                                  api/ca.pb.go on lines 203..214
                                                  api/ca.pb.go on lines 239..250
                                                  api/ca.pb.go on lines 274..285
                                                  api/ca.pb.go on lines 311..322
                                                  api/dispatcher.pb.go on lines 112..123
                                                  api/dispatcher.pb.go on lines 202..213
                                                  api/dispatcher.pb.go on lines 239..250
                                                  api/dispatcher.pb.go on lines 277..288
                                                  api/dispatcher.pb.go on lines 316..327
                                                  api/dispatcher.pb.go on lines 355..366
                                                  api/dispatcher.pb.go on lines 390..401
                                                  api/dispatcher.pb.go on lines 427..438
                                                  api/dispatcher.pb.go on lines 476..487
                                                  api/dispatcher.pb.go on lines 511..522
                                                  api/dispatcher.pb.go on lines 547..558
                                                  api/dispatcher.pb.go on lines 585..596
                                                  api/dispatcher.pb.go on lines 621..632
                                                  api/dispatcher.pb.go on lines 662..673
                                                  api/dispatcher.pb.go on lines 768..779
                                                  api/dispatcher.pb.go on lines 816..827
                                                  api/health.pb.go on lines 77..88
                                                  api/health.pb.go on lines 113..124
                                                  api/logbroker.pb.go on lines 105..116
                                                  api/logbroker.pb.go on lines 148..159
                                                  api/logbroker.pb.go on lines 187..198
                                                  api/logbroker.pb.go on lines 225..236
                                                  api/logbroker.pb.go on lines 273..284
                                                  api/logbroker.pb.go on lines 311..322
                                                  api/logbroker.pb.go on lines 347..358
                                                  api/logbroker.pb.go on lines 384..395
                                                  api/logbroker.pb.go on lines 432..443
                                                  api/logbroker.pb.go on lines 477..488
                                                  api/logbroker.pb.go on lines 512..523
                                                  api/objects.pb.go on lines 51..62
                                                  api/objects.pb.go on lines 123..134
                                                  api/objects.pb.go on lines 190..201
                                                  api/objects.pb.go on lines 235..246
                                                  api/objects.pb.go on lines 283..294
                                                  api/objects.pb.go on lines 382..393
                                                  api/objects.pb.go on lines 430..441
                                                  api/objects.pb.go on lines 486..497
                                                  api/objects.pb.go on lines 558..569
                                                  api/objects.pb.go on lines 602..613
                                                  api/objects.pb.go on lines 644..655
                                                  api/objects.pb.go on lines 692..703
                                                  api/objects.pb.go on lines 733..744
                                                  api/objects.pb.go on lines 790..801
                                                  api/raft.pb.go on lines 90..101
                                                  api/raft.pb.go on lines 127..138
                                                  api/raft.pb.go on lines 169..180
                                                  api/raft.pb.go on lines 205..216
                                                  api/raft.pb.go on lines 240..251
                                                  api/raft.pb.go on lines 276..287
                                                  api/raft.pb.go on lines 311..322
                                                  api/raft.pb.go on lines 348..359
                                                  api/raft.pb.go on lines 384..395
                                                  api/raft.pb.go on lines 421..432
                                                  api/raft.pb.go on lines 458..469
                                                  api/raft.pb.go on lines 498..509
                                                  api/raft.pb.go on lines 547..558
                                                  api/resource.pb.go on lines 51..62
                                                  api/resource.pb.go on lines 87..98
                                                  api/resource.pb.go on lines 123..134
                                                  api/resource.pb.go on lines 158..169
                                                  api/snapshot.pb.go on lines 73..84
                                                  api/snapshot.pb.go on lines 111..122
                                                  api/snapshot.pb.go on lines 149..160
                                                  api/specs.pb.go on lines 211..222
                                                  api/specs.pb.go on lines 274..285
                                                  api/specs.pb.go on lines 380..391
                                                  api/specs.pb.go on lines 416..427
                                                  api/specs.pb.go on lines 461..472
                                                  api/specs.pb.go on lines 498..509
                                                  api/specs.pb.go on lines 565..576
                                                  api/specs.pb.go on lines 659..670
                                                  api/specs.pb.go on lines 696..707
                                                  api/specs.pb.go on lines 736..747
                                                  api/specs.pb.go on lines 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 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 *WatchMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                      if deterministic {
                                                          return xxx_messageInfo_WatchMessage.Marshal(b, m, deterministic)
                                                      } else {
                                                          b = b[:cap(b)]
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 101 other locations - About 45 mins to fix
                                                  api/ca.pb.go on lines 50..61
                                                  api/ca.pb.go on lines 87..98
                                                  api/ca.pb.go on lines 131..142
                                                  api/ca.pb.go on lines 168..179
                                                  api/ca.pb.go on lines 203..214
                                                  api/ca.pb.go on lines 239..250
                                                  api/ca.pb.go on lines 274..285
                                                  api/ca.pb.go on lines 311..322
                                                  api/dispatcher.pb.go on lines 112..123
                                                  api/dispatcher.pb.go on lines 202..213
                                                  api/dispatcher.pb.go on lines 239..250
                                                  api/dispatcher.pb.go on lines 277..288
                                                  api/dispatcher.pb.go on lines 316..327
                                                  api/dispatcher.pb.go on lines 355..366
                                                  api/dispatcher.pb.go on lines 390..401
                                                  api/dispatcher.pb.go on lines 427..438
                                                  api/dispatcher.pb.go on lines 476..487
                                                  api/dispatcher.pb.go on lines 511..522
                                                  api/dispatcher.pb.go on lines 547..558
                                                  api/dispatcher.pb.go on lines 585..596
                                                  api/dispatcher.pb.go on lines 621..632
                                                  api/dispatcher.pb.go on lines 662..673
                                                  api/dispatcher.pb.go on lines 768..779
                                                  api/dispatcher.pb.go on lines 816..827
                                                  api/health.pb.go on lines 77..88
                                                  api/health.pb.go on lines 113..124
                                                  api/logbroker.pb.go on lines 105..116
                                                  api/logbroker.pb.go on lines 148..159
                                                  api/logbroker.pb.go on lines 187..198
                                                  api/logbroker.pb.go on lines 225..236
                                                  api/logbroker.pb.go on lines 273..284
                                                  api/logbroker.pb.go on lines 311..322
                                                  api/logbroker.pb.go on lines 347..358
                                                  api/logbroker.pb.go on lines 384..395
                                                  api/logbroker.pb.go on lines 432..443
                                                  api/logbroker.pb.go on lines 477..488
                                                  api/logbroker.pb.go on lines 512..523
                                                  api/objects.pb.go on lines 51..62
                                                  api/objects.pb.go on lines 123..134
                                                  api/objects.pb.go on lines 190..201
                                                  api/objects.pb.go on lines 235..246
                                                  api/objects.pb.go on lines 283..294
                                                  api/objects.pb.go on lines 382..393
                                                  api/objects.pb.go on lines 430..441
                                                  api/objects.pb.go on lines 486..497
                                                  api/objects.pb.go on lines 558..569
                                                  api/objects.pb.go on lines 602..613
                                                  api/objects.pb.go on lines 644..655
                                                  api/objects.pb.go on lines 692..703
                                                  api/objects.pb.go on lines 733..744
                                                  api/objects.pb.go on lines 790..801
                                                  api/raft.pb.go on lines 90..101
                                                  api/raft.pb.go on lines 127..138
                                                  api/raft.pb.go on lines 169..180
                                                  api/raft.pb.go on lines 205..216
                                                  api/raft.pb.go on lines 240..251
                                                  api/raft.pb.go on lines 276..287
                                                  api/raft.pb.go on lines 311..322
                                                  api/raft.pb.go on lines 348..359
                                                  api/raft.pb.go on lines 384..395
                                                  api/raft.pb.go on lines 421..432
                                                  api/raft.pb.go on lines 458..469
                                                  api/raft.pb.go on lines 498..509
                                                  api/raft.pb.go on lines 547..558
                                                  api/resource.pb.go on lines 51..62
                                                  api/resource.pb.go on lines 87..98
                                                  api/resource.pb.go on lines 123..134
                                                  api/resource.pb.go on lines 158..169
                                                  api/snapshot.pb.go on lines 73..84
                                                  api/snapshot.pb.go on lines 111..122
                                                  api/snapshot.pb.go on lines 149..160
                                                  api/specs.pb.go on lines 211..222
                                                  api/specs.pb.go on lines 274..285
                                                  api/specs.pb.go on lines 380..391
                                                  api/specs.pb.go on lines 416..427
                                                  api/specs.pb.go on lines 461..472
                                                  api/specs.pb.go on lines 498..509
                                                  api/specs.pb.go on lines 565..576
                                                  api/specs.pb.go on lines 659..670
                                                  api/specs.pb.go on lines 696..707
                                                  api/specs.pb.go on lines 736..747
                                                  api/specs.pb.go on lines 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 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 *SelectBy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                      if deterministic {
                                                          return xxx_messageInfo_SelectBy.Marshal(b, m, deterministic)
                                                      } else {
                                                          b = b[:cap(b)]
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 101 other locations - About 45 mins to fix
                                                  api/ca.pb.go on lines 50..61
                                                  api/ca.pb.go on lines 87..98
                                                  api/ca.pb.go on lines 131..142
                                                  api/ca.pb.go on lines 168..179
                                                  api/ca.pb.go on lines 203..214
                                                  api/ca.pb.go on lines 239..250
                                                  api/ca.pb.go on lines 274..285
                                                  api/ca.pb.go on lines 311..322
                                                  api/dispatcher.pb.go on lines 112..123
                                                  api/dispatcher.pb.go on lines 202..213
                                                  api/dispatcher.pb.go on lines 239..250
                                                  api/dispatcher.pb.go on lines 277..288
                                                  api/dispatcher.pb.go on lines 316..327
                                                  api/dispatcher.pb.go on lines 355..366
                                                  api/dispatcher.pb.go on lines 390..401
                                                  api/dispatcher.pb.go on lines 427..438
                                                  api/dispatcher.pb.go on lines 476..487
                                                  api/dispatcher.pb.go on lines 511..522
                                                  api/dispatcher.pb.go on lines 547..558
                                                  api/dispatcher.pb.go on lines 585..596
                                                  api/dispatcher.pb.go on lines 621..632
                                                  api/dispatcher.pb.go on lines 662..673
                                                  api/dispatcher.pb.go on lines 768..779
                                                  api/dispatcher.pb.go on lines 816..827
                                                  api/health.pb.go on lines 77..88
                                                  api/health.pb.go on lines 113..124
                                                  api/logbroker.pb.go on lines 105..116
                                                  api/logbroker.pb.go on lines 148..159
                                                  api/logbroker.pb.go on lines 187..198
                                                  api/logbroker.pb.go on lines 225..236
                                                  api/logbroker.pb.go on lines 273..284
                                                  api/logbroker.pb.go on lines 311..322
                                                  api/logbroker.pb.go on lines 347..358
                                                  api/logbroker.pb.go on lines 384..395
                                                  api/logbroker.pb.go on lines 432..443
                                                  api/logbroker.pb.go on lines 477..488
                                                  api/logbroker.pb.go on lines 512..523
                                                  api/objects.pb.go on lines 51..62
                                                  api/objects.pb.go on lines 123..134
                                                  api/objects.pb.go on lines 190..201
                                                  api/objects.pb.go on lines 235..246
                                                  api/objects.pb.go on lines 283..294
                                                  api/objects.pb.go on lines 382..393
                                                  api/objects.pb.go on lines 430..441
                                                  api/objects.pb.go on lines 486..497
                                                  api/objects.pb.go on lines 558..569
                                                  api/objects.pb.go on lines 602..613
                                                  api/objects.pb.go on lines 644..655
                                                  api/objects.pb.go on lines 692..703
                                                  api/objects.pb.go on lines 733..744
                                                  api/objects.pb.go on lines 790..801
                                                  api/raft.pb.go on lines 90..101
                                                  api/raft.pb.go on lines 127..138
                                                  api/raft.pb.go on lines 169..180
                                                  api/raft.pb.go on lines 205..216
                                                  api/raft.pb.go on lines 240..251
                                                  api/raft.pb.go on lines 276..287
                                                  api/raft.pb.go on lines 311..322
                                                  api/raft.pb.go on lines 348..359
                                                  api/raft.pb.go on lines 384..395
                                                  api/raft.pb.go on lines 421..432
                                                  api/raft.pb.go on lines 458..469
                                                  api/raft.pb.go on lines 498..509
                                                  api/raft.pb.go on lines 547..558
                                                  api/resource.pb.go on lines 51..62
                                                  api/resource.pb.go on lines 87..98
                                                  api/resource.pb.go on lines 123..134
                                                  api/resource.pb.go on lines 158..169
                                                  api/snapshot.pb.go on lines 73..84
                                                  api/snapshot.pb.go on lines 111..122
                                                  api/snapshot.pb.go on lines 149..160
                                                  api/specs.pb.go on lines 211..222
                                                  api/specs.pb.go on lines 274..285
                                                  api/specs.pb.go on lines 380..391
                                                  api/specs.pb.go on lines 416..427
                                                  api/specs.pb.go on lines 461..472
                                                  api/specs.pb.go on lines 498..509
                                                  api/specs.pb.go on lines 565..576
                                                  api/specs.pb.go on lines 659..670
                                                  api/specs.pb.go on lines 696..707
                                                  api/specs.pb.go on lines 736..747
                                                  api/specs.pb.go on lines 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 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 *WatchMessage_Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                      if deterministic {
                                                          return xxx_messageInfo_WatchMessage_Event.Marshal(b, m, deterministic)
                                                      } else {
                                                          b = b[:cap(b)]
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 101 other locations - About 45 mins to fix
                                                  api/ca.pb.go on lines 50..61
                                                  api/ca.pb.go on lines 87..98
                                                  api/ca.pb.go on lines 131..142
                                                  api/ca.pb.go on lines 168..179
                                                  api/ca.pb.go on lines 203..214
                                                  api/ca.pb.go on lines 239..250
                                                  api/ca.pb.go on lines 274..285
                                                  api/ca.pb.go on lines 311..322
                                                  api/dispatcher.pb.go on lines 112..123
                                                  api/dispatcher.pb.go on lines 202..213
                                                  api/dispatcher.pb.go on lines 239..250
                                                  api/dispatcher.pb.go on lines 277..288
                                                  api/dispatcher.pb.go on lines 316..327
                                                  api/dispatcher.pb.go on lines 355..366
                                                  api/dispatcher.pb.go on lines 390..401
                                                  api/dispatcher.pb.go on lines 427..438
                                                  api/dispatcher.pb.go on lines 476..487
                                                  api/dispatcher.pb.go on lines 511..522
                                                  api/dispatcher.pb.go on lines 547..558
                                                  api/dispatcher.pb.go on lines 585..596
                                                  api/dispatcher.pb.go on lines 621..632
                                                  api/dispatcher.pb.go on lines 662..673
                                                  api/dispatcher.pb.go on lines 768..779
                                                  api/dispatcher.pb.go on lines 816..827
                                                  api/health.pb.go on lines 77..88
                                                  api/health.pb.go on lines 113..124
                                                  api/logbroker.pb.go on lines 105..116
                                                  api/logbroker.pb.go on lines 148..159
                                                  api/logbroker.pb.go on lines 187..198
                                                  api/logbroker.pb.go on lines 225..236
                                                  api/logbroker.pb.go on lines 273..284
                                                  api/logbroker.pb.go on lines 311..322
                                                  api/logbroker.pb.go on lines 347..358
                                                  api/logbroker.pb.go on lines 384..395
                                                  api/logbroker.pb.go on lines 432..443
                                                  api/logbroker.pb.go on lines 477..488
                                                  api/logbroker.pb.go on lines 512..523
                                                  api/objects.pb.go on lines 51..62
                                                  api/objects.pb.go on lines 123..134
                                                  api/objects.pb.go on lines 190..201
                                                  api/objects.pb.go on lines 235..246
                                                  api/objects.pb.go on lines 283..294
                                                  api/objects.pb.go on lines 382..393
                                                  api/objects.pb.go on lines 430..441
                                                  api/objects.pb.go on lines 486..497
                                                  api/objects.pb.go on lines 558..569
                                                  api/objects.pb.go on lines 602..613
                                                  api/objects.pb.go on lines 644..655
                                                  api/objects.pb.go on lines 692..703
                                                  api/objects.pb.go on lines 733..744
                                                  api/objects.pb.go on lines 790..801
                                                  api/raft.pb.go on lines 90..101
                                                  api/raft.pb.go on lines 127..138
                                                  api/raft.pb.go on lines 169..180
                                                  api/raft.pb.go on lines 205..216
                                                  api/raft.pb.go on lines 240..251
                                                  api/raft.pb.go on lines 276..287
                                                  api/raft.pb.go on lines 311..322
                                                  api/raft.pb.go on lines 348..359
                                                  api/raft.pb.go on lines 384..395
                                                  api/raft.pb.go on lines 421..432
                                                  api/raft.pb.go on lines 458..469
                                                  api/raft.pb.go on lines 498..509
                                                  api/raft.pb.go on lines 547..558
                                                  api/resource.pb.go on lines 51..62
                                                  api/resource.pb.go on lines 87..98
                                                  api/resource.pb.go on lines 123..134
                                                  api/resource.pb.go on lines 158..169
                                                  api/snapshot.pb.go on lines 73..84
                                                  api/snapshot.pb.go on lines 111..122
                                                  api/snapshot.pb.go on lines 149..160
                                                  api/specs.pb.go on lines 211..222
                                                  api/specs.pb.go on lines 274..285
                                                  api/specs.pb.go on lines 380..391
                                                  api/specs.pb.go on lines 416..427
                                                  api/specs.pb.go on lines 461..472
                                                  api/specs.pb.go on lines 498..509
                                                  api/specs.pb.go on lines 565..576
                                                  api/specs.pb.go on lines 659..670
                                                  api/specs.pb.go on lines 696..707
                                                  api/specs.pb.go on lines 736..747
                                                  api/specs.pb.go on lines 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
                                                  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 *WatchRequest_WatchEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                      if deterministic {
                                                          return xxx_messageInfo_WatchRequest_WatchEntry.Marshal(b, m, deterministic)
                                                      } else {
                                                          b = b[:cap(b)]
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 101 other locations - About 45 mins to fix
                                                  api/ca.pb.go on lines 50..61
                                                  api/ca.pb.go on lines 87..98
                                                  api/ca.pb.go on lines 131..142
                                                  api/ca.pb.go on lines 168..179
                                                  api/ca.pb.go on lines 203..214
                                                  api/ca.pb.go on lines 239..250
                                                  api/ca.pb.go on lines 274..285
                                                  api/ca.pb.go on lines 311..322
                                                  api/dispatcher.pb.go on lines 112..123
                                                  api/dispatcher.pb.go on lines 202..213
                                                  api/dispatcher.pb.go on lines 239..250
                                                  api/dispatcher.pb.go on lines 277..288
                                                  api/dispatcher.pb.go on lines 316..327
                                                  api/dispatcher.pb.go on lines 355..366
                                                  api/dispatcher.pb.go on lines 390..401
                                                  api/dispatcher.pb.go on lines 427..438
                                                  api/dispatcher.pb.go on lines 476..487
                                                  api/dispatcher.pb.go on lines 511..522
                                                  api/dispatcher.pb.go on lines 547..558
                                                  api/dispatcher.pb.go on lines 585..596
                                                  api/dispatcher.pb.go on lines 621..632
                                                  api/dispatcher.pb.go on lines 662..673
                                                  api/dispatcher.pb.go on lines 768..779
                                                  api/dispatcher.pb.go on lines 816..827
                                                  api/health.pb.go on lines 77..88
                                                  api/health.pb.go on lines 113..124
                                                  api/logbroker.pb.go on lines 105..116
                                                  api/logbroker.pb.go on lines 148..159
                                                  api/logbroker.pb.go on lines 187..198
                                                  api/logbroker.pb.go on lines 225..236
                                                  api/logbroker.pb.go on lines 273..284
                                                  api/logbroker.pb.go on lines 311..322
                                                  api/logbroker.pb.go on lines 347..358
                                                  api/logbroker.pb.go on lines 384..395
                                                  api/logbroker.pb.go on lines 432..443
                                                  api/logbroker.pb.go on lines 477..488
                                                  api/logbroker.pb.go on lines 512..523
                                                  api/objects.pb.go on lines 51..62
                                                  api/objects.pb.go on lines 123..134
                                                  api/objects.pb.go on lines 190..201
                                                  api/objects.pb.go on lines 235..246
                                                  api/objects.pb.go on lines 283..294
                                                  api/objects.pb.go on lines 382..393
                                                  api/objects.pb.go on lines 430..441
                                                  api/objects.pb.go on lines 486..497
                                                  api/objects.pb.go on lines 558..569
                                                  api/objects.pb.go on lines 602..613
                                                  api/objects.pb.go on lines 644..655
                                                  api/objects.pb.go on lines 692..703
                                                  api/objects.pb.go on lines 733..744
                                                  api/objects.pb.go on lines 790..801
                                                  api/raft.pb.go on lines 90..101
                                                  api/raft.pb.go on lines 127..138
                                                  api/raft.pb.go on lines 169..180
                                                  api/raft.pb.go on lines 205..216
                                                  api/raft.pb.go on lines 240..251
                                                  api/raft.pb.go on lines 276..287
                                                  api/raft.pb.go on lines 311..322
                                                  api/raft.pb.go on lines 348..359
                                                  api/raft.pb.go on lines 384..395
                                                  api/raft.pb.go on lines 421..432
                                                  api/raft.pb.go on lines 458..469
                                                  api/raft.pb.go on lines 498..509
                                                  api/raft.pb.go on lines 547..558
                                                  api/resource.pb.go on lines 51..62
                                                  api/resource.pb.go on lines 87..98
                                                  api/resource.pb.go on lines 123..134
                                                  api/resource.pb.go on lines 158..169
                                                  api/snapshot.pb.go on lines 73..84
                                                  api/snapshot.pb.go on lines 111..122
                                                  api/snapshot.pb.go on lines 149..160
                                                  api/specs.pb.go on lines 211..222
                                                  api/specs.pb.go on lines 274..285
                                                  api/specs.pb.go on lines 380..391
                                                  api/specs.pb.go on lines 416..427
                                                  api/specs.pb.go on lines 461..472
                                                  api/specs.pb.go on lines 498..509
                                                  api/specs.pb.go on lines 565..576
                                                  api/specs.pb.go on lines 659..670
                                                  api/specs.pb.go on lines 696..707
                                                  api/specs.pb.go on lines 736..747
                                                  api/specs.pb.go on lines 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 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 *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                      if deterministic {
                                                          return xxx_messageInfo_WatchRequest.Marshal(b, m, deterministic)
                                                      } else {
                                                          b = b[:cap(b)]
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 101 other locations - About 45 mins to fix
                                                  api/ca.pb.go on lines 50..61
                                                  api/ca.pb.go on lines 87..98
                                                  api/ca.pb.go on lines 131..142
                                                  api/ca.pb.go on lines 168..179
                                                  api/ca.pb.go on lines 203..214
                                                  api/ca.pb.go on lines 239..250
                                                  api/ca.pb.go on lines 274..285
                                                  api/ca.pb.go on lines 311..322
                                                  api/dispatcher.pb.go on lines 112..123
                                                  api/dispatcher.pb.go on lines 202..213
                                                  api/dispatcher.pb.go on lines 239..250
                                                  api/dispatcher.pb.go on lines 277..288
                                                  api/dispatcher.pb.go on lines 316..327
                                                  api/dispatcher.pb.go on lines 355..366
                                                  api/dispatcher.pb.go on lines 390..401
                                                  api/dispatcher.pb.go on lines 427..438
                                                  api/dispatcher.pb.go on lines 476..487
                                                  api/dispatcher.pb.go on lines 511..522
                                                  api/dispatcher.pb.go on lines 547..558
                                                  api/dispatcher.pb.go on lines 585..596
                                                  api/dispatcher.pb.go on lines 621..632
                                                  api/dispatcher.pb.go on lines 662..673
                                                  api/dispatcher.pb.go on lines 768..779
                                                  api/dispatcher.pb.go on lines 816..827
                                                  api/health.pb.go on lines 77..88
                                                  api/health.pb.go on lines 113..124
                                                  api/logbroker.pb.go on lines 105..116
                                                  api/logbroker.pb.go on lines 148..159
                                                  api/logbroker.pb.go on lines 187..198
                                                  api/logbroker.pb.go on lines 225..236
                                                  api/logbroker.pb.go on lines 273..284
                                                  api/logbroker.pb.go on lines 311..322
                                                  api/logbroker.pb.go on lines 347..358
                                                  api/logbroker.pb.go on lines 384..395
                                                  api/logbroker.pb.go on lines 432..443
                                                  api/logbroker.pb.go on lines 477..488
                                                  api/logbroker.pb.go on lines 512..523
                                                  api/objects.pb.go on lines 51..62
                                                  api/objects.pb.go on lines 123..134
                                                  api/objects.pb.go on lines 190..201
                                                  api/objects.pb.go on lines 235..246
                                                  api/objects.pb.go on lines 283..294
                                                  api/objects.pb.go on lines 382..393
                                                  api/objects.pb.go on lines 430..441
                                                  api/objects.pb.go on lines 486..497
                                                  api/objects.pb.go on lines 558..569
                                                  api/objects.pb.go on lines 602..613
                                                  api/objects.pb.go on lines 644..655
                                                  api/objects.pb.go on lines 692..703
                                                  api/objects.pb.go on lines 733..744
                                                  api/objects.pb.go on lines 790..801
                                                  api/raft.pb.go on lines 90..101
                                                  api/raft.pb.go on lines 127..138
                                                  api/raft.pb.go on lines 169..180
                                                  api/raft.pb.go on lines 205..216
                                                  api/raft.pb.go on lines 240..251
                                                  api/raft.pb.go on lines 276..287
                                                  api/raft.pb.go on lines 311..322
                                                  api/raft.pb.go on lines 348..359
                                                  api/raft.pb.go on lines 384..395
                                                  api/raft.pb.go on lines 421..432
                                                  api/raft.pb.go on lines 458..469
                                                  api/raft.pb.go on lines 498..509
                                                  api/raft.pb.go on lines 547..558
                                                  api/resource.pb.go on lines 51..62
                                                  api/resource.pb.go on lines 87..98
                                                  api/resource.pb.go on lines 123..134
                                                  api/resource.pb.go on lines 158..169
                                                  api/snapshot.pb.go on lines 73..84
                                                  api/snapshot.pb.go on lines 111..122
                                                  api/snapshot.pb.go on lines 149..160
                                                  api/specs.pb.go on lines 211..222
                                                  api/specs.pb.go on lines 274..285
                                                  api/specs.pb.go on lines 380..391
                                                  api/specs.pb.go on lines 416..427
                                                  api/specs.pb.go on lines 461..472
                                                  api/specs.pb.go on lines 498..509
                                                  api/specs.pb.go on lines 565..576
                                                  api/specs.pb.go on lines 659..670
                                                  api/specs.pb.go on lines 696..707
                                                  api/specs.pb.go on lines 736..747
                                                  api/specs.pb.go on lines 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 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 *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                      if deterministic {
                                                          return xxx_messageInfo_Object.Marshal(b, m, deterministic)
                                                      } else {
                                                          b = b[:cap(b)]
                                                  Severity: Major
                                                  Found in api/watch.pb.go and 101 other locations - About 45 mins to fix
                                                  api/ca.pb.go on lines 50..61
                                                  api/ca.pb.go on lines 87..98
                                                  api/ca.pb.go on lines 131..142
                                                  api/ca.pb.go on lines 168..179
                                                  api/ca.pb.go on lines 203..214
                                                  api/ca.pb.go on lines 239..250
                                                  api/ca.pb.go on lines 274..285
                                                  api/ca.pb.go on lines 311..322
                                                  api/dispatcher.pb.go on lines 112..123
                                                  api/dispatcher.pb.go on lines 202..213
                                                  api/dispatcher.pb.go on lines 239..250
                                                  api/dispatcher.pb.go on lines 277..288
                                                  api/dispatcher.pb.go on lines 316..327
                                                  api/dispatcher.pb.go on lines 355..366
                                                  api/dispatcher.pb.go on lines 390..401
                                                  api/dispatcher.pb.go on lines 427..438
                                                  api/dispatcher.pb.go on lines 476..487
                                                  api/dispatcher.pb.go on lines 511..522
                                                  api/dispatcher.pb.go on lines 547..558
                                                  api/dispatcher.pb.go on lines 585..596
                                                  api/dispatcher.pb.go on lines 621..632
                                                  api/dispatcher.pb.go on lines 662..673
                                                  api/dispatcher.pb.go on lines 768..779
                                                  api/dispatcher.pb.go on lines 816..827
                                                  api/health.pb.go on lines 77..88
                                                  api/health.pb.go on lines 113..124
                                                  api/logbroker.pb.go on lines 105..116
                                                  api/logbroker.pb.go on lines 148..159
                                                  api/logbroker.pb.go on lines 187..198
                                                  api/logbroker.pb.go on lines 225..236
                                                  api/logbroker.pb.go on lines 273..284
                                                  api/logbroker.pb.go on lines 311..322
                                                  api/logbroker.pb.go on lines 347..358
                                                  api/logbroker.pb.go on lines 384..395
                                                  api/logbroker.pb.go on lines 432..443
                                                  api/logbroker.pb.go on lines 477..488
                                                  api/logbroker.pb.go on lines 512..523
                                                  api/objects.pb.go on lines 51..62
                                                  api/objects.pb.go on lines 123..134
                                                  api/objects.pb.go on lines 190..201
                                                  api/objects.pb.go on lines 235..246
                                                  api/objects.pb.go on lines 283..294
                                                  api/objects.pb.go on lines 382..393
                                                  api/objects.pb.go on lines 430..441
                                                  api/objects.pb.go on lines 486..497
                                                  api/objects.pb.go on lines 558..569
                                                  api/objects.pb.go on lines 602..613
                                                  api/objects.pb.go on lines 644..655
                                                  api/objects.pb.go on lines 692..703
                                                  api/objects.pb.go on lines 733..744
                                                  api/objects.pb.go on lines 790..801
                                                  api/raft.pb.go on lines 90..101
                                                  api/raft.pb.go on lines 127..138
                                                  api/raft.pb.go on lines 169..180
                                                  api/raft.pb.go on lines 205..216
                                                  api/raft.pb.go on lines 240..251
                                                  api/raft.pb.go on lines 276..287
                                                  api/raft.pb.go on lines 311..322
                                                  api/raft.pb.go on lines 348..359
                                                  api/raft.pb.go on lines 384..395
                                                  api/raft.pb.go on lines 421..432
                                                  api/raft.pb.go on lines 458..469
                                                  api/raft.pb.go on lines 498..509
                                                  api/raft.pb.go on lines 547..558
                                                  api/resource.pb.go on lines 51..62
                                                  api/resource.pb.go on lines 87..98
                                                  api/resource.pb.go on lines 123..134
                                                  api/resource.pb.go on lines 158..169
                                                  api/snapshot.pb.go on lines 73..84
                                                  api/snapshot.pb.go on lines 111..122
                                                  api/snapshot.pb.go on lines 149..160
                                                  api/specs.pb.go on lines 211..222
                                                  api/specs.pb.go on lines 274..285
                                                  api/specs.pb.go on lines 380..391
                                                  api/specs.pb.go on lines 416..427
                                                  api/specs.pb.go on lines 461..472
                                                  api/specs.pb.go on lines 498..509
                                                  api/specs.pb.go on lines 565..576
                                                  api/specs.pb.go on lines 659..670
                                                  api/specs.pb.go on lines 696..707
                                                  api/specs.pb.go on lines 736..747
                                                  api/specs.pb.go on lines 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 275..286
                                                  api/watch.pb.go on lines 313..324
                                                  api/watch.pb.go on lines 370..381
                                                  api/watch.pb.go on lines 633..644
                                                  api/watch.pb.go on lines 677..688
                                                  api/watch.pb.go on lines 719..730
                                                  api/watch.pb.go on lines 764..775
                                                  protobuf/plugin/plugin.pb.go on lines 58..69
                                                  protobuf/plugin/plugin.pb.go on lines 94..105
                                                  protobuf/plugin/plugin.pb.go on lines 135..146

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 115.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 108.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 108.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 108.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 108.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 108.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 108.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 108.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 108.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 108.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 108.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 108.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 108.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 108.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 107.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 107.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

                                                  There are no issues that match your filters.

                                                  Category
                                                  Status