Showing 3,949 of 13,756 total issues
Function VaccineDetails
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const VaccineDetails = props => {
const { runningUnitTest } = props;
const record = useSelector(state => state.mr.vaccines.vaccineDetails);
const vaccines = useSelector(state => state.mr.vaccines.vaccinesList);
const user = useSelector(state => state.user.profile);
- 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 CareSummariesAndNotesListItem
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const CareSummariesAndNotesListItem = props => {
const { record } = props;
const isDischargeSummary = record.type === loincCodes.DISCHARGE_SUMMARY;
const admDate = dischargeSummarySortFields.ADMISSION_DATE;
- 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 CTALink
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const CTALink = ({
ariaLabel,
className,
href,
text,
- 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 getLastUpdatedText
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const getLastUpdatedText = (refreshStateStatus, extractType) => {
if (refreshStateStatus) {
const extract = refreshStateStatus.find(
status => status.extract === extractType,
);
- 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 RxBreadcrumbs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const RxBreadcrumbs = () => {
const location = useLocation();
const prescription = useSelector(
state => state.rx.prescriptions?.prescriptionDetails,
);
- 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 buildNonVAPrescriptionTXT
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const buildNonVAPrescriptionTXT = prescription => {
return `
---------------------------------------------------------------------------------
- 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 getDateSigned
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const getDateSigned = record => {
if (isArrayAndHasItems(record.authenticator?.extension)) {
const ext = record.authenticator.extension.find(e => e.valueDateTime);
if (ext) {
const formattedDate = formatDateLong(ext.valueDateTime);
- 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 MedicationsListFilter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const MedicationsListFilter = props => {
const { updateFilter, filterOption, setFilterOption } = props;
const handleFilterOptionChange = ({ detail }) => {
setFilterOption(detail?.value);
- 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 testableApiRequestWithRetry
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const testableApiRequestWithRetry = (
retryInterval,
apiRequestFunc,
) => async (path, options, endTime) => {
if (Date.now() >= endTime) {
- 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"