docker/swarmkit

View on GitHub

Showing 1,008 of 1,820 total issues

Function ConvertConfigWatch has 8 return statements (exceeds 4 allowed).
Open

func ConvertConfigWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
    var (
        m          Config
        checkFuncs []ConfigCheckFunc
    )
Severity: Major
Found in api/objects.pb.go - About 50 mins to fix

    Function ConvertServiceWatch has 8 return statements (exceeds 4 allowed).
    Open

    func ConvertServiceWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
        var (
            m          Service
            checkFuncs []ServiceCheckFunc
        )
    Severity: Major
    Found in api/objects.pb.go - About 50 mins to fix

      Function ConvertExtensionWatch has 8 return statements (exceeds 4 allowed).
      Open

      func ConvertExtensionWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
          var (
              m          Extension
              checkFuncs []ExtensionCheckFunc
          )
      Severity: Major
      Found in api/objects.pb.go - About 50 mins to fix

        Function ConvertVolumeWatch has 8 return statements (exceeds 4 allowed).
        Open

        func ConvertVolumeWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
            var (
                m          Volume
                checkFuncs []VolumeCheckFunc
            )
        Severity: Major
        Found in api/objects.pb.go - About 50 mins to fix

          Function ConvertClusterWatch has 8 return statements (exceeds 4 allowed).
          Open

          func ConvertClusterWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
              var (
                  m          Cluster
                  checkFuncs []ClusterCheckFunc
              )
          Severity: Major
          Found in api/objects.pb.go - About 50 mins to fix

            Function ConvertNetworkWatch has 8 return statements (exceeds 4 allowed).
            Open

            func ConvertNetworkWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
                var (
                    m          Network
                    checkFuncs []NetworkCheckFunc
                )
            Severity: Major
            Found in api/objects.pb.go - About 50 mins to fix

              Function sanitizeResource has 8 return statements (exceeds 4 allowed).
              Open

              func sanitizeResource(nodeRes []*api.GenericResource, res *api.GenericResource) (ok bool, nrs []*api.GenericResource) {
                  switch na := res.Resource.(type) {
                  case *api.GenericResource_DiscreteResourceSpec:
                      nrs := GetResource(na.DiscreteResourceSpec.Kind, nodeRes)
              
              
              Severity: Major
              Found in api/genericresource/resource_management.go - About 50 mins to fix

                Method raftProxyDispatcherServer.Tasks has 8 return statements (exceeds 4 allowed).
                Open

                func (p *raftProxyDispatcherServer) Tasks(r *TasksRequest, stream Dispatcher_TasksServer) error {
                    ctx := stream.Context()
                    conn, err := p.connSelector.LeaderConn(ctx)
                    if err != nil {
                        if err == raftselector.ErrIsLeader {
                Severity: Major
                Found in api/dispatcher.pb.go - About 50 mins to fix

                  Method raftProxyDispatcherServer.Assignments has 8 return statements (exceeds 4 allowed).
                  Open

                  func (p *raftProxyDispatcherServer) Assignments(r *AssignmentsRequest, stream Dispatcher_AssignmentsServer) error {
                      ctx := stream.Context()
                      conn, err := p.connSelector.LeaderConn(ctx)
                      if err != nil {
                          if err == raftselector.ErrIsLeader {
                  Severity: Major
                  Found in api/dispatcher.pb.go - About 50 mins to fix

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

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

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

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

                        Method raftProxyDispatcherServer.Session has 8 return statements (exceeds 4 allowed).
                        Open

                        func (p *raftProxyDispatcherServer) Session(r *SessionRequest, stream Dispatcher_SessionServer) error {
                            ctx := stream.Context()
                            conn, err := p.connSelector.LeaderConn(ctx)
                            if err != nil {
                                if err == raftselector.ErrIsLeader {
                        Severity: Major
                        Found in api/dispatcher.pb.go - About 50 mins to fix

                          Method ServiceSpec.MarshalToSizedBuffer has 8 return statements (exceeds 4 allowed).
                          Open

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

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

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

                              Method TaskSpec.MarshalToSizedBuffer has 8 return statements (exceeds 4 allowed).
                              Open

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

                                Function CheckTasks has 8 return statements (exceeds 4 allowed).
                                Open

                                func CheckTasks(ctx context.Context, s *store.MemoryStore, readTx store.ReadTx, initHandler InitHandler, startSupervisor restart.SupervisorInterface) error {
                                    instances := make(map[orchestrator.SlotTuple][]*api.Task)
                                    err := s.Batch(func(batch *store.Batch) error {
                                        tasks, err := store.FindTasks(readTx, store.All)
                                        if err != nil {
                                Severity: Major
                                Found in manager/orchestrator/taskinit/init.go - About 50 mins to fix

                                  Method Manager.handleVolume has 8 return statements (exceeds 4 allowed).
                                  Open

                                  func (vm *Manager) handleVolume(ctx context.Context, id string) error {
                                      var volume *api.Volume
                                      vm.store.View(func(tx store.ReadTx) {
                                          volume = store.GetVolume(tx, id)
                                      })
                                  Severity: Major
                                  Found in manager/csi/manager.go - About 50 mins to fix

                                    Method Dispatcher.markNodesUnknown has 8 return statements (exceeds 4 allowed).
                                    Open

                                    func (d *Dispatcher) markNodesUnknown(ctx context.Context) error {
                                        log := log.G(ctx).WithField("method", "(*Dispatcher).markNodesUnknown")
                                        var nodes []*api.Node
                                        var err error
                                        d.store.View(func(tx store.ReadTx) {
                                    Severity: Major
                                    Found in manager/dispatcher/dispatcher.go - About 50 mins to fix

                                      Method Server.UpdateCluster has 8 return statements (exceeds 4 allowed).
                                      Open

                                      func (s *Server) UpdateCluster(ctx context.Context, request *api.UpdateClusterRequest) (*api.UpdateClusterResponse, error) {
                                          if request.ClusterID == "" || request.ClusterVersion == nil {
                                              return nil, status.Errorf(codes.InvalidArgument, errInvalidArgument.Error())
                                          }
                                          if err := validateClusterSpec(request.Spec); err != nil {
                                      Severity: Major
                                      Found in manager/controlapi/cluster.go - About 50 mins to fix

                                        Method Server.ListServices has 8 return statements (exceeds 4 allowed).
                                        Open

                                        func (s *Server) ListServices(ctx context.Context, request *api.ListServicesRequest) (*api.ListServicesResponse, error) {
                                            var (
                                                services []*api.Service
                                                err      error
                                            )
                                        Severity: Major
                                        Found in manager/controlapi/service.go - About 50 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language