department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,844 of 12,844 total issues

Function YourAppointment has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const YourAppointment = props => {
  const { avs } = props;

  return (
    <div className="avs-accordion-item">
Severity: Minor
Found in src/applications/avs/components/YourAppointment.jsx - About 1 hr to fix

    Function FinancialConfirmation has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const FinancialConfirmation = props => {
      const { goBack, goForward } = props;
    
      return (
        <va-alert
    Severity: Minor
    Found in src/applications/hca/components/FormPages/FinancialConfirmation.jsx - About 1 hr to fix

      Function createRecurringEvents has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const createRecurringEvents = () => {
        const recurEventData = { id: 'upcoming' };
        const eventA = createEvent(
          now
            .clone()
      Severity: Minor
      Found in src/applications/static-pages/events/helpers/event-generator.js - About 1 hr to fix

        Function render has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          render() {
            const { form } = this.props;
            const { submission, formId, data } = form;
            const submitDate = submission ? submission.timestamp : null;
            const { fullName } = data;
        Severity: Minor
        Found in src/applications/travel-pay/containers/ConfirmationPage.jsx - About 1 hr to fix

          Function generateMedicalCentersSchemas has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const generateMedicalCentersSchemas = (
            medicalCentersKey = 'medicalCenters',
            medicalCentersTitle = 'Default Medical Centers Title',
            medicalCenterMessage = 'Default Message',
            medicalCenterFieldLabel = 'Default Field Label',

            Function App has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const App = props => {
              const { location, children } = props;
              const { data: formData } = useSelector(state => state.form);
              const { isLoadingFeatureFlags: loading, useFacilitiesApi } = useSelector(
                selectFeatureToggles,
            Severity: Minor
            Found in src/applications/caregivers/containers/App.jsx - About 1 hr to fix

              Function FormApp has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function FormApp(props) {
                const {
                  children,
                  hasSavedForm,
                  isLoading,
              Severity: Minor
              Found in src/applications/vre/28-1900/containers/FormApp.jsx - About 1 hr to fix

                Function WizardContainer has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const WizardContainer = props => {
                  const { setWizardStatus } = props;
                  useEffect(() => {
                    focusElement('.va-nav-breadcrumbs-list');
                  }, []);
                Severity: Minor
                Found in src/applications/vre/25-8832/containers/WizardContainer.jsx - About 1 hr to fix

                  Function VeteranInformationViewComponent has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const VeteranInformationViewComponent = props => {
                    const { profile } = props;
                    const {
                      gender,
                      dob,

                    Function threadsReducer has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const threadsReducer = (state = initialState, action) => {
                      switch (action.type) {
                        case Actions.Thread.GET_LIST:
                          return {
                            ...state,
                    Severity: Minor
                    Found in src/applications/mhv-secure-messaging/reducers/threads.js - About 1 hr to fix

                      Function openFacilityPage has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function openFacilityPage() {
                        return async (dispatch, getState) => {
                          try {
                            const initialState = getState();
                            const newBooking = selectCovid19VaccineNewBooking(initialState);
                      Severity: Minor
                      Found in src/applications/vaos/covid-19-vaccine/redux/actions.js - About 1 hr to fix

                        Function getBreadcrumbList has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          const getBreadcrumbList = () => {
                            const isPast = location.pathname.includes('/past');
                            const isPending = location.pathname.includes('/pending');
                        
                            const BREADCRUMB_BASE = [
                        Severity: Minor
                        Found in src/applications/vaos/components/Breadcrumbs.jsx - About 1 hr to fix

                          Function getICSTokens has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function getICSTokens(buffer) {
                            const map = new Map();
                            let tokens = buffer.split('\r\n');
                          
                            // Split tokens into key/value pairs using lookbehind since it is possible
                          Severity: Minor
                          Found in src/applications/vaos/utils/calendar.js - About 1 hr to fix

                            Function getGridData has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function getGridData(appointment) {
                              const { isCommunityCare, isVideo } = appointment?.vaos || {};
                              const isPhone = isVAPhoneAppointment(appointment);
                              const { serviceType } = appointment?.vaos.apiData || {};
                            
                            

                              Function verifyDependents has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function verifyDependents(state = initialState, action) {
                                switch (action.type) {
                                  case DEPENDENCY_VERIFICATION_CALL_SUCCESS:
                                    return {
                                      ...state,

                                Function buildMedicationInformationPDF has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const buildMedicationInformationPDF = list => {
                                  const listOfHeaders = ['h2', 'h3'];
                                  const sections = [
                                    ...list
                                      .filter(listItem => listOfHeaders.includes(listItem.type))
                                Severity: Minor
                                Found in src/applications/mhv-medications/util/pdfConfigs.js - About 1 hr to fix

                                  Identical blocks of code found in 4 locations. Consider refactoring.
                                  Open

                                  IntroductionPage.propTypes = {
                                    route: PropTypes.shape({
                                      formConfig: PropTypes.shape({
                                        prefillEnabled: PropTypes.bool,
                                        savedFormMessages: PropTypes.shape({}),
                                  src/applications/simple-forms/21-0972/containers/IntroductionPage.jsx on lines 111..119
                                  src/applications/simple-forms/21-4142/containers/IntroductionPage.jsx on lines 113..121
                                  src/applications/simple-forms/26-4555/containers/IntroductionPage.jsx on lines 42..50

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 72.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Identical blocks of code found in 4 locations. Consider refactoring.
                                  Open

                                  IntroductionPage.propTypes = {
                                    route: PropTypes.shape({
                                      formConfig: PropTypes.shape({
                                        prefillEnabled: PropTypes.bool,
                                        savedFormMessages: PropTypes.shape({}),
                                  src/applications/simple-forms/21-0972/containers/IntroductionPage.jsx on lines 111..119
                                  src/applications/simple-forms/21-4142/containers/IntroductionPage.jsx on lines 113..121
                                  src/applications/simple-forms/21P-0847/containers/IntroductionPage.jsx on lines 69..77

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 72.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Identical blocks of code found in 4 locations. Consider refactoring.
                                  Open

                                  IntroductionPage.propTypes = {
                                    route: PropTypes.shape({
                                      formConfig: PropTypes.shape({
                                        prefillEnabled: PropTypes.bool,
                                        savedFormMessages: PropTypes.shape({}),
                                  src/applications/simple-forms/21-4142/containers/IntroductionPage.jsx on lines 113..121
                                  src/applications/simple-forms/21P-0847/containers/IntroductionPage.jsx on lines 69..77
                                  src/applications/simple-forms/26-4555/containers/IntroductionPage.jsx on lines 42..50

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 72.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Identical blocks of code found in 4 locations. Consider refactoring.
                                  Open

                                  IntroductionPage.propTypes = {
                                    route: PropTypes.shape({
                                      formConfig: PropTypes.shape({
                                        prefillEnabled: PropTypes.bool,
                                        savedFormMessages: PropTypes.shape({}),
                                  src/applications/simple-forms/21-0972/containers/IntroductionPage.jsx on lines 111..119
                                  src/applications/simple-forms/21P-0847/containers/IntroductionPage.jsx on lines 69..77
                                  src/applications/simple-forms/26-4555/containers/IntroductionPage.jsx on lines 42..50

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 72.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language