department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Function validateRoutingNumber has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  errors,
  routingNumber,
  formData,
  schema,
  errorMessages,
Severity: Minor
Found in src/applications/edu-benefits/10203/pages/DirectDeposit.jsx - About 35 mins to fix

    Function validateRoutingNumber has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      errors,
      routingNumber,
      formData,
      schema,
      errorMessages,
    Severity: Minor
    Found in src/applications/edu-benefits/1990/pages/DirectDeposit.jsx - About 35 mins to fix

      Function validateRoutingNumber has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        errors,
        routingNumber,
        formData,
        schema,
        errorMessages,
      Severity: Minor
      Found in src/applications/edu-benefits/pages/directDepositChangeUpdate.js - About 35 mins to fix

        Function validateRoutingNumber has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          errors,
          routingNumber,
          formData,
          schema,
          errorMessages,
        Severity: Minor
        Found in src/applications/edu-benefits/0994/pages/bankInformation.js - About 35 mins to fix

          Function validateRoutingNumber has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            errors,
            routingNumber,
            formData,
            schema,
            errorMessages,
          Severity: Minor
          Found in src/applications/edu-benefits/5490/content/directDepositUpdate.jsx - About 35 mins to fix

            Function validateSelections has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              errors,
              formData,
              objectName,
              otherObjectName,
              selectionTypes = 'locations',

              Function validateBooleanGroup has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                errors,
                userGroup,
                form,
                schema,
                errorMessages = {},
              Severity: Minor
              Found in src/applications/disability-benefits/all-claims/validations.js - About 35 mins to fix

                Function routeToPageInFlow has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                export function routeToPageInFlow(callback, history, current, action, data) {
                Severity: Minor
                Found in src/applications/vaos/new-appointment/redux/actions.js - About 35 mins to fix

                  Function generateICS has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    summary,
                    description,
                    location,
                    startDateTime,
                    endDateTime,
                  Severity: Minor
                  Found in src/applications/vaos/utils/calendar.js - About 35 mins to fix

                    Function makeAuthRequest has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      url,
                      userOptions,
                      dispatch,
                      onSuccess,
                      onError,
                    Severity: Minor
                    Found in src/applications/claims-status/utils/helpers.js - About 35 mins to fix

                      Function fetchSearchByLocationCoords has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        location,
                        coordinates,
                        distance,
                        filters,
                        version,
                      Severity: Minor
                      Found in src/applications/gi/actions/index.js - About 35 mins to fix

                        Function aboutTheSchoolOptions has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          excludeCautionFlags,
                          accredited,
                          studentVeteran,
                          yellowRibbonScholarship,
                          automatedTest = false,
                        Severity: Minor
                        Found in src/applications/gi/containers/search/FilterBeforeResults.jsx - About 35 mins to fix

                          Function uiSchema has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            subHeader = nonVeteranApplicantDetailsSubHeader,
                            description = nonVeteranApplicantDetailsDescription,
                            nameUI = nonPreparerFullMaidenNameUI,
                            ssnUI = ssnDashesUI,
                            dateOfBirthUI = nonPreparerDateOfBirthUI,

                            Function uiSchema has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              subHeader = nonVeteranApplicantDetailsSubHeader,
                              description = nonVeteranApplicantDetailsDescription,
                              nameUI = nonPreparerFullMaidenNameUI,
                              ssnUI = ssnDashesUI,
                              dateOfBirthUI = nonPreparerDateOfBirthUI,

                              Function getRenderToken has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              export function getRenderToken(tokens, idx, options, env, self) {
                              Severity: Minor
                              Found in src/applications/virtual-agent/utils/markdownRenderer.js - About 35 mins to fix

                                Function normalizeAndCategorizeFacility has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                const normalizeAndCategorizeFacility = (
                                  collection = {},
                                  facilityEntity = [],
                                  includeCernerStaged = [],
                                ) => {

                                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 generateFooterContent has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                const generateFooterContent = async (
                                  doc,
                                  parent,
                                  data,
                                  config,
                                Severity: Minor
                                Found in src/platform/pdf/templates/utils.js - About 35 mins to fix

                                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 { customText } = this.props;
                                
                                    const appType = customText?.appType || APP_TYPE_DEFAULT;
                                
                                

                                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 formatMenuItems has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                export const formatMenuItems = menuItems => {
                                  const formattedMenuItems = [];
                                
                                  if (menuItems && isArray(menuItems)) {
                                    return menuItems;
                                Severity: Minor
                                Found in src/platform/site-wide/header/helpers/index.js - About 35 mins to fix

                                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 OfficialGovtWebsite has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                export const OfficialGovtWebsite = () => {
                                  const [expanded, setExpanded] = useState(false);
                                
                                  const onToggle = () => {
                                    if (expanded) {
                                Severity: Minor
                                Found in src/platform/site-wide/header/components/OfficialGovtWebsite/index.js - About 35 mins to fix

                                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

                                Severity
                                Category
                                Status
                                Source
                                Language