SUSE/stratos

View on GitHub

Showing 1,395 of 1,395 total issues

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 SetStructFieldValue has 54 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func SetStructFieldValue(value reflect.Value, field reflect.Value, val string) error {
    
        var newVal interface{}
        var err error
        typ := field.Type()
    Severity: Minor
    Found in src/jetstream/repository/interfaces/config/config.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 validateEntityRelations has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function validateEntityRelations(config: ValidateEntityRelationsConfig): ValidationResult {
          const pAction = isPaginatedAction(config.action);
        
          if (!!pAction && pAction.__forcedPageEntityConfig__) {
            const entityConfig = pAction.__forcedPageEntityConfig__;

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

            private setupList(appService: ApplicationService) {
              this.text = {
                title: 'Available Routes',
                noEntries: 'There are no routes'
              };

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

              validate(c: AbstractControl): Observable<GithubProjectExistsResponse> {
                if (c.value) {
                  if (!this.isValidProjectName(c.value) || this.haveAlreadyChecked(c.value)) {
                    return observableOf({
                      githubProjectDoesNotExist: true,

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

                private static getCheckedState(
                  role: string,
                  users: CfUser[],
                  existingRoles: CfUserRolesSelected,
                  newRoles: IUserPermissionInOrg,

                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 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 successEntityHandler has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function successEntityHandler(
                      actionDispatcher: (actionToDispatch: Action) => void,
                      catalogEntity: StratosBaseCatalogEntity,
                      requestType: ApiRequestTypes,
                      action: EntityRequestAction,

                      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 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 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 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

                              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 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 generateCFUserProvidedServiceInstanceEntity has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function generateCFUserProvidedServiceInstanceEntity(endpointDefinition: StratosEndpointExtensionDefinition) {
                                          const definition: IStratosEntityDefinition = {
                                            type: userProvidedServiceInstanceEntityType,
                                            schema: cfEntityFactory(userProvidedServiceInstanceEntityType),
                                            label: 'User Provided Service Instance',
                                        Severity: Minor
                                        Found in src/frontend/packages/cloud-foundry/src/cf-entity-generator.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language