docker/swarmkit

View on GitHub

Showing 1,820 of 1,820 total issues

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

func (m *TasksMessage) CopyFrom(src interface{}) {

    o := src.(*TasksMessage)
    *m = *o
    if o.Tasks != nil {
Severity: Major
Found in api/dispatcher.pb.go and 5 other locations - About 1 hr to fix
api/dispatcher.pb.go on lines 1099..1111
api/dispatcher.pb.go on lines 1151..1163
api/dispatcher.pb.go on lines 1315..1327
api/specs.pb.go on lines 2037..2049
api/watch.pb.go on lines 1153..1165

Duplicated Code

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

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

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

Tuning

This issue has a mass of 145.

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

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

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

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

Refactorings

Further Reading

Similar blocks of code found in 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 6 locations. Consider refactoring.
Open

func (m *EndpointSpec) CopyFrom(src interface{}) {

    o := src.(*EndpointSpec)
    *m = *o
    if o.Ports != nil {
Severity: Major
Found in api/specs.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/watch.pb.go on lines 1153..1165

Duplicated Code

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

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

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

Tuning

This issue has a mass of 145.

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

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

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

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

Refactorings

Further Reading

Method nodeSet.tree has 56 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (ns *nodeSet) tree(serviceID string, preferences []*api.PlacementPreference, maxAssignments int, meetsConstraints func(*NodeInfo) bool, nodeLess func(*NodeInfo, *NodeInfo) bool) decisionTree {
    var root decisionTree

    if maxAssignments == 0 {
        return root
Severity: Minor
Found in manager/scheduler/nodeset.go - About 1 hr to fix

    Method Allocator.allocateTask has 56 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (a *Allocator) allocateTask(ctx context.Context, t *api.Task) (err error) {
        taskUpdated := false
        nc := a.netCtx
    
        logger := log.G(ctx).WithField("method", "(*Allocator).allocateTask")
    Severity: Minor
    Found in manager/allocator/network.go - About 1 hr to fix

      Method Server.ListServices has 55 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (s *Server) ListServices(ctx context.Context, request *api.ListServicesRequest) (*api.ListServicesResponse, error) {
          var (
              services []*api.Service
              err      error
          )
      Severity: Minor
      Found in manager/controlapi/service.go - About 1 hr to fix

        Method peer.sendProcessMessage has 55 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (p *peer) sendProcessMessage(ctx context.Context, m raftpb.Message) error {
            // These lines used to be in the code, but they've been removed. I'm
            // leaving them in in a comment just in case they cause some unforeseen
            // breakage later, to show why they were removed.
            //
        Severity: Minor
        Found in manager/state/raft/transport/peer.go - About 1 hr to fix

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 142.

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

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

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

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

          Refactorings

          Further Reading

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

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 142.

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

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

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

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

          Refactorings

          Further Reading

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

          func (m *TaskSpec_Generic) MarshalToSizedBuffer(dAtA []byte) (int, error) {
              i := len(dAtA)
              if m.Generic != nil {
                  {
                      size, err := m.Generic.MarshalToSizedBuffer(dAtA[:i])
          Severity: Major
          Found in api/specs.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/watch.pb.go on lines 1371..1386
          api/watch.pb.go on lines 1392..1407
          api/watch.pb.go on lines 1413..1428
          api/watch.pb.go on lines 1434..1449
          api/watch.pb.go on lines 1455..1470
          api/watch.pb.go on lines 1476..1491
          api/watch.pb.go on lines 1497..1512
          api/watch.pb.go on lines 1518..1533
          api/watch.pb.go on lines 1539..1554
          api/watch.pb.go on lines 1560..1575
          api/watch.pb.go on lines 1748..1763
          api/watch.pb.go on lines 1769..1784
          api/watch.pb.go on lines 1818..1833

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 142.

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

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

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

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

          Refactorings

          Further Reading

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

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 142.

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

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

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

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

          Refactorings

          Further Reading

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

                  case 6:
                      if wireType != 0 {
                          return fmt.Errorf("proto: wrong wireType = %d for field PendingDelete", wireType)
                      }
                      var v int
          Severity: Major
          Found in api/objects.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/specs.pb.go on lines 6898..6917
          api/specs.pb.go on lines 7054..7073
          api/specs.pb.go on lines 7074..7093
          api/specs.pb.go on lines 8084..8103
          api/specs.pb.go on lines 8104..8123
          api/specs.pb.go on lines 8160..8179
          api/specs.pb.go on lines 8180..8199
          api/watch.pb.go on lines 4359..4378

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 142.

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

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

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

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

          Refactorings

          Further Reading

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 142.

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

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

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

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

          Refactorings

          Further Reading

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

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 142.

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

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

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

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

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language