Showing 3,949 of 13,756 total issues
Function FormQuestion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function FormQuestion({
question,
recordStart,
optionsConfig,
setQuestionValue,
- 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 OtherExpensesChecklist
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const OtherExpensesChecklist = ({
data,
goBack,
goForward,
goToPath,
- 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 getFolders
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const getFolders = () => async (dispatch, getState) => {
const isPilot = getIsPilotFromState(getState);
try {
const response = await getFolderList(isPilot);
if (response.data) {
- 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 ResolutionExplainerWidget
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const ResolutionExplainerWidget = ({
data,
goBack,
goForward,
goToPath,
- 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 saveDraft
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const saveDraft = (messageData, type, id) => async dispatch => {
recordEvent({
// For Google Analytics
event: 'secure-messaging-save-draft-type',
'secure-messaging-save-draft': 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 saveReplyDraft
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const saveReplyDraft = (
replyToId,
messageData,
type,
id,
- 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 ResolutionWaiverAgreement
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const ResolutionWaiverAgreement = ({ formContext }) => {
const dispatch = useDispatch();
const formData = useSelector(state => state.form.data);
const { selectedDebtsAndCopays = [] } = formData;
- 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 ReplyForm
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const ReplyForm = props => {
const {
cannotReply,
drafts,
replyMessage,
- 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 getSubmissionType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const getSubmissionType = selectedDebtsAndCopays => {
if (!selectedDebtsAndCopays.length) return 'debt-submission';
const hasDebts = selectedDebtsAndCopays.some(
selected => selected.debtType === DEBT_TYPES.DEBT,
- 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 selectFutureStatus
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function selectFutureStatus(state) {
const { pendingStatus, confirmedStatus } = state.appointments;
if (
pendingStatus === FETCH_STATUS.failed ||
confirmedStatus === FETCH_STATUS.failed
- 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 InnerNavigation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const InnerNavigation = () => {
const location = useLocation();
const handleActiveLinksStyle = path => {
let isInnerActive = 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 FoldersList
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const FoldersList = props => {
const { folders, showUnread } = props;
const folderNameDdAction = folderName => {
const isCustomFolder =
- 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 ContactFacilitiesPage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function ContactFacilitiesPage({ changeCrumb }) {
const featureBreadcrumbUrlUpdate = useSelector(state =>
selectFeatureBreadcrumbUrlUpdate(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 CreateFolderModal
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const CreateFolderModal = props => {
const {
isCreateNewModalVisible,
setIsCreateNewModalVisible,
onConfirm,
- 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 CancelPageLayoutRequest
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function CancelPageLayoutRequest() {
const { id } = useParams();
const {
appointment,
email,
- 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 getHeading
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getHeading(appointment) {
const isCanceled = selectIsCanceled(appointment);
if (selectIsInPerson(appointment)) {
if (isCanceled) return 'Canceled in-person 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 VAFacilityLocation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function VAFacilityLocation({
clinicName,
facility,
facilityName,
facilityId,
- 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 VideoLink
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function VideoLink({ appointment }) {
const { url } = appointment.videoData;
const diff = moment().diff(moment(appointment.start), 'minutes');
// Button is enabled 30 minutes prior to start time, until 4 hours after start time
- 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 WarningNotification
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function WarningNotification({ status, description }) {
const splitDescription = description?.split('|');
const notificationTitle =
splitDescription?.length > 1 && splitDescription?.[0];
const descriptionBody = notificationTitle
- 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 AppointmentsPage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function AppointmentsPage() {
const location = useLocation();
const dispatch = useDispatch();
const [hasTypeChanged, setHasTypeChanged] = useState(false);
let [pageTitle] = useState('VA online scheduling');
- 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"