Showing 12,835 of 12,835 total issues
Function NotEligible
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function NotEligible(name) {
return (
<>
<div>
<va-alert
Function determineBoardObj
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const determineBoardObj = (formResponses, noDRB) => {
if (!formResponses) {
return null;
}
Function ProgramApprovalInformation
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ProgramApprovalInformation = () => {
return (
<MainContentSubDiv
id="program-approval-information"
header="Program approval information"
Function generateStatusResponse
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generateStatusResponse = (req, res) => {
const { id } = req.params;
// increase to use multiple retries
const requiredRetries = 0;
Function YourHealthInformation
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const YourHealthInformation = props => {
const { avs } = props;
const fullState = useSelector(state => state);
const appointmentDate = getFormattedAppointmentDate(avs);
Function listItems
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const listItems = dependents.map((item, index) => {
const { fullName, dependentRelation } = item;
const dependentName = normalizeFullName(fullName);
return (
Function NeedsVAPatient
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const NeedsVAPatient = () => {
const content = {
heading: 'We couldn’t match your information to our VA patient records',
alertText: (
<>
Function NeedsSSNResolution
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const NeedsSSNResolution = () => {
const content = {
heading: 'The information you provided doesn’t match our records',
alertText: (
<div>
Function TravelClaimCard
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function TravelClaimCard(props) {
const {
canViewClaimDetails,
id,
createdOn,
Function render
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
if (this.state.messageDismissed) {
return this.props.children;
}
Function SpouseEmploymentHistoryWidget
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SpouseEmploymentHistoryWidget = props => {
const {
goToPath,
goForward,
contentBeforeButtons,
Function EmploymentHistoryWidget
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const EmploymentHistoryWidget = props => {
const {
goToPath,
goForward,
contentBeforeButtons,
Function calculateHousing
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function calculateHousing(constant, eligibility, institution, derived) {
if (derived.chapter === 31 && derived.isFlightOrCorrespondence) {
return {
qualifier: 'per month',
ratedQualifier: ' / month',
Function generateStatusResponse
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generateStatusResponse = (req, res) => {
const { id } = req.params;
// increase to use multiple retries
const requiredRetries = 0;
Function fetchCopays
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const fetchCopays = () => async dispatch => {
dispatch({ type: COPAYS_FETCH_INITIATED });
const getCopays = () => {
const options = {
method: 'GET',
Function fetchDebts
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const fetchDebts = () => async dispatch => {
dispatch({ type: DEBTS_FETCH_INITIATED });
const getDebts = () => {
const options = {
method: 'GET',
Function generateStatusResponse
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generateStatusResponse = (req, res) => {
const { id } = req.params;
// increase to use multiple retries
const requiredRetries = 0;
File IntroductionPage.jsx
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
Function render
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
Open
render() {
const {
formIds,
profile,
login,
- 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 SubTask
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
Open
export const SubTask = props => {
const { pages = [], formData, setFormData, router } = props;
const [currentPage, setCurrentPage] = useState(pages[0] || {});
const [subTaskData, setSubTaskData] = useState(getStoredSubTask());
const [hasError, setHasError] = useState(false);
- 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"