Showing 12,848 of 12,848 total issues
Function getListOfThreads
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const getListOfThreads = (
folderId,
pageSize,
pageNumber,
threadSort,
- 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 appointmentsReducer
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export default function appointmentsReducer(state = initialState, action) {
switch (action.type) {
case FETCH_FUTURE_APPOINTMENTS:
return {
...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 DetailsVA
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export default function DetailsVA({ appointment, facilityData }) {
const { id } = useParams();
const { cancelInfo, isCC } = useSelector(
state => getConfirmedAppointmentDetailsInfo(state, id),
shallowEqual,
- 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 threadDetailsReducer
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const threadDetailsReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.Thread.GET_THREAD:
return {
...initialState,
- 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 getGridData
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function getGridData(appointment) {
const { isCommunityCare, isVideo } = appointment?.vaos || {};
const isPhone = isVAPhoneAppointment(appointment);
const { serviceType } = appointment?.vaos.apiData || {};
- 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 VideoLayout
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export default function VideoLayout({ data: appointment }) {
const {
clinicName,
clinicPhone,
clinicPhoneExtension,
- 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 Default5103EvidenceNotice
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function Default5103EvidenceNotice({
decisionRequestError,
decisionRequested,
loadingDecisionRequest,
item,
- 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 getCalculatedBenefits
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
(inputs, constants, institution) => {
const avgDodBah = constants ? constants.AVGDODBAH : 0;
const tfCap = constants ? constants.TFCAP : 0;
const { vetTecTuitionFees, vetTecScholarships } = inputs;
- 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 validateAddress
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const validateAddress = (formData, fullName) => async (
dispatch,
getState,
) => {
dispatch({ type: ADDRESS_VALIDATION_START });
- 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 NotificationChannel
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const NotificationChannel = props => {
const {
apiStatus,
channelId,
channelType,
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
const PrintDownload = props => {
const { downloadPdf, downloadTxt, list, allowTxtDownloads } = props;
const menu = useRef(null);
const [menuOpen, setMenuOpen] = 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 getRecordType
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const getRecordType = record => {
if (record.resourceType === fhirResourceTypes.DIAGNOSTIC_REPORT) {
if (record.code?.text === 'CH') return labTypes.CHEM_HEM;
if (
record.code?.coding?.some(
- 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 ContactAccreditedRepresentative
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const ContactAccreditedRepresentative = props => {
const { formData } = props;
const representative = formData?.['view:selectedRepresentative'];
const isOrg = representative?.type === 'organization';
- 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 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
startTime,
endTime,
appTitle,
Function fullNameNoSuffixUI
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
const fullNameNoSuffixUI = (formatTitle, uiOptions = {}) => {
return {
'ui:validations': [validateEmpty],
first: {
'ui:title': formatTitle ? formatTitle('first name') : 'First name',
Function vaTextareaFieldMapping
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function vaTextareaFieldMapping(props) {
const {
description,
textDescription,
DescriptionField,
Function replaceRefSchemas
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function replaceRefSchemas(schema, definitions, path = '') {
// this can happen if you import a field that doesn’t exist from a schema
if (!schema) {
throw new Error(`Schema is undefined at ${path}`);
}
Function phoneUISchema
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function phoneUISchema(category) {
const schema = {
'ui:options': {
hideLabelText: true,
showFieldLabel: false,
Function render
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { location, currentQuery } = this.props;
if (!location) {
return null;
Function renderFacilityTypeDropdown
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderFacilityTypeDropdown = () => {
const { suppressCCP, suppressPharmacies, suppressPPMS } = props;
const { facilityType, isValid, facilityTypeChanged } = currentQuery;
const locationOptions = suppressPPMS
? nonPPMSfacilityTypeOptions