18F/e-QIP-prototype

View on GitHub
src/components/Section/Citizenship/Status/Status.jsx

Summary

Maintainability
F
4 days
Test Coverage

Function render has 912 lines of code (exceeds 255 allowed). Consider refactoring.
Open

  render() {
    const {
      CitizenshipStatus,
      AbroadDocumentation,
      Explanation,
Severity: Major
Found in src/components/Section/Citizenship/Status/Status.jsx - About 3 days to fix

    File Status.jsx has 1056 lines of code (exceeds 750 allowed). Consider refactoring.
    Open

    import React from 'react'
    import { i18n } from 'config'
    import { alphaNumericRegEx, validGenericTextfield } from 'validators/helpers'
    import { isDocumentRequired, isCertificateRequired } from 'validators/citizenship'
    import {
    Severity: Major
    Found in src/components/Section/Citizenship/Status/Status.jsx - About 1 day to fix

      Function render has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

        render() {
          const {
            CitizenshipStatus,
            AbroadDocumentation,
            Explanation,
      Severity: Minor
      Found in src/components/Section/Citizenship/Status/Status.jsx - About 45 mins to fix

      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

      There are no issues that match your filters.

      Category
      Status