Showing 4,231 of 14,884 total issues
Function MessageThreadMeta
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const MessageThreadMeta = props => {
const {
message,
fromMe,
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 RequestedAppointmentDetailsPage
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function RequestedAppointmentDetailsPage() {
const { id } = useParams();
const dispatch = useDispatch();
useEffect(
- 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 ClaimExamLayout
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function ClaimExamLayout({ data: appointment }) {
const {
clinicName,
clinicPhysicalLocation,
clinicPhone,
- 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 getDaysOfTheWeek
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function getDaysOfTheWeek(momentDate, showWeekend) {
const daysToShow = [];
let dayOfWeek;
if (!showWeekend) {
- 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 resetFormDataOnTypeOfCareChange
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function resetFormDataOnTypeOfCareChange(pages, oldData, data) {
let newPages = pages;
let newData = data;
if (getTypeOfCare(newData)?.id !== getTypeOfCare(oldData)?.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 POST /vaos/v2/appointments
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
'POST /vaos/v2/appointments': (req, res) => {
const {
practitioners = [{ identifier: [{ system: null, value: null }] }],
} = req.body;
const selectedClinic = clinicsV2.data.filter(
- 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 AccordionItem
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function AccordionItem({
button,
children,
expanded = true,
headerClass,
- 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 CautionFlagHeading
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const CautionFlagHeading = ({ cautionFlags, onViewWarnings }) => {
const validFlags = cautionFlags
? [...cautionFlags].filter(flag => flag.title)
: [];
if (validFlags.length > 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 ProofOfVeteranStatus
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const ProofOfVeteranStatus = ({
serviceHistory = [],
vetStatusEligibility = {},
totalDisabilityRating,
userFullName = {
- 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 makeUserObject
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function makeUserObject(options = {}) {
const services = options.services || ['vet360'];
let claims = {
ch33_bank_accounts: true,
communication_preferences: true,
- 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 UpdateErrorAlert
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export const UpdateErrorAlert = ({ className, saveError }) => {
const alertRef = React.useRef();
useEffect(
() => {
- 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 compareAddressObjects
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function compareAddressObjects(obj1, obj2) {
const { hasOwnProperty } = Object.prototype;
const keys1 = Object.keys(obj1);
const keys2 = Object.keys(obj2);
- 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 Appeal
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const Appeal = ({ appeal, name }) => {
if (!appeal.attributes) {
throw new TypeError(
'`appeal` prop is malformed; it should have an `attributes` property.',
);
- 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 PrintDownload
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const PrintDownload = props => {
const {
downloadPdf,
downloadTxt,
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 DownloadRecordType
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const DownloadRecordType = () => {
const history = useHistory();
const dispatch = useDispatch();
const [checkAll, setCheckAll] = useState(false);
const [labTestCheck, setLabTestCheck] = 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"
Further reading
Function ConfirmationPage
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function ConfirmationPage({ router }) {
const [signedForm, setSignedForm] = useState(false);
const [signedFormError, setSignedFormError] = useState(false);
const { data: formData } = useSelector(state => state.form);
const selectedEntity = formData['view:selectedRepresentative'];
- 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 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { customText } = this.props;
const appType = customText?.appType || APP_TYPE_DEFAULT;
Function scheduledDowntime
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function scheduledDowntime(state = initialState, action) {
switch (action.type) {
case RECEIVE_GLOBAL_DOWNTIME:
return {
...state,
Function asyncLoader
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function asyncLoader(getComponent, message) {
return class AsyncComponent extends React.Component {
static Component = null;
constructor(props) {
Function addressConvertNextValueToCleanData
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
const addressConvertNextValueToCleanData = value => {
const {
id,
addressLine1,
addressLine2,