VIAplanner/via-timetable

View on GitHub

Showing 102 of 200 total issues

Avoid deeply nested control flow statements.
Open

          for (const tutorial of course.tutorial) {
            if (tutorial.sectionCode === section.slice(section.length - 5)) {
              course.tutorial = [tutorial];
            }
          }
Severity: Major
Found in src/timetable-planner/index.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                  if (tutResult) {
                    winterLectureCombo.founded = 1;
                    // founds a valid timetable
                    return true;
                  } else {
    Severity: Major
    Found in src/timetable-planner/index.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                for (const lecture of course.lecture) {
                  if (lecture.sectionCode === section.slice(section.length - 5)) {
                    course.lecture = [lecture];
                  }
                }
      Severity: Major
      Found in src/timetable-planner/index2.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                  for (const practical of course.practical) {
                    if (practical.sectionCode === section.slice(section.length - 5)) {
                      course.practical = [practical];
                    }
                  }
        Severity: Major
        Found in src/timetable-planner/index.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                        if (fallLectureCombo.founded === 1) {
                          return true;
                        }
          Severity: Major
          Found in src/timetable-planner/index.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                          if (
                            section.comboCode.charAt(section.comboCode.length - 6) === 'Y'
                          ) {
                            yearLocked.push(section.comboCode);
                          }
            Severity: Major
            Found in src/timetable-planner/index.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                        for (const practical of course.practical) {
                          if (practical.sectionCode === section.slice(section.length - 5)) {
                            course.practical = [practical];
                          }
                        }
              Severity: Major
              Found in src/timetable-planner/index2.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if (winterLectureCombo.founded === 1) {
                                      return true;
                                    }
                Severity: Major
                Found in src/timetable-planner/index.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if (winterPracticalCombo.founded === 1) {
                                        return true;
                                      }
                  Severity: Major
                  Found in src/timetable-planner/index.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                  if (tutResult) {
                                    fallLectureCombo.founded = 1;
                                    // founds a valid timetable
                                    return true;
                                  } else {
                    Severity: Major
                    Found in src/timetable-planner/index.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                              if (section[section.length - 3] === 'L') {
                                for (const lecture of course.lecture) {
                                  if (lecture.sectionCode === section.slice(section.length - 3)) {
                                    course.lecture = [lecture];
                                  }
                      Severity: Major
                      Found in src/timetable-planner/index2.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                      for (const section of tempList) {
                                        if (
                                          section.comboCode.charAt(section.comboCode.length - 6) === 'Y'
                                        ) {
                                          yearLocked.push(section.comboCode);
                        Severity: Major
                        Found in src/timetable-planner/index.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                        if (dayEvents[i].code === payload.code) {
                                          dayEvents.splice(i, 1);
                                          break;
                                        }
                          Severity: Major
                          Found in src/store/index.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                    if (section[section.length - 3] === 'L') {
                                      for (const lecture of course.lecture) {
                                        if (lecture.sectionCode === section.slice(section.length - 3)) {
                                          course.lecture = [lecture];
                                        }
                            Severity: Major
                            Found in src/timetable-planner/index.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                            if (winterLectureCombo.founded === 1) {
                                              return true;
                                            }
                              Severity: Major
                              Found in src/timetable-planner/index.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    if (overlapExists(winterTimetable)) {
                                                      winterTimetable = createShallowCopyOfTimetable(
                                                        prevTimetabletut,
                                                      );
                                                      let j = -1;
                                Severity: Major
                                Found in src/timetable-planner/index.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                if (winterPracticalCombo.founded === 1) {
                                                  return true;
                                                }
                                  Severity: Major
                                  Found in src/timetable-planner/index.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                  if (
                                                    JSON.stringify(winterTimetable) ===
                                                      JSON.stringify({
                                                        MONDAY: [],
                                                        TUESDAY: [],
                                    Severity: Major
                                    Found in src/timetable-planner/index.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                          if (fallPracticalCombo.founded === 1) {
                                                            return true;
                                                          }
                                      Severity: Major
                                      Found in src/timetable-planner/index.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                            if (fallPracticalCombo.founded === 1) {
                                                              return true;
                                                            }
                                        Severity: Major
                                        Found in src/timetable-planner/index.js - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language