docker/swarmkit

View on GitHub
api/snapshot.pb.go

Summary

Maintainability
F
3 wks
Test Coverage

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

func (m *StoreSnapshot) Unmarshal(dAtA []byte) error {
    l := len(dAtA)
    iNdEx := 0
    for iNdEx < l {
        preIndex := iNdEx
Severity: Minor
Found in api/snapshot.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

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

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

package api

Severity: Major
Found in api/snapshot.pb.go - About 3 days to fix

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

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

    Cognitive Complexity

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

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

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

    Further reading

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

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

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

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

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

      Cognitive Complexity

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

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

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

      Further reading

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

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

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

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

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

          Method StoreSnapshot.MarshalToSizedBuffer has 145 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

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

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

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

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

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

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

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

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

                  func (m *StoreSnapshot) Size() (n int) {
                      if m == nil {
                          return 0
                      }
                      var l int
                  Severity: Minor
                  Found in api/snapshot.pb.go - About 2 hrs to fix

                  Cognitive Complexity

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

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

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

                  Further reading

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

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

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

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

                    Cognitive Complexity

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

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

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

                    Further reading

                    Method StoreSnapshot.CopyFrom has 72 lines of code (exceeds 50 allowed). Consider refactoring.
                    Open

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

                      Method StoreSnapshot.String has 67 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func (this *StoreSnapshot) String() string {
                          if this == nil {
                              return "nil"
                          }
                          repeatedStringForNodes := "[]*Node{"
                      Severity: Minor
                      Found in api/snapshot.pb.go - About 1 hr to fix

                        Method StoreSnapshot.Size has 66 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func (m *StoreSnapshot) Size() (n int) {
                            if m == nil {
                                return 0
                            }
                            var l int
                        Severity: Minor
                        Found in api/snapshot.pb.go - About 1 hr to fix

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

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

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

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

                              Avoid deeply nested control flow statements.
                              Open

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

                                Avoid deeply nested control flow statements.
                                Open

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

                                  Avoid deeply nested control flow statements.
                                  Open

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

                                    Avoid deeply nested control flow statements.
                                    Open

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

                                      Avoid deeply nested control flow statements.
                                      Open

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

                                        Avoid deeply nested control flow statements.
                                        Open

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

                                          Avoid deeply nested control flow statements.
                                          Open

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

                                            Avoid deeply nested control flow statements.
                                            Open

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

                                              Avoid deeply nested control flow statements.
                                              Open

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

                                                Avoid deeply nested control flow statements.
                                                Open

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

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

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

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 530.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func skipSnapshot(dAtA []byte) (n int, err error) {
                                                      l := len(dAtA)
                                                      iNdEx := 0
                                                      depth := 0
                                                      for iNdEx < l {
                                                  Severity: Major
                                                  Found in api/snapshot.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/specs.pb.go on lines 9186..9263
                                                  api/watch.pb.go on lines 4796..4873
                                                  protobuf/plugin/plugin.pb.go on lines 1190..1267

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 483.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 3:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Store", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/snapshot.pb.go and 46 other locations - About 2 hrs to fix
                                                  api/ca.pb.go on lines 2291..2323
                                                  api/logbroker.pb.go on lines 3016..3048
                                                  api/objects.pb.go on lines 6328..6360
                                                  api/objects.pb.go on lines 6515..6547
                                                  api/objects.pb.go on lines 6548..6580
                                                  api/objects.pb.go on lines 6617..6649
                                                  api/objects.pb.go on lines 6722..6754
                                                  api/objects.pb.go on lines 6909..6941
                                                  api/objects.pb.go on lines 6942..6974
                                                  api/objects.pb.go on lines 7561..7593
                                                  api/objects.pb.go on lines 7594..7626
                                                  api/objects.pb.go on lines 7710..7742
                                                  api/objects.pb.go on lines 7743..7775
                                                  api/objects.pb.go on lines 7776..7808
                                                  api/objects.pb.go on lines 8433..8465
                                                  api/objects.pb.go on lines 8466..8498
                                                  api/objects.pb.go on lines 8673..8705
                                                  api/objects.pb.go on lines 8706..8738
                                                  api/objects.pb.go on lines 8739..8771
                                                  api/objects.pb.go on lines 9160..9192
                                                  api/objects.pb.go on lines 9193..9225
                                                  api/objects.pb.go on lines 9328..9360
                                                  api/objects.pb.go on lines 9361..9393
                                                  api/objects.pb.go on lines 9476..9508
                                                  api/objects.pb.go on lines 9509..9541
                                                  api/objects.pb.go on lines 9692..9724
                                                  api/objects.pb.go on lines 9725..9757
                                                  api/objects.pb.go on lines 9872..9904
                                                  api/objects.pb.go on lines 9905..9937
                                                  api/raft.pb.go on lines 3100..3132
                                                  api/snapshot.pb.go on lines 1441..1473
                                                  api/specs.pb.go on lines 4909..4941
                                                  api/specs.pb.go on lines 5049..5081
                                                  api/specs.pb.go on lines 5082..5114
                                                  api/specs.pb.go on lines 7980..8012
                                                  api/specs.pb.go on lines 8247..8279
                                                  api/specs.pb.go on lines 8280..8312
                                                  api/specs.pb.go on lines 8313..8345
                                                  api/specs.pb.go on lines 8346..8378
                                                  api/specs.pb.go on lines 8379..8411
                                                  api/specs.pb.go on lines 8412..8444
                                                  api/specs.pb.go on lines 8445..8477
                                                  api/specs.pb.go on lines 8478..8510
                                                  api/specs.pb.go on lines 8561..8593
                                                  api/specs.pb.go on lines 8750..8782
                                                  api/specs.pb.go on lines 8903..8935

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 219.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          case 2:
                                                              if wireType != 2 {
                                                                  return fmt.Errorf("proto: wrong wireType = %d for field Membership", wireType)
                                                              }
                                                              var msglen int
                                                  Severity: Major
                                                  Found in api/snapshot.pb.go and 46 other locations - About 2 hrs to fix
                                                  api/ca.pb.go on lines 2291..2323
                                                  api/logbroker.pb.go on lines 3016..3048
                                                  api/objects.pb.go on lines 6328..6360
                                                  api/objects.pb.go on lines 6515..6547
                                                  api/objects.pb.go on lines 6548..6580
                                                  api/objects.pb.go on lines 6617..6649
                                                  api/objects.pb.go on lines 6722..6754
                                                  api/objects.pb.go on lines 6909..6941
                                                  api/objects.pb.go on lines 6942..6974
                                                  api/objects.pb.go on lines 7561..7593
                                                  api/objects.pb.go on lines 7594..7626
                                                  api/objects.pb.go on lines 7710..7742
                                                  api/objects.pb.go on lines 7743..7775
                                                  api/objects.pb.go on lines 7776..7808
                                                  api/objects.pb.go on lines 8433..8465
                                                  api/objects.pb.go on lines 8466..8498
                                                  api/objects.pb.go on lines 8673..8705
                                                  api/objects.pb.go on lines 8706..8738
                                                  api/objects.pb.go on lines 8739..8771
                                                  api/objects.pb.go on lines 9160..9192
                                                  api/objects.pb.go on lines 9193..9225
                                                  api/objects.pb.go on lines 9328..9360
                                                  api/objects.pb.go on lines 9361..9393
                                                  api/objects.pb.go on lines 9476..9508
                                                  api/objects.pb.go on lines 9509..9541
                                                  api/objects.pb.go on lines 9692..9724
                                                  api/objects.pb.go on lines 9725..9757
                                                  api/objects.pb.go on lines 9872..9904
                                                  api/objects.pb.go on lines 9905..9937
                                                  api/raft.pb.go on lines 3100..3132
                                                  api/snapshot.pb.go on lines 1474..1506
                                                  api/specs.pb.go on lines 4909..4941
                                                  api/specs.pb.go on lines 5049..5081
                                                  api/specs.pb.go on lines 5082..5114
                                                  api/specs.pb.go on lines 7980..8012
                                                  api/specs.pb.go on lines 8247..8279
                                                  api/specs.pb.go on lines 8280..8312
                                                  api/specs.pb.go on lines 8313..8345
                                                  api/specs.pb.go on lines 8346..8378
                                                  api/specs.pb.go on lines 8379..8411
                                                  api/specs.pb.go on lines 8412..8444
                                                  api/specs.pb.go on lines 8445..8477
                                                  api/specs.pb.go on lines 8478..8510
                                                  api/specs.pb.go on lines 8561..8593
                                                  api/specs.pb.go on lines 8750..8782
                                                  api/specs.pb.go on lines 8903..8935

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 219.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *ClusterSnapshot) CopyFrom(src interface{}) {
                                                  
                                                      o := src.(*ClusterSnapshot)
                                                      *m = *o
                                                      if o.Members != nil {
                                                  Severity: Major
                                                  Found in api/snapshot.pb.go and 1 other location - About 2 hrs to fix
                                                  api/raft.pb.go on lines 907..924

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 199.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                      if deterministic {
                                                          return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic)
                                                      } else {
                                                          b = b[:cap(b)]
                                                  Severity: Major
                                                  Found in api/snapshot.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/specs.pb.go on lines 211..222
                                                  api/specs.pb.go on lines 274..285
                                                  api/specs.pb.go on lines 380..391
                                                  api/specs.pb.go on lines 416..427
                                                  api/specs.pb.go on lines 461..472
                                                  api/specs.pb.go on lines 498..509
                                                  api/specs.pb.go on lines 565..576
                                                  api/specs.pb.go on lines 659..670
                                                  api/specs.pb.go on lines 696..707
                                                  api/specs.pb.go on lines 736..747
                                                  api/specs.pb.go on lines 888..899
                                                  api/specs.pb.go on lines 929..940
                                                  api/specs.pb.go on lines 974..985
                                                  api/specs.pb.go on lines 1012..1023
                                                  api/specs.pb.go on lines 1053..1064
                                                  api/specs.pb.go on lines 1116..1127
                                                  api/specs.pb.go on lines 1202..1213
                                                  api/specs.pb.go on lines 1249..1260
                                                  api/specs.pb.go on lines 1296..1307
                                                  api/specs.pb.go on lines 1373..1384
                                                  api/watch.pb.go on lines 95..106
                                                  api/watch.pb.go on lines 275..286
                                                  api/watch.pb.go on lines 313..324
                                                  api/watch.pb.go on lines 370..381
                                                  api/watch.pb.go on lines 633..644
                                                  api/watch.pb.go on lines 677..688
                                                  api/watch.pb.go on lines 719..730
                                                  api/watch.pb.go on lines 764..775
                                                  protobuf/plugin/plugin.pb.go on lines 58..69
                                                  protobuf/plugin/plugin.pb.go on lines 94..105
                                                  protobuf/plugin/plugin.pb.go on lines 135..146

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 115.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *StoreSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                      if deterministic {
                                                          return xxx_messageInfo_StoreSnapshot.Marshal(b, m, deterministic)
                                                      } else {
                                                          b = b[:cap(b)]
                                                  Severity: Major
                                                  Found in api/snapshot.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 111..122
                                                  api/snapshot.pb.go on lines 149..160
                                                  api/specs.pb.go on lines 211..222
                                                  api/specs.pb.go on lines 274..285
                                                  api/specs.pb.go on lines 380..391
                                                  api/specs.pb.go on lines 416..427
                                                  api/specs.pb.go on lines 461..472
                                                  api/specs.pb.go on lines 498..509
                                                  api/specs.pb.go on lines 565..576
                                                  api/specs.pb.go on lines 659..670
                                                  api/specs.pb.go on lines 696..707
                                                  api/specs.pb.go on lines 736..747
                                                  api/specs.pb.go on lines 888..899
                                                  api/specs.pb.go on lines 929..940
                                                  api/specs.pb.go on lines 974..985
                                                  api/specs.pb.go on lines 1012..1023
                                                  api/specs.pb.go on lines 1053..1064
                                                  api/specs.pb.go on lines 1116..1127
                                                  api/specs.pb.go on lines 1202..1213
                                                  api/specs.pb.go on lines 1249..1260
                                                  api/specs.pb.go on lines 1296..1307
                                                  api/specs.pb.go on lines 1373..1384
                                                  api/watch.pb.go on lines 95..106
                                                  api/watch.pb.go on lines 275..286
                                                  api/watch.pb.go on lines 313..324
                                                  api/watch.pb.go on lines 370..381
                                                  api/watch.pb.go on lines 633..644
                                                  api/watch.pb.go on lines 677..688
                                                  api/watch.pb.go on lines 719..730
                                                  api/watch.pb.go on lines 764..775
                                                  protobuf/plugin/plugin.pb.go on lines 58..69
                                                  protobuf/plugin/plugin.pb.go on lines 94..105
                                                  protobuf/plugin/plugin.pb.go on lines 135..146

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 115.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func (m *ClusterSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
                                                      if deterministic {
                                                          return xxx_messageInfo_ClusterSnapshot.Marshal(b, m, deterministic)
                                                      } else {
                                                          b = b[:cap(b)]
                                                  Severity: Major
                                                  Found in api/snapshot.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 149..160
                                                  api/specs.pb.go on lines 211..222
                                                  api/specs.pb.go on lines 274..285
                                                  api/specs.pb.go on lines 380..391
                                                  api/specs.pb.go on lines 416..427
                                                  api/specs.pb.go on lines 461..472
                                                  api/specs.pb.go on lines 498..509
                                                  api/specs.pb.go on lines 565..576
                                                  api/specs.pb.go on lines 659..670
                                                  api/specs.pb.go on lines 696..707
                                                  api/specs.pb.go on lines 736..747
                                                  api/specs.pb.go on lines 888..899
                                                  api/specs.pb.go on lines 929..940
                                                  api/specs.pb.go on lines 974..985
                                                  api/specs.pb.go on lines 1012..1023
                                                  api/specs.pb.go on lines 1053..1064
                                                  api/specs.pb.go on lines 1116..1127
                                                  api/specs.pb.go on lines 1202..1213
                                                  api/specs.pb.go on lines 1249..1260
                                                  api/specs.pb.go on lines 1296..1307
                                                  api/specs.pb.go on lines 1373..1384
                                                  api/watch.pb.go on lines 95..106
                                                  api/watch.pb.go on lines 275..286
                                                  api/watch.pb.go on lines 313..324
                                                  api/watch.pb.go on lines 370..381
                                                  api/watch.pb.go on lines 633..644
                                                  api/watch.pb.go on lines 677..688
                                                  api/watch.pb.go on lines 719..730
                                                  api/watch.pb.go on lines 764..775
                                                  protobuf/plugin/plugin.pb.go on lines 58..69
                                                  protobuf/plugin/plugin.pb.go on lines 94..105
                                                  protobuf/plugin/plugin.pb.go on lines 135..146

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 115.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                  func encodeVarintSnapshot(dAtA []byte, offset int, v uint64) int {
                                                      offset -= sovSnapshot(v)
                                                      base := offset
                                                      for v >= 1<<7 {
                                                          dAtA[offset] = uint8(v&0x7f | 0x80)
                                                  Severity: Major
                                                  Found in api/snapshot.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/specs.pb.go on lines 3784..3794
                                                  api/watch.pb.go on lines 2137..2147
                                                  protobuf/plugin/plugin.pb.go on lines 526..536

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 107.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

                                                  There are no issues that match your filters.

                                                  Category
                                                  Status