dashpresshq/dashpress

View on GitHub

Showing 459 of 459 total issues

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

export function BaseEntityForm({
  entity,
  initialValuesData,
  crudAction,
  allOptional,
Severity: Major
Found in src/frontend/views/data/_BaseEntityForm.tsx and 1 other location - About 1 hr to fix
src/frontend/components/ui/select.tsx on lines 182..288

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

export function Select({
  onChange,
  options: fullOptions,
  disabled,
  isLoading,
Severity: Major
Found in src/frontend/components/ui/select.tsx and 1 other location - About 1 hr to fix
src/frontend/views/data/_BaseEntityForm.tsx on lines 57..179

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

Function do has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  do: async (config: IActionConfig, messageConfig: IConfig) => {
    return await makeIntegrationRequest("POST", {
      url: `https://api.sendgrid.com/v3/mail/send`,
      body: JSON.stringify({
        personalizations: [
Severity: Minor
Found in src/backend/integrations/libs/sendgrid/sendMail.ts - About 1 hr to fix

    Function EntityCrudSettings has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function EntityCrudSettings() {
      const tabFromUrl = useRouteParam("tab");
      const changeTabParam = useChangeRouterParam("tab");
      const entity = useEntitySlug();
    
    
    Severity: Minor
    Found in src/frontend/views/entity/Crud/index.tsx - About 1 hr to fix

      Function getEntityRelationsForUserRole has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        async getEntityRelationsForUserRole(
          entity: string,
          userRole: string
        ): Promise<IEntityRelation[]> {
          const [validRelations, entityLabels, entityOrders] = await Promise.all([
      Severity: Minor
      Found in src/backend/entities/entities.service.ts - About 1 hr to fix

        Function Template has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const Template: Story<ITableProps<unknown>> = (args) => {
          const [paginatedDataState, setPaginatedDataState] = useState<
            IPaginatedDataState<any>
          >({ ...DEFAULT_TABLE_STATE });
        
        
        Severity: Minor
        Found in src/frontend/components/app/table/Stories.tsx - About 1 hr to fix

          Function ConfirmAlert has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function ConfirmAlert() {
            const { _ } = useLingui();
            const [title, action, onClose] = useConfirmAlertStore((store) => [
              store.title,
              store.action,
          Severity: Minor
          Found in src/frontend/components/app/confirm-alert.tsx - About 1 hr to fix

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

            export const TWILIO_ACTION_INTEGRATION: IActionIntegrationsImplemention = {
              title: "Twilio",
              description: "Send SMS through Twilio",
              configurationSchema: CONFIGURATION_SCHEMA,
              connect: async (config: IActionConfig) => config,
            Severity: Major
            Found in src/backend/integrations/libs/twilio/index.ts and 5 other locations - About 1 hr to fix
            src/backend/integrations/libs/mailgun/index.ts on lines 30..38
            src/backend/integrations/libs/postmark/index.ts on lines 21..29
            src/backend/integrations/libs/sendgrid/index.ts on lines 21..29
            src/backend/integrations/libs/sendinblue/index.ts on lines 21..29
            src/backend/integrations/libs/slack/index.ts on lines 21..29

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

            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

            export const MAIL_GUN_ACTION_INTEGRATION: IActionIntegrationsImplemention = {
              title: "Mail Gun",
              description: "Send emails through Mailgun",
              configurationSchema: CONFIGURATION_SCHEMA,
              connect: async (config: IActionConfig) => config,
            Severity: Major
            Found in src/backend/integrations/libs/mailgun/index.ts and 5 other locations - About 1 hr to fix
            src/backend/integrations/libs/postmark/index.ts on lines 21..29
            src/backend/integrations/libs/sendgrid/index.ts on lines 21..29
            src/backend/integrations/libs/sendinblue/index.ts on lines 21..29
            src/backend/integrations/libs/slack/index.ts on lines 21..29
            src/backend/integrations/libs/twilio/index.ts on lines 31..39

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

            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

            export const SENDINBLUE_ACTION_INTEGRATION: IActionIntegrationsImplemention = {
              title: "SendInBlue",
              description: "Send emails through SendInBlue",
              configurationSchema: CONFIGURATION_SCHEMA,
              connect: async (config: IActionConfig) => config,
            Severity: Major
            Found in src/backend/integrations/libs/sendinblue/index.ts and 5 other locations - About 1 hr to fix
            src/backend/integrations/libs/mailgun/index.ts on lines 30..38
            src/backend/integrations/libs/postmark/index.ts on lines 21..29
            src/backend/integrations/libs/sendgrid/index.ts on lines 21..29
            src/backend/integrations/libs/slack/index.ts on lines 21..29
            src/backend/integrations/libs/twilio/index.ts on lines 31..39

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

            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={userToDatabaseLink.isLoading}
                        error={userToDatabaseLink.error}
                        loader={
                          <FormSkeleton
            Severity: Major
            Found in src/frontend/views/users/DatabaseLink/index.tsx and 1 other location - About 1 hr to fix
            src/frontend/views/settings/Data/index.tsx on lines 42..69

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

            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

            export const SEND_GRID_ACTION_INTEGRATION: IActionIntegrationsImplemention = {
              title: "SendGrid",
              description: "Send emails through SendGrid",
              configurationSchema: CONFIGURATION_SCHEMA,
              connect: async (config: IActionConfig) => config,
            Severity: Major
            Found in src/backend/integrations/libs/sendgrid/index.ts and 5 other locations - About 1 hr to fix
            src/backend/integrations/libs/mailgun/index.ts on lines 30..38
            src/backend/integrations/libs/postmark/index.ts on lines 21..29
            src/backend/integrations/libs/sendinblue/index.ts on lines 21..29
            src/backend/integrations/libs/slack/index.ts on lines 21..29
            src/backend/integrations/libs/twilio/index.ts on lines 31..39

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

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

            function AlertDialogFooter({
              className,
              ...props
            }: React.HTMLAttributes<HTMLDivElement>) {
              return (
            Severity: Major
            Found in src/frontend/components/ui/alert-dialog.tsx and 4 other locations - About 1 hr to fix
            src/frontend/components/ui/alert-dialog.tsx on lines 46..59
            src/frontend/components/ui/dialog.tsx on lines 54..67
            src/frontend/components/ui/dialog.tsx on lines 70..83
            src/frontend/components/ui/dropdown-menu.tsx on lines 124..134

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

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

            function DropdownMenuShortcut({
              className,
              ...props
            }: React.HTMLAttributes<HTMLSpanElement>) {
              return (
            Severity: Major
            Found in src/frontend/components/ui/dropdown-menu.tsx and 4 other locations - About 1 hr to fix
            src/frontend/components/ui/alert-dialog.tsx on lines 46..59
            src/frontend/components/ui/alert-dialog.tsx on lines 62..75
            src/frontend/components/ui/dialog.tsx on lines 54..67
            src/frontend/components/ui/dialog.tsx on lines 70..83

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

            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

            export const POST_MARK_ACTION_INTEGRATION: IActionIntegrationsImplemention = {
              title: "Postmark",
              description: "Send emails through Postmark",
              configurationSchema: CONFIGURATION_SCHEMA,
              connect: async (config: IActionConfig) => config,
            Severity: Major
            Found in src/backend/integrations/libs/postmark/index.ts and 5 other locations - About 1 hr to fix
            src/backend/integrations/libs/mailgun/index.ts on lines 30..38
            src/backend/integrations/libs/sendgrid/index.ts on lines 21..29
            src/backend/integrations/libs/sendinblue/index.ts on lines 21..29
            src/backend/integrations/libs/slack/index.ts on lines 21..29
            src/backend/integrations/libs/twilio/index.ts on lines 31..39

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

            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={metaDataColumns.isLoading}
                    error={metaDataColumns.error}
                    loader={
                      <FormSkeleton
            Severity: Major
            Found in src/frontend/views/settings/Data/index.tsx and 1 other location - About 1 hr to fix
            src/frontend/views/users/DatabaseLink/index.tsx on lines 98..114

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

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

            function AlertDialogHeader({
              className,
              ...props
            }: React.HTMLAttributes<HTMLDivElement>) {
              return (
            Severity: Major
            Found in src/frontend/components/ui/alert-dialog.tsx and 4 other locations - About 1 hr to fix
            src/frontend/components/ui/alert-dialog.tsx on lines 62..75
            src/frontend/components/ui/dialog.tsx on lines 54..67
            src/frontend/components/ui/dialog.tsx on lines 70..83
            src/frontend/components/ui/dropdown-menu.tsx on lines 124..134

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

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

            function DialogFooter({
              className,
              ...props
            }: React.HTMLAttributes<HTMLDivElement>) {
              return (
            Severity: Major
            Found in src/frontend/components/ui/dialog.tsx and 4 other locations - About 1 hr to fix
            src/frontend/components/ui/alert-dialog.tsx on lines 46..59
            src/frontend/components/ui/alert-dialog.tsx on lines 62..75
            src/frontend/components/ui/dialog.tsx on lines 54..67
            src/frontend/components/ui/dropdown-menu.tsx on lines 124..134

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

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

            function DialogHeader({
              className,
              ...props
            }: React.HTMLAttributes<HTMLDivElement>) {
              return (
            Severity: Major
            Found in src/frontend/components/ui/dialog.tsx and 4 other locations - About 1 hr to fix
            src/frontend/components/ui/alert-dialog.tsx on lines 46..59
            src/frontend/components/ui/alert-dialog.tsx on lines 62..75
            src/frontend/components/ui/dialog.tsx on lines 70..83
            src/frontend/components/ui/dropdown-menu.tsx on lines 124..134

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

            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

            export const SLACK_ACTION_INTEGRATION: IActionIntegrationsImplemention = {
              title: "Slack",
              description: "Send messages to your Slack channels",
              configurationSchema: CONFIGURATION_SCHEMA,
              connect: async (config: IActionConfig) => config,
            Severity: Major
            Found in src/backend/integrations/libs/slack/index.ts and 5 other locations - About 1 hr to fix
            src/backend/integrations/libs/mailgun/index.ts on lines 30..38
            src/backend/integrations/libs/postmark/index.ts on lines 21..29
            src/backend/integrations/libs/sendgrid/index.ts on lines 21..29
            src/backend/integrations/libs/sendinblue/index.ts on lines 21..29
            src/backend/integrations/libs/twilio/index.ts on lines 31..39

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

            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