Coursemology/coursemology2

View on GitHub
client/app/bundles/course/survey/reducers/surveys.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function default has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function (state = [], action) {
  switch (action.type) {
    case actionTypes.CREATE_SURVEY_SUCCESS: {
      return sortSurveysByDate([...state, sortSurveyElements(action.survey)]);
    }
Severity: Minor
Found in client/app/bundles/course/survey/reducers/surveys.js - About 1 hr to fix

Avoid too many return statements within this function.
Open

      return state.map((survey) => surveyReducer(survey, action));
Severity: Major
Found in client/app/bundles/course/survey/reducers/surveys.js - About 30 mins to fix

There are no issues that match your filters.

Category
Status