VIAplanner/via-timetable

View on GitHub

Showing 200 of 200 total issues

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 (overlapExists(winterTimetable)) {
                          winterTimetable = createShallowCopyOfTimetable(
                            prevTimetable,
                          );
                          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 (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

                  for (const lecture of course.lecture) {
                    if (lecture.sectionCode === section.slice(section.length - 5)) {
                      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 (tut2 !== -1) {
                              return courseSection[whichArray2].tutorial.some(
                                arrayElement2 => {
                                  // Recursive case...
                                  if (fallLectureCombo.founded === 1) {
            Severity: Major
            Found in src/timetable-planner/index.js - About 45 mins to fix

              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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language