cloudfoundry-incubator/stratos

View on GitHub

Showing 650 of 1,370 total issues

Function getFolderSource has 12 return statements (exceeds 4 allowed).
Open

func getFolderSource(clientWebSocket *websocket.Conn, tempDir string, msg SocketMessage) (StratosProject, string, error) {
    // The msg data is JSON for the Folder info
    info := FolderSourceInfo{
        WaitAfterUpload: false,
    }
Severity: Major
Found in src/jetstream/plugins/cfapppush/deploy.go - About 1 hr to fix

    Method Analyzer.doRun has 12 return statements (exceeds 4 allowed).
    Open

    func (a *Analyzer) doRun(ec echo.Context) error {
    
        log.Debug("Run analyzer!")
    
        engine := ec.Param("analyzer")
    Severity: Major
    Found in src/jetstream/plugins/analysis/container/run.go - About 1 hr to fix

      Function setUpTestOrgSpaceUserRoles has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function setUpTestOrgSpaceUserRoles(
        cfGuid: string,
        defaultCf: E2EConfigCloudFoundry,
        orgName: string,
        spaceName: string,
      Severity: Minor
      Found in src/test-e2e/cloud-foundry/users-list-e2e.helper.ts - About 1 hr to fix

        Function ngOnInit has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          ngOnInit() {
            this.connectionStatusSubject.next(0);
            if (!this.applicationService.cfGuid || !this.applicationService.appGuid) {
              this.messages = NEVER;
            } else {

          Function customSassImport has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            private customSassImport(config: StratosConfig) {
              const that = this;
              return (url, resourcePath) => {
                if (url === '~@stratosui/theme/extensions') {
                  // Generate SCSS to appy theming to the packages that need to be themed
          Severity: Minor
          Found in src/frontend/packages/devkit/src/build/sass.ts - About 1 hr to fix

            Function constructor has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              constructor(
                store: Store<GeneralEntityAppState>,
                public entityMonitor: EntityMonitor<T>,
                actionOrConfig: EntityRequestAction | EntityActionBuilderEntityConfig,
              ) {
            Severity: Minor
            Found in src/frontend/packages/store/src/entity-service.ts - About 1 hr to fix

              Function checkPageLoad has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                checkPageLoad() {
                  let hasLoaded = false;
                  const errMsg = this.getStratosError();
                  if (!!errMsg) {
                    hasLoaded = true;

                Function init has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  private init() {
                    // Observabled for loading schema and values for the Chart
                    const schema$ = this.httpClient.get(this.schemaUrl).pipe(catchError(e => of(null)));
                    const values$: Observable<string> = this.httpClient.get(this.valuesUrl, { responseType: 'text' }).pipe(
                      catchError(e => of(null))

                  Function AddUnsigned has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    private static AddUnsigned( lX: number, lY: number ) : number
                    {
                        let lX4: number,
                            lY4: number,
                            lX8: number,
                  Severity: Minor
                  Found in src/frontend/packages/core/src/shared/components/user-avatar/md5.ts - About 1 hr to fix

                    Function getEndpointConfig has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      static getEndpointConfig(
                        store: Store<AppState>,
                        action: GetAllEndpoints,
                        listConfig: IListConfig<EndpointModel>,
                        rowsState: Observable<RowsState>,

                      Method cnsiTokenBackup.createBackup has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func (ctb *cnsiTokenBackup) createBackup(data *BackupRequest) (*BackupContent, error) {
                          log.Debug("createBackup")
                          allEndpoints, err := ctb.p.ListEndpoints()
                          if err != nil {
                              return nil, interfaces.NewHTTPShadowError(http.StatusBadGateway, "Failed to fetch endpoints", "Failed to fetch endpoints: %+v", err)
                      Severity: Minor
                      Found in src/jetstream/plugins/backup/backup_restore.go - About 1 hr to fix

                        Method portalProxy.verifySession has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func (p *portalProxy) verifySession(c echo.Context) error {
                            log.Debug("verifySession")
                        
                            p.StratosAuthService.BeforeVerifySession(c)
                        
                        
                        Severity: Minor
                        Found in src/jetstream/session.go - About 1 hr to fix

                          Function dispatchRoleRequests has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function dispatchRoleRequests(
                            endpoints: EntityUserRolesEndpoint[],
                            store: Store<AppState>,
                            httpClient: HttpClient
                          ): CfsRequestState {

                            Function constructor has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              constructor(
                                store: Store<CFAppState>,
                                userPerms: CurrentUserPermissionsService,
                                activeRouteCfOrgSpace: ActiveRouteCfOrgSpace
                              ) {

                              Function handleSpaceRoleChange has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function handleSpaceRoleChange(
                                state: IAllCfRolesState,
                                endpointGuid: string,
                                cf: ICfRolesState,
                                orgGuid: string,

                                Function getBreadcrumbs has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  protected getBreadcrumbs(
                                    endpoint: EndpointModel,
                                    org: APIResource<IOrganization>,
                                    space: APIResource<ISpace>
                                  ) {

                                  Function generateEventEntity has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function generateEventEntity(endpointDefinition: StratosEndpointExtensionDefinition) {
                                    const definition: IStratosEntityDefinition = {
                                      type: cfEventEntityType,
                                      schema: cfEntityFactory(cfEventEntityType),
                                      label: 'Event',
                                  Severity: Minor
                                  Found in src/frontend/packages/cloud-foundry/src/cf-entity-generator.ts - About 1 hr to fix

                                    Function generateRouteEntity has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function generateRouteEntity(endpointDefinition: StratosEndpointExtensionDefinition) {
                                      const definition: IStratosEntityDefinition = {
                                        type: routeEntityType,
                                        schema: cfEntityFactory(routeEntityType),
                                        label: 'Application Route',
                                    Severity: Minor
                                    Found in src/frontend/packages/cloud-foundry/src/cf-entity-generator.ts - About 1 hr to fix

                                      Function constructor has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        constructor(private servicesService: ServicesService, private store: Store<CFAppState>) {
                                          this.hasVisiblePlans$ = this.servicesService.servicePlans$.pipe(
                                            map(p => p.length > 0));
                                          this.canCreateServiceInstance = CfCurrentUserPermissions.SERVICE_INSTANCE_CREATE;
                                          this.toolTipText$ = this.hasVisiblePlans$.pipe(

                                        Function ngOnInit has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          ngOnInit() {
                                            if (this.placeholderMode) {
                                              this.canRefresh = false;
                                              this.hasEntities$ = of(false);
                                              return;
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language