dashpresshq/dashpress

View on GitHub

Showing 459 of 459 total issues

Function PresentationScriptDocumentation has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function PresentationScriptDocumentation() {
  return (
    <DocumentationRoot>
      <p>
        For a quick showoff, copy and paste the script below, save the form, and
Severity: Major
Found in src/frontend/docs/scripts/presentations-scripts.tsx - About 2 hrs to fix

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

        create: {
          disabled: !entityCrudSettingsState.create,
          render: (
            <>
              <EntityFieldsSelectionSettings
    Severity: Major
    Found in src/frontend/views/entity/Crud/index.tsx and 1 other location - About 2 hrs to fix
    src/frontend/views/entity/Crud/index.tsx on lines 105..121

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

    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

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

        details: {
          disabled: !entityCrudSettingsState.details,
          render: (
            <>
              <EntityFieldsSelectionSettings
    Severity: Major
    Found in src/frontend/views/entity/Crud/index.tsx and 1 other location - About 2 hrs to fix
    src/frontend/views/entity/Crud/index.tsx on lines 122..138

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

    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

    Function StorageCredentialsSettings has 70 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function StorageCredentialsSettings() {
      const storageList = useStorageIntegrationsList();
      const activeStorageIntegration = useActiveStorageIntegration();
      const fileStorageDomainMessages = useDomainMessages(
        LANG_DOMAINS.INTEGRATIONS.FILE_STORAGE
    Severity: Major
    Found in src/frontend/views/integrations/storage/Credentials.tsx - About 2 hrs to fix

      Function UserPreferences has 70 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function UserPreferences() {
        const { theme, setTheme } = useTheme();
        const themes = usePortalThemesSelection();
      
        const domainMessages = useDomainMessages(LANG_DOMAINS.ACCOUNT.PREFERENCES);
      Severity: Major
      Found in src/frontend/views/account/Preferences/index.tsx - About 2 hrs to fix

        Function EntityPresentationScriptSettings has 70 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function EntityPresentationScriptSettings() {
          const entity = useEntitySlug();
          const entityPresentationScript = useEntityConfiguration(
            "entity_presentation_script",
            entity
        Severity: Major
        Found in src/frontend/views/entity/Presentation/index.tsx - About 2 hrs to fix

          Function AsyncFormSelect has 68 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function AsyncFormSelect(props: IProps) {
            const { _ } = useLingui();
          
            const { input, url, referenceUrl } = props;
          
          
          Severity: Major
          Found in src/frontend/components/app/form/input/select-async.tsx - About 2 hrs to fix

            Function filterOperatorToQuery has 64 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              filterOperatorToQuery(
                query: T,
                column: string,
                { operator, value, value2 }: IColumnFilterBag<unknown>,
                groupOperator: "and" | "or"
            Severity: Major
            Found in src/backend/data/data-access/_Base.ts - About 2 hrs to fix

              Function RelationsSettingsDocumentation has 63 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function RelationsSettingsDocumentation() {
                return (
                  <DocumentationRoot>
                    <p>
                      This setting helps you manage how this entity will be presented on other
              Severity: Major
              Found in src/frontend/docs/relations.tsx - About 2 hrs to fix

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                    {
                      Header: msg`Trigger`,
                      accessor: "trigger",
                      filter: {
                        _type: "string",
                Severity: Major
                Found in src/frontend/views/entity/Actions/Base.tsx and 2 other locations - About 2 hrs to fix
                src/frontend/views/entity/Actions/Base.tsx on lines 87..97
                src/frontend/views/entity/Actions/Base.tsx on lines 109..119

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

                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

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                    {
                      Header: msg`Integration`,
                      accessor: "integration",
                      filter: {
                        _type: "string",
                Severity: Major
                Found in src/frontend/views/entity/Actions/Base.tsx and 2 other locations - About 2 hrs to fix
                src/frontend/views/entity/Actions/Base.tsx on lines 98..108
                src/frontend/views/entity/Actions/Base.tsx on lines 109..119

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

                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

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                    {
                      Header: msg`Action`,
                      accessor: "action",
                      filter: {
                        _type: "string",
                Severity: Major
                Found in src/frontend/views/entity/Actions/Base.tsx and 2 other locations - About 2 hrs to fix
                src/frontend/views/entity/Actions/Base.tsx on lines 87..97
                src/frontend/views/entity/Actions/Base.tsx on lines 98..108

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

                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

                Function useFEPagination has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function useFEPagination<T>(
                  endPoint: string,
                  dataState: IPaginatedDataState<T>
                ): UseQueryResult<PaginatedData<T>> {
                  return useQuery<PaginatedData<T>>({
                Severity: Major
                Found in src/frontend/components/app/pagination-table/useFEPagination.ts - About 2 hrs to fix

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

                      <ViewStateMachine
                        loading={storageList.isLoading || activeStorageIntegration.isLoading}
                        error={storageList.error || activeStorageIntegration.error}
                        loader={
                          <FormSkeleton
                  Severity: Major
                  Found in src/frontend/views/integrations/storage/Credentials.tsx and 1 other location - About 2 hrs to fix
                  src/frontend/views/integrations/actions/index.tsx on lines 48..66

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

                  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

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

                          <ViewStateMachine
                            loading={integrationsList.isLoading || activeActionsList.isLoading}
                            error={integrationsList.error || activeActionsList.error}
                            loader={
                              <FormSkeleton
                  Severity: Major
                  Found in src/frontend/views/integrations/actions/index.tsx and 1 other location - About 2 hrs to fix
                  src/frontend/views/integrations/storage/Credentials.tsx on lines 63..101

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

                  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

                  Function GeneralStorageSettings has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function GeneralStorageSettings() {
                    const fileUploadSettings = useAppConfiguration("file_upload_settings");
                  
                    const upsertFileUploadSettingsMutation = useUpsertConfigurationMutation(
                      "file_upload_settings"
                  Severity: Major
                  Found in src/frontend/views/integrations/storage/General.tsx - About 2 hrs to fix

                    Function MenuSettings has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function MenuSettings() {
                      const domainMessages = useAppConfigurationDomainMessages(
                        "disabled_menu_entities"
                      );
                    
                    
                    Severity: Major
                    Found in src/frontend/views/settings/Menu/index.tsx - About 2 hrs to fix

                      Function CRUDDocumentation has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function CRUDDocumentation() {
                        return (
                          <DocumentationRoot>
                            <p>
                              This setting generally allows you to disable CRUD functionalities and
                      Severity: Major
                      Found in src/frontend/docs/crud.tsx - About 2 hrs to fix

                        File select.tsx has 264 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import type { MessageDescriptor } from "@lingui/core";
                        import { msg } from "@lingui/macro";
                        import { useLingui } from "@lingui/react";
                        import * as SelectPrimitive from "@radix-ui/react-select";
                        import * as React from "react";
                        Severity: Minor
                        Found in src/frontend/components/ui/select.tsx - About 2 hrs to fix

                          Function UsersLinkToDatabaseDocumentation has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function UsersLinkToDatabaseDocumentation() {
                            return (
                              <DocumentationRoot>
                                <p>
                                  Linking your DashPress users to your database allows you to write
                          Severity: Major
                          Found in src/frontend/docs/users-link-to-database.tsx - About 2 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language