Showing 12,918 of 12,918 total issues
Function App
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function App({
location,
children,
isLoggedIn,
isLoading,
- 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 a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { itf, title } = this.props;
if (this.shouldBlockITF(this.props.location.pathname)) {
return this.props.children;
- 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 SummaryOfDisabilitiesDescription
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const SummaryOfDisabilitiesDescription = ({ formData }) => {
const { ratedDisabilities, newDisabilities } = formData;
const ratedDisabilityNames =
ratedDisabilities && isClaimingIncrease(formData)
? ratedDisabilities
- 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 addPTSDCause
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const addPTSDCause = formData => {
const clonedData = formData.newDisabilities
? _.set(
'newDisabilities',
formData.newDisabilities.map(disability => {
- 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 summaryOfEvidenceDescription
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const summaryOfEvidenceDescription = ({ formData }) => {
const vaEvidence = _.get('vaTreatmentFacilities', formData, []);
const privateEvidence = _.get('providerFacility', formData, []);
const privateEvidenceUploads = _.get(
'privateMedicalRecordAttachments',
- 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 formatQueryParams
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const formatQueryParams = ({
lat,
long,
radius,
page,
- 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 FacilityList
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const FacilityList = props => {
const { facilities, onChange, query, value, error } = props;
const reviewMode = props?.formContext?.reviewMode || false;
const submitted = props?.formContext?.submitted || 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"
Further reading
Function uiSchema
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function uiSchema(
labels = {
root: 'Address',
country: 'Country',
street: 'Street',
- 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 CustomPersonalInformationReviewField
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const CustomPersonalInformationReviewField = ({ name, data }) => {
const getNameKey = str => {
if (str.includes('_')) {
return str.split('_')[0];
}
- 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 CashInBank
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const CashInBank = ({
contentBeforeButtons,
contentAfterButtons,
data,
goBack,
- 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 App
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const App = ({
children,
formData,
getFormStatus,
isError,
- 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 CashInBankReview
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const CashInBankReview = ({ data, goToPath }) => {
const dispatch = useDispatch();
const {
assets,
gmtData,
- 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 FileUploader
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const FileUploader = ({ files, onAddFile }) => {
const acceptedFileTypes = FILE_TYPES.map(type => `${type}`).join(', ');
const [errorMessage, setErrorMessage] = useState(null);
const scrollToFile = position => {
- 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 OtherAssetsSummary
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const OtherAssetsSummary = ({
data,
goForward,
goToPath,
setFormData,
- 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 calculateIncome
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const calculateIncome = (
enhancedFSRActive,
employmentRecords = [],
currEmployment = [],
addlIncRecords = [],
- 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 OtherIncomeSummary
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const OtherIncomeSummary = ({
data,
goToPath,
goForward,
setFormData,
- 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 Folders
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const Folders = () => {
const dispatch = useDispatch();
const location = useLocation();
const alertList = useSelector(state => state.sm.alerts?.alertList);
const folders = useSelector(state => state.sm.folders.folderList);
- 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 selectApptDetailAriaText
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function selectApptDetailAriaText(appointment, isRequest = false) {
const appointmentDate = selectStartDate(appointment);
const isCanceled = selectIsCanceled(appointment);
const isCommunityCare = selectIsCommunityCare(appointment);
const isPhone = selectIsPhone(appointment);
- 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 RouteLeavingGuard
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const RouteLeavingGuard = ({
navigate,
when,
modalVisible,
updateModalVisible,
- 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 VAOSBreadcrumbs
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function VAOSBreadcrumbs({ children }) {
const location = useLocation();
// get boolean if single va location
const [breadcrumb, setBreadcrumb] = useState([]);
- 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"