Showing 1,008 of 1,820 total issues
Method Deallocator.Run
has 6 return statements (exceeds 4 allowed). Open
Open
func (deallocator *Deallocator) Run(ctx context.Context) error {
var (
allServices []*api.Service
allNetworks []*api.Network
)
Method Server.UpdateSecret
has 6 return statements (exceeds 4 allowed). Open
Open
func (s *Server) UpdateSecret(ctx context.Context, request *api.UpdateSecretRequest) (*api.UpdateSecretResponse, error) {
if request.SecretID == "" || request.SecretVersion == nil {
return nil, status.Errorf(codes.InvalidArgument, errInvalidArgument.Error())
}
var secret *api.Secret
Function validateSecretRefsSpec
has 6 return statements (exceeds 4 allowed). Open
Open
func validateSecretRefsSpec(spec api.TaskSpec) error {
container := spec.GetContainer()
if container == nil {
return nil
}
Method Node.LeaderConn
has 6 return statements (exceeds 4 allowed). Open
Open
func (n *Node) LeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
cc, err := n.getLeaderConn()
if err == nil {
return cc, nil
}
Method LogBroker.SubscribeLogs
has 6 return statements (exceeds 4 allowed). Open
Open
func (lb *LogBroker) SubscribeLogs(request *api.SubscribeLogsRequest, stream api.Logs_SubscribeLogsServer) error {
ctx := stream.Context()
if err := validateSelector(request.Selector); err != nil {
return err
Function RestoreTable
has 6 return statements (exceeds 4 allowed). Open
Open
func RestoreTable(tx Tx, table string, newObjects []api.StoreObject) error {
checkType := func(by By) error {
return nil
}
var oldObjects []api.StoreObject
Method ResourceAllocator.AttachNetwork
has 6 return statements (exceeds 4 allowed). Open
Open
func (ra *ResourceAllocator) AttachNetwork(ctx context.Context, request *api.AttachNetworkRequest) (*api.AttachNetworkResponse, error) {
nodeInfo, err := ca.RemoteNode(ctx)
if err != nil {
return nil, err
}
Method Node.ChangesBetween
has 6 return statements (exceeds 4 allowed). Open
Open
func (n *Node) ChangesBetween(from, to api.Version) ([]state.Change, error) {
n.stopMu.RLock()
defer n.stopMu.RUnlock()
if from.Index > to.Index {
Method Cluster.ValidateConfigurationChange
has 6 return statements (exceeds 4 allowed). Open
Open
func (c *Cluster) ValidateConfigurationChange(cc raftpb.ConfChange) error {
c.mu.Lock()
defer c.mu.Unlock()
if c.removed[cc.NodeID] {
Function newSession
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func newSession(ctx context.Context, agent *Agent, delay time.Duration, sessionID string, description *api.NodeDescription) *session {
Function updateRootThenUpdateCert
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func updateRootThenUpdateCert(ctx context.Context, s *SecurityConfig, connBroker *connectionbroker.Broker, rootPaths CertPaths, failedCert *x509.Certificate) (*tls.Certificate, *IssuerInfo, error) {
Method Supervisor.Restart
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (r *Supervisor) Restart(ctx context.Context, tx store.Tx, cluster *api.Cluster, service *api.Service, t api.Task) error {
Function CheckTasks
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func CheckTasks(ctx context.Context, s *store.MemoryStore, readTx store.ReadTx, initHandler InitHandler, startSupervisor restart.SupervisorInterface) error {
Function validateHasAtLeastOneExternalCA
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func validateHasAtLeastOneExternalCA(ctx context.Context, externalCAs map[string][]*api.ExternalCA, securityConfig *ca.SecurityConfig,
wantedCert []byte, desc string) ([]*api.ExternalCA, error) {
Function watchTask
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func watchTask(t *testing.T, s *store.MemoryStore, watch chan events.Event, expectTimeout bool, fn func(t assert.TestingT, s *store.MemoryStore, n *api.Task) bool) {
Method nodeSet.tree
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (ns *nodeSet) tree(serviceID string, preferences []*api.PlacementPreference, maxAssignments int, meetsConstraints func(*NodeInfo) bool, nodeLess func(*NodeInfo, *NodeInfo) bool) decisionTree {
Function NewServer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func NewServer(store *store.MemoryStore, raft *raft.Node, securityConfig *ca.SecurityConfig, nv networkallocator.DriverValidator, dr *drivers.DriverProvider) *Server {
Function NewJoinNode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func NewJoinNode(t *testing.T, clockSource *fakeclock.FakeClock, join string, tc *cautils.TestCA, opts ...raft.NodeOptions) *TestNode {
Function CheckValuesOnNodes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func CheckValuesOnNodes(t *testing.T, clockSource *fakeclock.FakeClock, checkNodes map[uint64]*TestNode, ids []string, values []*api.Node) {
Function CopyNode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func CopyNode(t *testing.T, clockSource *fakeclock.FakeClock, oldNode *TestNode, forceNewCluster bool, kr *SimpleKeyRotator) (*TestNode, context.Context) {