Showing 3,724 of 12,675 total issues
Function createName
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const createName = ({
firstName,
lastName,
suffix,
fallback,
- 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 TopicSelect
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const TopicSelect = props => {
const { id, onChange, value, loggedIn, categoryID } = props;
const dispatch = useDispatch();
const [apiData, setApiData] = 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 CurrentDebtTitle
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const CurrentDebtTitle = ({ formContext }) => {
const formData = useSelector(state => state.form.data);
const { selectedDebtsAndCopays = [] } = formData;
const currentDebt = selectedDebtsAndCopays[formContext.pagePerItemIndex];
const { deductionCode, benefitType } = currentDebt;
- 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 EnhancedBenefits
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const EnhancedBenefits = ({ income, pending }) => {
const eduReceived = income?.reduce((a, b) => a + Number(b.education), 0);
const compReceived = income?.reduce(
(a, b) => a + Number(b.compensationAndPension),
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 validateResolutionOption
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const validateResolutionOption = (errors, fieldData) => {
if (
fieldData &&
(fieldData.resolutionOption !== 'waiver' &&
fieldData.resolutionOption !== 'compromise' &&
- 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 getAllExpenses
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const getAllExpenses = formData => {
const {
expenses: {
creditCardBills = [],
expenseRecords = [],
- 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 MonetaryAssetsSummaryReview
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const MonetaryAssetsSummaryReview = ({ 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 newFolder
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const newFolder = folderName => async dispatch => {
try {
const response = await createFolder(folderName);
dispatch({
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {
benefitSummaryOptions,
requestOptions,
isVeteran,
- 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 Compose
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const Compose = () => {
const dispatch = useDispatch();
const recipients = useSelector(state => state.sm.recipients);
const { drafts, saveError } = useSelector(state => state.sm.threadDetails);
const signature = useSelector(state => state.sm.preferences.signature);
- 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 sendMessage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const sendMessage = (message, attachments) => async dispatch => {
try {
await createMessage(message, attachments);
dispatch(
addAlert(
- 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 BlockedTriageGroupAlert
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const BlockedTriageGroupAlert = props => {
const { blockedTriageGroupList, alertStyle, parentComponent } = props;
const { alertTitle, alertMessage } = BlockedTriageAlertText;
const MESSAGE_TO_CARE_TEAM = "You can't send messages to";
- 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 runAdvancedSearch
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const runAdvancedSearch = (
folder,
query,
keyword,
queryData = {},
- 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 FormApp
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function FormApp(props) {
const {
children,
hasSavedForm,
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 DraftSavedInfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const DraftSavedInfo = props => {
const { messageId, drafts } = props;
const threadDetails = useSelector(state => state.sm.threadDetails);
- 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 renameFolder
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const renameFolder = (folderId, newName) => async dispatch => {
try {
await updateFolderName(folderId, newName);
dispatch(
addAlert(
- 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 ComposeFormActionButtons
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const ComposeFormActionButtons = ({
onSend,
onSaveDraft,
formPopulated,
setDeleteButtonClicked,
- 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 FolderHeader
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const FolderHeader = props => {
const { folder, searchProps, threadCount } = props;
const location = useLocation();
const userFacilities = useSelector(state => state?.user?.profile?.facilities);
const showInnerNav =
- 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 MessageListItem
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const MessageListItem = props => {
const location = useLocation();
const {
senderName,
sentDate,
- 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 RequestedStatusAlert
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export default function RequestedStatusAlert({ appointment, facility }) {
const history = useHistory();
const dispatch = useDispatch();
const { search } = useLocation();
const { root, typeOfCare } = useSelector(getNewAppointmentFlow);
- 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"