Cloud-CV/EvalAI

View on GitHub
frontend_v2/src/app/services/challenge.service.ts

Summary

Maintainability
C
7 hrs
Test Coverage

File challenge.service.ts has 276 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { NGXLogger } from 'ngx-logger';
import { Router } from '@angular/router';

Severity: Minor
Found in frontend_v2/src/app/services/challenge.service.ts - About 2 hrs to fix

    ChallengeService has 21 functions (exceeds 20 allowed). Consider refactoring.
    Open

    @Injectable()
    export class ChallengeService {
      private defaultChallenge: any = { creator: {} };
      private defaultStars: any = { count: 0, is_starred: false };
      private defaultPublishChallenge: any = {
    Severity: Minor
    Found in frontend_v2/src/app/services/challenge.service.ts - About 2 hrs to fix

      Function fetchChallenge has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        fetchChallenge(id) {
          const API_PATH = this.endpointsService.challengeDetailsURL(id);
          const SELF = this;
          this.changeCurrentPhases([]);
          this.changeCurrentPhaseSplit([]);
      Severity: Minor
      Found in frontend_v2/src/app/services/challenge.service.ts - About 1 hr to fix

        Function fetchParticipantTeams has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          private fetchParticipantTeams(id) {
            const API_PATH = this.endpointsService.challengeParticipantTeamsURL(id);
            const SELF = this;
            this.apiService.getUrl(API_PATH).subscribe(
              (data) => {
        Severity: Minor
        Found in frontend_v2/src/app/services/challenge.service.ts - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status