Showing 440 of 677 total issues
Method API.BuildDeploy
has 6 return statements (exceeds 4 allowed). Open
Open
func (a *API) BuildDeploy(c *gin.Context) { op := "cluster: build deploy" var request *cluster.BuildDeployRequest if err := c.ShouldBindJSON(&request); err != nil { response.AbortWithRequestError(c, common.InvalidRequestBody,
Method controller.GetApplication
has 6 return statements (exceeds 4 allowed). Open
Open
func (c *controller) GetApplication(ctx context.Context, id uint) (_ *GetApplicationResponse, err error) { const op = "application controller: get application" defer wlog.Start(ctx, op).StopPrint() // 1. get application in db
Method controller.UpdateByID
has 6 return statements (exceeds 4 allowed). Open
Open
func (c *controller) UpdateByID(ctx context.Context, id uint, u *UpdateUserRequest) (*User, error) { currentUser, err := common.UserFromContext(ctx) if err != nil { return nil, err
Method API.LoginCallback
has 6 return statements (exceeds 4 allowed). Open
Open
func (a *API) LoginCallback(c *gin.Context) { code := c.Query(_oidcCode) state := c.Query(_oidcState) redirect := c.Query(_redirectURL) if code == "" || state == "" {
Method API.Create
has 6 return statements (exceeds 4 allowed). Open
Open
func (a *API) Create(c *gin.Context) { const op = "application: create" groupIDStr := c.Param(common.ParamGroupID) groupID, err := strconv.ParseUint(groupIDStr, 10, 0) if err != nil {
Function getScope
has 6 return statements (exceeds 4 allowed). Open
Open
func getScope(c *gin.Context, mgr *managerparam.Manager, resourceType, resourceName string) (string, error) { var ( resourceID uint cluster *clustermodels.Cluster
Method API.List
has 6 return statements (exceeds 4 allowed). Open
Open
func (a *API) List(c *gin.Context) { const op = "application: list application" keywords := make(map[string]interface{})
Method service.CreateEventIgnoreError
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (s *service) CreateEventIgnoreError(ctx context.Context, resourceType string, resourceID uint, eventType string, extra *string) []*models.Event {
Function Run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func Run(ctx context.Context, jobConfig *autofree.Config, userMgr usermanager.Manager, clusterCtr clusterctl.Controller, prCtr prctl.Controller) {
Method dao.List
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (d *dao) List(ctx context.Context, query *q.Query, userID uint, withRegion bool, appIDs ...uint) (int, []*models.ClusterWithRegion, error) {
Function NewCD
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func NewCD(informerFactories *regioninformers.RegionInformers, clusterGitRepo gitrepo.ClusterGitRepo, argoCDMapper argocdconf.Mapper, regionArgoCDMapper argocdconf.RegionMapper, targetRevision string) CD {
Method manager.CreateLink
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (m *manager) CreateLink(ctx context.Context, uid uint, idpID uint, claims *utils.Claims, deletable bool) (*models.UserLink, error) {
Method helper.WriteFiles
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (h *helper) WriteFiles(ctx context.Context, pid interface{}, branch, commitMsg string, startBranch *string, actions []CommitAction) (_ *gitlab.Commit, err error) {
Function isClusterActuallyHealthy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func isClusterActuallyHealthy(ctx context.Context, clusterState *cd.ClusterState, image string, restartTime time.Time, replicas int) bool {
Method manager.UpdateByName
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (m *manager) UpdateByName(ctx context.Context, resourceType string, resourceID uint, name string, badge *models.Badge) (*models.Badge, error) {
Method manager.Get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (m *manager) Get(ctx context.Context, resourceType models.ResourceType, resourceID uint, memberType models.MemberType, memberInfo uint) (*models.Member, error) {
Method controller.CreateCluster
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (c *controller) CreateCluster(ctx context.Context, applicationID uint, environment, region string, r *CreateClusterRequest, mergePatch bool) (_ *GetClusterResponse, err error) {
Method service.getMember
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (s *service) getMember(ctx context.Context, resourceType string, resourceID uint, memberType models.MemberType, memberInfo uint) (*models.Member, error) {
Method dao.Get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (d *dao) Get(ctx context.Context, resourceType models.ResourceType, resourceID uint, memberType models.MemberType, memberInfo uint) (*models.Member, error) {
Method helper.GetCreatedGroup
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (h *helper) GetCreatedGroup(ctx context.Context, parentID int, parentFullPath string, name string, visibility string) (*gitlab.Group, error) {