18F/e-QIP-prototype

View on GitHub

Showing 502 of 502 total issues

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

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

      render() {
        const {
          requireRelationshipRelativesForeignBornDoc,
          requireRelationshipRelativesUSResidenceDoc,
          requireRelationshipRelativesForeignGovtAffExplanation,
    Severity: Major
    Found in src/components/Section/Relationships/Relatives/Relative.jsx - About 2 days to fix

      Function sectionData has 573 lines of code (exceeds 255 allowed). Consider refactoring.
      Open

      const sectionData = (section, subsection, application = {}) => {
        if (!section || !subsection || !application) {
          return []
        }
      
      
      Severity: Major
      Found in src/components/Section/sectionData.js - About 1 day to fix

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

          render() {
            const foreignContactMinDate = pickDate([this.props.applicantBirthdate, this.props.Birthdate])
            return (
              <div className="foreign-national">
                <Field
        Severity: Major
        Found in src/components/Section/Foreign/Contacts/ForeignNational.jsx - About 1 day to fix

          transform has 111 functions (exceeds 50 allowed). Consider refactoring.
          Open

          const transform = {
            benefit: data => form.benefit(data),
            branch: data => form.branch(data),
            checkbox: data => form.checkbox(data),
            checkboxgroup: data => form.checkboxgroup(data),
          Severity: Major
          Found in src/schema/schema.js - About 1 day 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

              File Relative.jsx has 1055 lines of code (exceeds 750 allowed). Consider refactoring.
              Open

              /* eslint jsx-a11y/label-has-associated-control: 0 */
              /* eslint jsx-a11y/label-has-for: 0 */
              
              import React from 'react'
              import { i18n } from 'config'
              Severity: Major
              Found in src/components/Section/Relationships/Relatives/Relative.jsx - About 1 day to fix

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                              <Field
                                title={i18n.t('reference.heading.email')}
                                titleSize="h4"
                                help="reference.help.email"
                                adjustFor="label"
                Severity: Major
                Found in src/components/Section/History/Education/EducationItem.jsx and 1 other location - About 1 day to fix
                src/components/Section/History/Residence/ResidenceItem.jsx on lines 495..519

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 212.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                              <Field
                                title={i18n.t('reference.heading.email')}
                                titleSize="h4"
                                help="reference.help.email"
                                adjustFor="label"
                Severity: Major
                Found in src/components/Section/History/Residence/ResidenceItem.jsx and 1 other location - About 1 day to fix
                src/components/Section/History/Education/EducationItem.jsx on lines 326..350

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 212.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                File xml.go has 988 lines of code (exceeds 750 allowed). Consider refactoring.
                Open

                package xml
                
                import (
                    "bytes"
                    "encoding/json"
                Severity: Major
                Found in api/xml/xml.go - About 7 hrs to fix

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                    {
                      ...formSections.LEGAL,
                      subsections: [
                        formSections.LEGAL_INTRO,
                        {
                  Severity: Major
                  Found in src/config/formTypes.js and 1 other location - About 7 hrs to fix
                  src/config/formTypes.js on lines 225..269

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 175.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                    {
                      ...formSections.LEGAL,
                      subsections: [
                        formSections.LEGAL_INTRO,
                        {
                  Severity: Major
                  Found in src/config/formTypes.js and 1 other location - About 7 hrs to fix
                  src/config/formTypes.js on lines 411..455

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 175.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

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

                    render() {
                      /**
                       * `this.props.BirthPlace` can end up in a number of different states,
                       * depending on the choices a user makes in this section _and_ on
                       * the initial state of the app.

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                      storeErrors(errors) {
                        const newErrors = [...errors]
                    
                        for (let i = 0; i < newErrors.length; i += 1) {
                          const e = newErrors[i]
                    Severity: Major
                    Found in src/components/Form/Location/ToggleableLocation.jsx and 1 other location - About 6 hrs to fix
                    src/components/Form/Location/Address.jsx on lines 233..245

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 166.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                      storeErrors(errors) {
                        const newErrors = [...errors]
                    
                        for (let i = 0; i < newErrors.length; i += 1) {
                          const e = newErrors[i]
                    Severity: Major
                    Found in src/components/Form/Location/Address.jsx and 1 other location - About 6 hrs to fix
                    src/components/Form/Location/ToggleableLocation.jsx on lines 362..374

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 166.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    File zipcodes.js has 913 lines of code (exceeds 750 allowed). Consider refactoring.
                    Open

                    export const zipcodes = {
                      AA: ['340'],
                      AE: ['090', '091', '092', '093', '094', '095', '096', '097', '098', '099'],
                      AP: ['962', '963', '964', '965', '966'],
                      AK: ['995', '996', '997', '998', '999'],
                    Severity: Major
                    Found in src/config/zipcodes.js - About 5 hrs to fix

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

                        render() {
                          // Certain elements are present if the date range of the residency was
                          // within the last 3 years.
                          const dates = this.props.Dates || {}
                          const from = extractDate(dates.from)
                      Severity: Major
                      Found in src/components/Section/History/Residence/ResidenceItem.jsx - About 5 hrs to fix

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                                <Field
                                  title={i18n.t('legal.police.heading.date')}
                                  help="legal.police.help.date"
                                  adjustFor="labels"
                                  shrink={true}
                        Severity: Major
                        Found in src/components/Section/Legal/Police/OtherOffense.jsx and 1 other location - About 5 hrs to fix
                        src/components/Section/Legal/Police/Offense.jsx on lines 182..198

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 136.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                                <Field
                                  title={i18n.t('legal.police.heading.date')}
                                  help="legal.police.help.date"
                                  adjustFor="labels"
                                  shrink={true}
                        Severity: Major
                        Found in src/components/Section/Legal/Police/Offense.jsx and 1 other location - About 5 hrs to fix
                        src/components/Section/Legal/Police/OtherOffense.jsx on lines 139..155

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 136.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

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

                          render() {
                            return (
                              <div className="military-service">
                                <Field
                                  title={i18n.t('military.history.heading.service')}
                        Severity: Major
                        Found in src/components/Section/Military/History/MilitaryService.jsx - About 4 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language