Showing 4,231 of 14,884 total issues
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 dateFormatWithoutTimezone
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const dateFormatWithoutTimezone = (
datetime,
format = 'MMMM d, yyyy, h:mm a',
) => {
let withoutTimezone = datetime;
- 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 blueButtonReducer
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const blueButtonReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.BlueButtonReport.GET: {
const updates = {};
- 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 parseMedications
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const parseMedications = (records, index = 7) => {
return `
${index}) Medications
This is a list of prescriptions and other medications in your VA medical records.
- 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 SelectOrganization
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const SelectOrganization = props => {
const { formData, setFormData, goBack, goForward, goToPath } = props;
const [error, setError] = useState(null);
const organizations =
formData['view:selectedRepresentative']?.attributes?.accreditedOrganizations
- 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 Error
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
ComboAlert.Error = () => {
return (
<va-alert
class="row vads-u-margin-y--4"
status="error"
Function OperationStatus
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function OperationStatus(props) {
const { operatingStatus, website, facilityType } = props;
const visitText = useMemo(
() => {
if (facilityType === FacilityType.VA_CEMETERY) {
Function render
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { location, currentQuery } = this.props;
if (!location) {
return null;
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 TaskList
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const TaskList = () => {
const { chapterTitles, getChapterPagesFromChapterIndex } = setupPages(
formConfig,
);
Function transform
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function transform(formConfig, form) {
const benefitsTransform = formData => {
const clonedData = _.cloneDeep(formData);
const benefits = clonedData['view:benefit'];
Function applicantInsuranceSOBSchema
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function applicantInsuranceSOBSchema(isPrimary) {
const keyname = isPrimary
? 'primaryInsuranceScheduleOfBenefits'
: 'secondaryInsuranceScheduleOfBenefits';
return {
Function isInsideListLoopReturn
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const isInsideListLoopReturn = (
chapter,
outerField,
uiTitle,
formChapter,