Showing 4,231 of 14,884 total issues
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 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 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 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 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"
Further reading
Function DowntimeMessage
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function DowntimeMessage({
startTime,
endTime,
status,
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 CCRequestLayout
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function CCRequestLayout({ data: appointment }) {
const { search } = useLocation();
const {
email,
facility,
- 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 CCLayout
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function CCLayout({ data: appointment }) {
const {
facility,
isPastAppointment,
ccProvider,
- 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 TravelReimbursementSection
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function TravelReimbursementSection({ appointment }) {
const isEligibleForTravelClaim = selectIsEligibleForTravelClaim(appointment);
if (!isEligibleForTravelClaim) return null;
const claimData = selectAppointmentTravelClaim(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 AppealListItem
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function AppealListItem({ appeal, name }) {
let requestEventType;
let isAppeal;
switch (appeal.type) {
- 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 generateClaimTitle
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const generateClaimTitle = (claim, placement, tab) => {
// This will default to 'disability compensation'
const claimType = getClaimType(claim).toLowerCase();
const isRequestToAddOrRemoveDependent = addOrRemoveDependentClaimTypeCodes.includes(
claim?.attributes?.claimTypeCode,
- 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 TypeOfCarePage
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function TypeOfCarePage() {
const pageTitle = useSelector(state => getPageTitle(state, pageKey));
const dispatch = useDispatch();
const {
- 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 {
appealsLoading,
claimsLoading,
list,
- 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 ProgramsList
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const ProgramsList = ({ match }) => {
const dispatch = useDispatch();
const { loading, error, institutionPrograms } = useSelector(
state => state.institutionPrograms,
);
- 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 locationInfo
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const locationInfo = (city, state, country) => {
let address = '';
if (isCountryUSA(country)) {
if (city && state) {
address = `${city}, ${state}`;
- 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 ClaimDetailLayout
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function ClaimDetailLayout(props) {
const { claim, clearNotification, currentTab, loading, message } = props;
const tabs = ['Status', 'Files', 'Details', 'Overview'];
- 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 calculateHousing
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function calculateHousing(constant, eligibility, institution, derived) {
if (derived.chapter === 31 && derived.isFlightOrCorrespondence) {
return {
qualifier: 'per month',
ratedQualifier: ' / month',
- 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 ConnectedDevicesSection
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const ConnectedDevicesSection = ({
connectedDevices,
successAlert,
failureAlert,
disconnectSuccessAlert,
- 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 CopyAddressModal
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const CopyAddressModal = props => {
const {
mailingAddress = null,
homeAddress,
transaction,
- 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"