Showing 440 of 677 total issues
Function ofClusterModel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func ofClusterModel(application *appmodels.Application, cluster *models.Cluster, fullPath, namespace string, pipelineJSONBlob, applicationJSONBlob map[string]interface{}, tags ...*tagmodels.Tag) *GetClusterResponse {
Method controller.customizeTemplateInfo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (c *controller) customizeTemplateInfo(ctx context.Context, r *CreateClusterRequest, application *models.Application, environment string, mergePatch bool) error {
Method helper.AcceptMR
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (h *helper) AcceptMR(ctx context.Context, pid interface{}, mrID int, mergeCommitMsg *string, shouldRemoveSourceBranch *bool) (mr *gitlab.MergeRequest, err error) {
Method controller.checkAllowDeploy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (c *controller) checkAllowDeploy(ctx context.Context, application *amodels.Application, cluster *cmodels.Cluster, clusterFiles *gitrepo.ClusterFiles, configCommit *gitrepo.ClusterCommit) error {
Method dao.UpdateByName
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (d *dao) UpdateByName(ctx context.Context, resourceType string, resourceID uint, name string, badge *models.Badge) (*models.Badge, error) {
Method controller.updatePipelineRunStatus
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (c *controller) updatePipelineRunStatus(ctx context.Context, action string, prID uint, pState prmodels.PipelineStatus, revision string) error {
Method controller.UpdateBadgeByName
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (c *controller) UpdateBadgeByName(ctx context.Context, resourceType string, resourceID uint, name string, badge *Update) (*Badge, error) {
Method controller.executeDeploy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (c *controller) executeDeploy(ctx context.Context, application *appmodels.Application, cluster *clustermodels.Cluster, pr *prmodels.Pipelinerun, currentUser user.User) error {
Function handleGetSchema
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func handleGetSchema(c *gin.Context, mgr *managerparam.Manager, r *gin.Engine, authRecord auth.AttributesRecord, requestInfo *auth.RequestInfo) {
Function startProcess
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func startProcess(k8sClient kubernetes.Interface, cfg *rest.Config, ref ContainerRef, cmd []string, ptyHandler PtyHandler) error {
Function handleCluster
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func handleCluster(c *gin.Context, mgr *managerparam.Manager, r *gin.Engine, authRecord auth.AttributesRecord, requestInfo *auth.RequestInfo) {
Method CreateClusterParamsV2.toClusterModel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (r *CreateClusterParamsV2) toClusterModel(application *appmodels.Application, er *envregionmodels.EnvironmentRegion, info *BuildTemplateInfo, template *templatemodels.Template, expireSeconds uint) (*models.Cluster, []*tagmodels.Tag) {
Function ofApplicationModel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func ofApplicationModel(app *models.Application, fullPath string, trs []*trmodels.TemplateRelease, pipelineJSONBlob, applicationJSONBlob map[string]interface{}, tags ...*tagmodels.Tag) *GetApplicationResponse {
Function handleApplication
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func handleApplication(c *gin.Context, mgr *managerparam.Manager, r *gin.Engine, authRecord auth.AttributesRecord, requestInfo *auth.RequestInfo) {
Function handleTemplate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func handleTemplate(c *gin.Context, mgr *managerparam.Manager, r *gin.Engine, authRecord auth.AttributesRecord, requestInfo *auth.RequestInfo) {
Method manager.GetDefaultRegions
has 5 return statements (exceeds 4 allowed). Open
Open
func (m manager) GetDefaultRegions(ctx context.Context, id uint) ([]*envregionmodels.EnvironmentRegion, error) { selectableRegions, err := m.GetSelectableRegions(ctx, id) if err != nil { return nil, err }
Method service.CreateAccessToken
has 5 return statements (exceeds 4 allowed). Open
Open
func (s *service) CreateAccessToken(ctx context.Context, name, expiresAtStr string, userID uint, scopes []string) (*tokenmodels.Token, error) { // 1. check expiration date createdAt := time.Now() expiresIn := time.Duration(0)
Method clusterGitopsRepo.GetRestartTime
has 5 return statements (exceeds 4 allowed). Open
Open
func (g *clusterGitopsRepo) GetRestartTime(ctx context.Context, application, cluster string, template string) (string, error) { ret := make(map[string]map[string]string) pid := fmt.Sprintf("%v/%v/%v", g.clustersGroup.FullPath, application, cluster) content, err := g.gitlabLib.GetFile(ctx, pid, g.defaultBranch, common.GitopsFileRestart)
Method dao.DeleteByID
has 5 return statements (exceeds 4 allowed). Open
Open
func (d *dao) DeleteByID(ctx context.Context, id uint) error { currentUser, err := corecommon.UserFromContext(ctx) if err != nil { return err }
Method manager.GetSelectableRegions
has 5 return statements (exceeds 4 allowed). Open
Open
func (m manager) GetSelectableRegions(ctx context.Context, id uint) (regionmodels.RegionParts, error) { // get regionSelector field from group group, err := m.groupDAO.GetByID(ctx, id) if err != nil { return nil, err