Showing 102 of 200 total issues
Function createTimetable
has 1230 lines of code (exceeds 25 allowed). Consider refactoring. Open
const createTimetable = (fallCourseSection, winterCourseSection, state) => {
let fallTimetable = {
MONDAY: [],
TUESDAY: [],
WEDNESDAY: [],
File index.js
has 1445 lines of code (exceeds 250 allowed). Consider refactoring. Open
const sortCourseSection = require('./combinations/combinations');
/**
* Search for the first index of course that has type section
* @param {*} courseSection
File combinations.spec.js
has 959 lines of code (exceeds 250 allowed). Consider refactoring. Open
import test from 'ava';
import {
courseMeetingSectionCombinations,
courseCombinations,
} from './combinations';
Function fallLectureCombo
has 426 lines of code (exceeds 25 allowed). Consider refactoring. Open
const fallLectureCombo = (courseSection, whichArray, output = []) => {
fallLectureCombo.founded = 0;
const lec2 = searchForSectionIndexAfterprevIndex(
courseSection,
'lecture',
File index.js
has 813 lines of code (exceeds 250 allowed). Consider refactoring. Open
import Vue from 'vue';
import Vuex from 'vuex';
import genColor from 'color-generator';
import { generateTimetables } from '../timetable-planner/index2';
// import colorDiff from "color-difference"
Function winterLectureCombo
has 277 lines of code (exceeds 25 allowed). Consider refactoring. Open
const winterLectureCombo = (courseSection, whichArray, output = []) => {
winterLectureCombo.founded = 0;
const lec2 = searchForSectionIndexAfterprevIndex(
courseSection,
'lecture',
Function lockSectionOfCourse
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
const lockSectionOfCourse = (courseSections, lockSections) => {
for (const course of courseSections) {
for (const section of lockSections) {
// const lockedSection = section.slice()
if (course.code === section.slice(0, section.length - 5)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function lockSectionOfCourse
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
const lockSectionOfCourse = (courseSections, lockSections) => {
for (const course of courseSections) {
for (const section of lockSections) {
if (course.code === section.slice(0, section.length - 5)) {
if (section[section.length - 5] === 'L') {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function deleteCourse
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
deleteCourse(context, payload) {
// resets search bar value if the deleted course is the last searched course
if (
context.state.searchBarValue !== null &&
context.state.searchBarValue.includes(payload.code)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function practicalCombo
has 206 lines of code (exceeds 25 allowed). Consider refactoring. Open
const practicalCombo = (
// eslint-disable-next-line no-shadow
courseSection,
whichArray2 = pra,
output2 = [],
Function fallPracticalCombo
has 202 lines of code (exceeds 25 allowed). Consider refactoring. Open
const fallPracticalCombo = (courseSection, whichArray2, output2 = []) => {
fallPracticalCombo.founded = 0;
const pra2 = searchForSectionIndexAfterprevIndex(
courseSection,
'practical',
File timetable.spec.js
has 398 lines of code (exceeds 250 allowed). Consider refactoring. Open
import test from 'ava';
import { generateTimetables, createTimetable } from './index';
const ONE_COURSE_L1_P2 = [
{
Function winterPracticalCombo
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
const winterPracticalCombo = (courseSection, whichArray2, output2 = []) => {
winterPracticalCombo.founded = 0;
const pra2 = searchForSectionIndexAfterprevIndex(
courseSection,
'practical',
Function practicalCombo
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
const practicalCombo = (
// eslint-disable-next-line no-shadow
courseSection,
whichArray2 = pra,
output2 = [],
Function createTimetable
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
const createTimetable = (fallCourseSection, winterCourseSection, state) => {
let fallTimetable = {
MONDAY: [],
TUESDAY: [],
WEDNESDAY: [],
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
`` has 31 functions (exceeds 20 allowed). Consider refactoring. Open
getters: {
getSerializedState: state => state.history[state.history.length - 1 + state.historyIndex],
getExportOverlay: state => state.exportOverlay,
getNoTimetablePopup: state => state.noTimetablePopup,
getShareLinkPopup: state => state.shareLinkPopup,
Function tutorialCombo
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
const tutorialCombo = (
// eslint-disable-next-line no-shadow
courseSection,
// eslint-disable-next-line no-shadow
whichArray2 = tut,
Function tutorialCombo
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
const tutorialCombo = (
// eslint-disable-next-line no-shadow
courseSection,
whichArray2 = tut,
output2 = [],
Function tutorialCombo
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
const tutorialCombo = (
// eslint-disable-next-line no-shadow
courseSection,
// eslint-disable-next-line no-shadow
whichArray2 = tut,
Function generateTimetables
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
const generateTimetables = (
fallCourses,
fallLockSections,
winterCourses,
winterLockSections,