Enterprise-CMCS/macpro-mako

View on GitHub

Showing 140 of 140 total issues

Avoid too many return statements within this function.
Open

      return true;
Severity: Major
Found in lib/packages/shared-utils/package-actions/rules.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

          return Promise.reject(new Error(`Secret not found: ${secretName}`));
    Severity: Major
    Found in lib/config/deployment-config.test.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return response<unknown>({
            statusCode: 200,
            body: { url },
          });
      Severity: Major
      Found in lib/lambda/getAttachmentUrl.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

          return null;
        Severity: Major
        Found in lib/packages/shared-utils/s3-url-parser.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return response({
                    statusCode: 404,
                    body: { message: "state access not permitted for the given id" },
                  });
          Severity: Major
          Found in lib/lambda/getAttachmentUrl.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

              return <Navigate to="/dashboard" />;
            Severity: Major
            Found in react-app/src/features/forms/post-submission/amend/index.tsx - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  if (exceedMin) return minLengthOutput.message;
              Severity: Major
              Found in react-app/src/components/RHF/utils/validator.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return response({
                      statusCode: 500,
                      body: { message: "Internal server error" },
                    });
                Severity: Major
                Found in lib/lambda/submit/index.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                    return "";
                  Severity: Major
                  Found in react-app/src/components/RHF/utils/validator.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return type.mime;
                    Severity: Major
                    Found in lib/local-constructs/clamav-scanning/src/lib/file-ext.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return constants.STATUS_CLEAN_FILE;
                      Severity: Major
                      Found in lib/local-constructs/clamav-scanning/src/lib/file-ext.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                            return response({
                              statusCode: 500,
                              body: { message: "Internal server error" },
                            });
                        Severity: Major
                        Found in lib/lambda/getAttachmentUrl.ts - About 30 mins to fix

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

                            if (container.queryAllByLabelText("three-dots-loading")?.length > 0) {
                              await waitForElementToBeRemoved(() => container.queryAllByLabelText("three-dots-loading"));
                            }
                          Severity: Minor
                          Found in react-app/src/utils/test-helpers/renderForm.tsx and 1 other location - About 30 mins to fix
                          react-app/src/utils/test-helpers/renderForm.tsx on lines 51..53

                          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 45.

                          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

                          Avoid too many return statements within this function.
                          Open

                              return false;
                          Severity: Major
                          Found in lib/packages/shared-utils/package-actions/rules.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                return response({
                                  statusCode: 500,
                                  body: { error, message: error.message },
                                });
                            Severity: Major
                            Found in lib/lambda/item.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      return !(
                                        (dependentValue[i] as unknown[]).length === 1 &&
                                        (dependentValue[i] as unknown[]).includes(d.expectedValue)
                                      );
                              Severity: Major
                              Found in react-app/src/components/RHF/dependencyWrapper.tsx - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                      return response({
                                        statusCode: 500,
                                        body: {
                                          message: "Attachment details not found for given record id.",
                                        },
                                Severity: Major
                                Found in lib/lambda/getAttachmentUrl.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                          return !!dependentValue[i] && !(dependentValue[i] === d?.expectedValue);
                                  Severity: Major
                                  Found in react-app/src/components/RHF/dependencyWrapper.tsx - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                      return response({
                                        statusCode: 500,
                                        body: {
                                          error: "Internal server error",
                                        },
                                    Severity: Major
                                    Found in lib/lambda/getForm.ts - About 30 mins to fix

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

                                                if (dependency.effect.checkUnique)
                                                  newValArr = newValArr.filter((v, i, a) => a.indexOf(v) === i);
                                      Severity: Minor
                                      Found in react-app/src/components/RHF/dependencyWrapper.tsx and 1 other location - About 30 mins to fix
                                      react-app/src/components/RHF/dependencyWrapper.tsx on lines 109..110

                                      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 45.

                                      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