Showing 132 of 502 total issues
Function render
has 912 lines of code (exceeds 255 allowed). Consider refactoring. Open
render() {
const {
CitizenshipStatus,
AbroadDocumentation,
Explanation,
Function render
has 731 lines of code (exceeds 255 allowed). Consider refactoring. Open
render() {
const {
requireRelationshipRelativesForeignBornDoc,
requireRelationshipRelativesUSResidenceDoc,
requireRelationshipRelativesForeignGovtAffExplanation,
Function sectionData
has 573 lines of code (exceeds 255 allowed). Consider refactoring. Open
const sectionData = (section, subsection, application = {}) => {
if (!section || !subsection || !application) {
return []
}
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
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),
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 {
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'
File xml.go
has 988 lines of code (exceeds 750 allowed). Consider refactoring. Open
package xml
import (
"bytes"
"encoding/json"
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.
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'],
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)
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')}
Function accordionValidator
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
const accordionValidator = (value, options, key, attributes, globalOptions) => {
if (validate.isEmpty(value)) return null // Don't validate if there is no value
const {
validator, length, ignoreBranch, itemsValidator,
- 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 Review
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
const Review = (props) => {
const {
applicantBirthdate, Education, Residence, Employment, formType, requireHistoryFederalSection,
forPrint,
errors,
- 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 render
has 321 lines of code (exceeds 255 allowed). Consider refactoring. Open
render() {
const { recordYears } = this.props
const activity = (this.props.EmploymentActivity || {}).value
const prefix = `history.employment.${this.localizeByActivity()}`.trim()
Function render
has 317 lines of code (exceeds 255 allowed). Consider refactoring. Open
render() {
const {
requireLegalOffenseInvolvements,
requireLegalOffenseSentenced,
requireLegalOffenseIncarcerated,
Function render
has 315 lines of code (exceeds 255 allowed). Consider refactoring. Open
render() {
const book = this.props.addressBooks[this.props.addressBook] || []
const locationValidator = new LocationValidator(this.props)
const instateZipcode = locationValidator.validZipcodeState()
Function tabology
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
const tabology = () => {
const tabable = !document.body.classList.contains('modal-open')
const focusable = [
'a[href]',
'area[href]',
- 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
File foreign.go
has 774 lines of code (exceeds 750 allowed). Consider refactoring. Open
package api
import (
"encoding/json"
"fmt"
Function render
has 293 lines of code (exceeds 255 allowed). Consider refactoring. Open
render() {
const {
requireForeignCounterIntelligence,
requireForeignExcessiveKnowledge,
requireForeignSensitiveInformation,