Coursemology/coursemology2

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

Summary

Maintainability
A
2 hrs
Test Coverage

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

export default function (state = initialState, action) {
  const { type } = action;
  switch (type) {
    case actionTypes.CREATE_RESPONSE_REQUEST:
    case actionTypes.LOAD_RESPONSE_EDIT_REQUEST:
Severity: Minor
Found in client/app/bundles/course/survey/reducers/responseForm.js - About 1 hr to fix

Avoid too many return statements within this function.
Open

      return {
        ...state,
        response: action.response,
        flags: { ...state.flags, ...action.flags },
      };
Severity: Major
Found in client/app/bundles/course/survey/reducers/responseForm.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

      return { ...state, flags: { ...state.flags, isSubmitting: false } };
Severity: Major
Found in client/app/bundles/course/survey/reducers/responseForm.js - About 30 mins to fix

There are no issues that match your filters.

Category
Status