docker/swarmkit

View on GitHub

Showing 1,008 of 1,820 total issues

Avoid deeply nested control flow statements.
Open

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

    Avoid deeply nested control flow statements.
    Open

                        if intStringLenmapkey < 0 {
                            return ErrInvalidLengthSpecs
                        }
    Severity: Major
    Found in api/specs.pb.go - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                      } else if fieldNum == 2 {
                          var stringLenmapvalue uint64
                          for shift := uint(0); ; shift += 7 {
                              if shift >= 64 {
                                  return ErrIntOverflowSpecs
      Severity: Major
      Found in api/specs.pb.go - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

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

          Avoid deeply nested control flow statements.
          Open

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

            Avoid deeply nested control flow statements.
            Open

                                if intStringLenmapkey < 0 {
                                    return ErrInvalidLengthSpecs
                                }
            Severity: Major
            Found in api/specs.pb.go - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

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

                  Avoid deeply nested control flow statements.
                  Open

                                      if postStringIndexmapkey < 0 {
                                          return ErrInvalidLengthSpecs
                                      }
                  Severity: Major
                  Found in api/specs.pb.go - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if postStringIndexmapkey < 0 {
                                            return ErrInvalidLengthSpecs
                                        }
                    Severity: Major
                    Found in api/specs.pb.go - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

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

                        Method signHandler.ServeHTTP has 7 return statements (exceeds 4 allowed).
                        Open

                        func (h *signHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
                            if atomic.LoadUint32(h.flaky) == 1 {
                                w.WriteHeader(http.StatusInternalServerError)
                            }
                        
                        
                        Severity: Major
                        Found in ca/testutils/externalutils.go - About 45 mins to fix

                          Method Supervisor.DelayStart has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          func (r *Supervisor) DelayStart(ctx context.Context, _ store.Tx, oldTask *api.Task, newTaskID string, delay time.Duration, waitStop bool) <-chan struct{} {
                          Severity: Minor
                          Found in manager/orchestrator/restart/restart.go - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

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

                              Avoid deeply nested control flow statements.
                              Open

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

                                Avoid deeply nested control flow statements.
                                Open

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

                                  Avoid deeply nested control flow statements.
                                  Open

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

                                    Method Orchestrator.addTasks has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    func (r *Orchestrator) addTasks(ctx context.Context, batch *store.Batch, service *api.Service, runningSlots map[uint64]orchestrator.Slot, deadSlots map[uint64]orchestrator.Slot, count uint64) {
                                    Severity: Minor
                                    Found in manager/orchestrator/replicated/services.go - About 45 mins to fix

                                      Method Orchestrator.tickTasks has 7 return statements (exceeds 4 allowed).
                                      Open

                                      func (g *Orchestrator) tickTasks(ctx context.Context) {
                                          if len(g.restartTasks) == 0 {
                                              return
                                          }
                                          err := g.store.Batch(func(batch *store.Batch) error {
                                      Severity: Major
                                      Found in manager/orchestrator/global/global.go - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                if err != nil {
                                                                    log.G(ctx).WithError(err).WithField("task.id", updated.ID).Warning("failed to remove old task after starting replacement")
                                                                }
                                        Severity: Major
                                        Found in manager/orchestrator/update/updater.go - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language