dashpresshq/dashpress

View on GitHub

Showing 459 of 459 total issues

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

          <Field name="examplePassword" validateFields={[]} validate={required}>
            {(formProps) => (
              <FormPasswordInput
                label={fakeMessageDescriptor("Example Password Input")}
                {...formProps}
Severity: Major
Found in src/frontend/components/app/form/input/Stories.tsx and 5 other locations - About 1 hr to fix
src/frontend/components/app/form/input/Stories.tsx on lines 59..66
src/frontend/components/app/form/input/Stories.tsx on lines 223..230
src/frontend/components/app/form/input/Stories.tsx on lines 242..249
src/frontend/components/app/form/input/Stories.tsx on lines 261..268
src/frontend/components/app/form/input/Stories.tsx on lines 280..287

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

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

                        <Field
                          name={`${name}.errorMessage.message`}
                          validate={composeValidators(
                            required,
                            maxLength(ERROR_MESSAGE_LENGTH)
Severity: Major
Found in src/frontend/views/entity/Fields/FieldsValidation.tsx and 2 other locations - About 1 hr to fix
src/frontend/views/entity/Fields/FieldsSelection.tsx on lines 121..134
src/frontend/views/entity/Views/Form.tsx on lines 104..117

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

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

                        <Field
                          name={`${name}.label.message`}
                          validate={required}
                          validateFields={[]}
                        >
Severity: Major
Found in src/frontend/views/entity/Fields/FieldsSelection.tsx and 2 other locations - About 1 hr to fix
src/frontend/views/entity/Fields/FieldsValidation.tsx on lines 132..148
src/frontend/views/entity/Views/Form.tsx on lines 104..117

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

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

Loading.args = {
  tableData: {
    data: {
      data: [],
      pageIndex: 1,
Severity: Major
Found in src/frontend/components/app/table/Stories.tsx and 1 other location - About 1 hr to fix
src/frontend/components/app/table/Stories.tsx on lines 83..95

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

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

export function ManageVariables() {
  useSetPageDetails({
    pageTitle: ManageVariablesPageTitle,
    viewKey: ACTIONS_VIEW_KEY,
    permission: UserPermissions.CAN_MANAGE_APP_CREDENTIALS,
Severity: Major
Found in src/frontend/views/integrations/Variables/index.tsx and 1 other location - About 1 hr to fix
src/frontend/views/settings/Variables/index.tsx on lines 8..20

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

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 6 locations. Consider refactoring.
Open

          <Field name="exampleText" validateFields={[]} validate={required}>
            {(formProps) => (
              <FormInput
                label={fakeMessageDescriptor("Example Text Input")}
                {...formProps}
Severity: Major
Found in src/frontend/components/app/form/input/Stories.tsx and 5 other locations - About 1 hr to fix
src/frontend/components/app/form/input/Stories.tsx on lines 68..75
src/frontend/components/app/form/input/Stories.tsx on lines 223..230
src/frontend/components/app/form/input/Stories.tsx on lines 242..249
src/frontend/components/app/form/input/Stories.tsx on lines 261..268
src/frontend/components/app/form/input/Stories.tsx on lines 280..287

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

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

                  <Field
                    name={`${field}.title`}
                    validate={composeValidators(required, maxLength(64))}
                    validateFields={[]}
                  >
Severity: Major
Found in src/frontend/views/entity/Views/Form.tsx and 2 other locations - About 1 hr to fix
src/frontend/views/entity/Fields/FieldsSelection.tsx on lines 121..134
src/frontend/views/entity/Fields/FieldsValidation.tsx on lines 132..148

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

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

Empty.args = {
  tableData: {
    data: {
      data: [],
      pageIndex: 1,
Severity: Major
Found in src/frontend/components/app/table/Stories.tsx and 1 other location - About 1 hr to fix
src/frontend/components/app/table/Stories.tsx on lines 113..125

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

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 EntityFormActionsSettings has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function EntityFormActionsSettings() {
  const entity = useEntitySlug();
  const domainMessages = useDomainMessages(
    LANG_DOMAINS.INTEGRATIONS.FORM_ACTIONS
  );
Severity: Minor
Found in src/frontend/views/entity/Actions/index.tsx - About 1 hr to fix

    Function isAuthenticatedValidationImpl has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const isAuthenticatedValidationImpl: ValidationImplType<void> = async (
      req,
      protectedRoute: boolean
    ) => {
      try {

      Function useEntityReferenceCount has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const useEntityReferenceCount = (
        entities: string[],
        reference: { entity: string; entityId: string }
      ) => {
        const multipleEntityReferenceFields =
      Severity: Minor
      Found in src/frontend/hooks/data/data.store.ts - About 1 hr to fix

        Function delete has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          async delete(
            entity: string,
            id: string,
            accountProfile: IAccountProfile
          ): Promise<void> {
        Severity: Minor
        Found in src/backend/data/data.service.ts - About 1 hr to fix

          Function useRevealedCredentialsList has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const useRevealedCredentialsList = (
            group: IntegrationsConfigurationGroup
          ) => {
            const rootPassword = usePasswordStore((state) => state.password);
            const queryClient = useQueryClient();
          Severity: Minor
          Found in src/frontend/views/settings/Variables/configurations.store.ts - About 1 hr to fix

            Function buildFilterConfigFromType has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const buildFilterConfigFromType = (prop: {
              entityType: FormFieldTypes;
              entityFieldSelections: IColorableSelection[];
              isIdField: boolean;
              referenceField?: string;
            Severity: Minor
            Found in src/frontend/views/data/Table/useTableColumns.tsx - About 1 hr to fix

              Function PersistentDocumentation has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function PersistentDocumentation() {
                return (
                  <DocumentationRoot>
                    <p>
                      Persistent query is used to define a set of queries that are persisted
              Severity: Minor
              Found in src/frontend/docs/persistent-query.tsx - About 1 hr to fix

                Function doesPermissionAllowPermission has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const doesPermissionAllowPermission = (
                  permissions: string[],
                  requiredPermission: string,
                  checkGranular: boolean
                ): boolean => {
                Severity: Minor
                Found in src/shared/logic/permissions/index.ts - About 1 hr to fix

                  Function getRelationshipSettings has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    async getRelationshipSettings(entity: string): Promise<{
                      format: string;
                      fields: string[];
                    }> {
                      const relationshipSettings = await this._configurationApiService.show(
                  Severity: Minor
                  Found in src/backend/data/data.service.ts - About 1 hr to fix

                    Function rgbToOklch has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const rgbToOklch = (rgb: TRGB): TLCH => {
                        const r = rgb.r / 255;
                        const g = rgb.g / 255;
                        const b = rgb.b / 255;
                    
                    
                    Severity: Minor
                    Found in src/frontend/lib/colors/conversion.ts - About 1 hr to fix

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

                                <li>
                                  Secrets -{" "}
                                  <code>
                                    {`{{`} {INTEGRATIONS_GROUP_CONFIG.credentials.prefix}.ENTRY {`}}`}
                                  </code>
                      Severity: Major
                      Found in src/frontend/docs/form-integrations.tsx and 1 other location - About 1 hr to fix
                      src/frontend/docs/form-integrations.tsx on lines 72..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 59.

                      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

                                <li>
                                  Constants -{" "}
                                  <code>
                                    {`{{`} {INTEGRATIONS_GROUP_CONFIG.constants.prefix}.ENTRY {`}}`}
                                  </code>
                      Severity: Major
                      Found in src/frontend/docs/form-integrations.tsx and 1 other location - About 1 hr to fix
                      src/frontend/docs/form-integrations.tsx on lines 66..71

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

                      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