RocketChat/Rocket.Chat

View on GitHub

Showing 8,169 of 8,169 total issues

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

class TestParser extends UiKitParserModal<unknown> {
    plain_text = (element: any, context: any, index: any): any => ({
        component: 'text',
        props: {
            key: index,
Severity: Major
Found in packages/ui-kit/src/surfaces/modal/UiKitParserModal.spec.ts and 1 other location - About 1 wk to fix
packages/ui-kit/src/surfaces/contextualBar/UiKitParserContextualBar.spec.ts on lines 7..251

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

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

class TestParser extends UiKitParserContextualBar<unknown> {
    plain_text = (element: any, context: any, index: any): any => ({
        component: 'text',
        props: {
            key: index,
packages/ui-kit/src/surfaces/modal/UiKitParserModal.spec.ts on lines 7..251

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

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

File emojis.ts has 4630 lines of code (exceeds 250 allowed). Consider refactoring.
Open

const emojis = {
    ':england:': '๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ',
    ':scotland:': '๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ',
    ':wales:': '๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ',
    ':men_holding_hands_medium_light_skin_tone_light_skin_tone:': '๐Ÿ‘จ๐Ÿผโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿป',
Severity: Major
Found in packages/livechat/src/lib/emoji/emojis.ts - About 1 wk to fix

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

    export const palette = [
        {
            category: 'Stroke',
            description: "Use as component's outline, stroke, dividers",
            list: [
    Severity: Major
    Found in ee/packages/ui-theming/src/palette.ts and 2 other locations - About 1 wk to fix
    ee/packages/ui-theming/src/paletteDark.ts on lines 1..195
    ee/packages/ui-theming/src/paletteHighContrast.ts on lines 1..195

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

    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

    export const palette = [
        {
            category: 'Stroke',
            description: "Use as component's outline, stroke, dividers",
            list: [
    Severity: Major
    Found in ee/packages/ui-theming/src/paletteHighContrast.ts and 2 other locations - About 1 wk to fix
    ee/packages/ui-theming/src/palette.ts on lines 1..195
    ee/packages/ui-theming/src/paletteDark.ts on lines 1..195

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

    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

    export const palette = [
        {
            category: 'Stroke',
            description: "Use as component's outline, stroke, dividers",
            list: [
    Severity: Major
    Found in ee/packages/ui-theming/src/paletteDark.ts and 2 other locations - About 1 wk to fix
    ee/packages/ui-theming/src/palette.ts on lines 1..195
    ee/packages/ui-theming/src/paletteHighContrast.ts on lines 1..195

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

    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

    describe('section', () => {
        it('renders text as plain_text', () => {
            const payload = [
                {
                    type: 'section',
    packages/ui-kit/src/surfaces/banner/UiKitParserBanner.spec.ts on lines 278..774
    packages/ui-kit/src/surfaces/contextualBar/UiKitParserContextualBar.spec.ts on lines 279..775
    packages/ui-kit/src/surfaces/message/UiKitParserMessage.spec.ts on lines 221..717
    packages/ui-kit/src/surfaces/modal/UiKitParserModal.spec.ts on lines 279..775

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

    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

    describe('section', () => {
        it('renders text as plain_text', () => {
            const payload = [
                {
                    type: 'section',
    packages/ui-kit/src/surfaces/attachment/UiKitParserAttachment.spec.ts on lines 221..717
    packages/ui-kit/src/surfaces/banner/UiKitParserBanner.spec.ts on lines 278..774
    packages/ui-kit/src/surfaces/message/UiKitParserMessage.spec.ts on lines 221..717
    packages/ui-kit/src/surfaces/modal/UiKitParserModal.spec.ts on lines 279..775

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

    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

    describe('section', () => {
        it('renders text as plain_text', () => {
            const payload = [
                {
                    type: 'section',
    packages/ui-kit/src/surfaces/attachment/UiKitParserAttachment.spec.ts on lines 221..717
    packages/ui-kit/src/surfaces/banner/UiKitParserBanner.spec.ts on lines 278..774
    packages/ui-kit/src/surfaces/contextualBar/UiKitParserContextualBar.spec.ts on lines 279..775
    packages/ui-kit/src/surfaces/message/UiKitParserMessage.spec.ts on lines 221..717

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

    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

    describe('section', () => {
        it('renders text as plain_text', () => {
            const payload = [
                {
                    type: 'section',
    packages/ui-kit/src/surfaces/attachment/UiKitParserAttachment.spec.ts on lines 221..717
    packages/ui-kit/src/surfaces/contextualBar/UiKitParserContextualBar.spec.ts on lines 279..775
    packages/ui-kit/src/surfaces/message/UiKitParserMessage.spec.ts on lines 221..717
    packages/ui-kit/src/surfaces/modal/UiKitParserModal.spec.ts on lines 279..775

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

    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

    describe('section', () => {
        it('renders text as plain_text', () => {
            const payload = [
                {
                    type: 'section',
    packages/ui-kit/src/surfaces/attachment/UiKitParserAttachment.spec.ts on lines 221..717
    packages/ui-kit/src/surfaces/banner/UiKitParserBanner.spec.ts on lines 278..774
    packages/ui-kit/src/surfaces/contextualBar/UiKitParserContextualBar.spec.ts on lines 279..775
    packages/ui-kit/src/surfaces/modal/UiKitParserModal.spec.ts on lines 279..775

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

    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

    class TestParser extends UiKitParserAttachment<unknown> {
        plain_text = (element: any, context: any, index: any): any => ({
            component: 'text',
            props: {
                key: index,
    packages/ui-kit/src/surfaces/message/UiKitParserMessage.spec.ts on lines 5..193

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

    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

    class TestParser extends UiKitParserMessage<unknown> {
        plain_text = (element: any, context: any, index: any): any => ({
            component: 'text',
            props: {
                key: index,
    packages/ui-kit/src/surfaces/attachment/UiKitParserAttachment.spec.ts on lines 5..193

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

    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

    File omnichannel.ts has 3497 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import type {
        IOmnichannelCannedResponse,
        ILivechatAgent,
        ILivechatDepartment,
        ILivechatDepartmentAgents,
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts - About 1 wk to fix

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

      describe('input', () => {
          it('renders multiline plain text input', () => {
              const payload = [
                  {
                      type: 'input',
      packages/ui-kit/src/surfaces/banner/UiKitParserBanner.spec.ts on lines 1377..1795
      packages/ui-kit/src/surfaces/modal/UiKitParserModal.spec.ts on lines 1378..1796

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

      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

      describe('input', () => {
          it('renders multiline plain text input', () => {
              const payload = [
                  {
                      type: 'input',
      packages/ui-kit/src/surfaces/contextualBar/UiKitParserContextualBar.spec.ts on lines 1378..1796
      packages/ui-kit/src/surfaces/modal/UiKitParserModal.spec.ts on lines 1378..1796

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

      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

      describe('input', () => {
          it('renders multiline plain text input', () => {
              const payload = [
                  {
                      type: 'input',
      packages/ui-kit/src/surfaces/banner/UiKitParserBanner.spec.ts on lines 1377..1795
      packages/ui-kit/src/surfaces/contextualBar/UiKitParserContextualBar.spec.ts on lines 1378..1796

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

      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

              statistics: {
                  // Users
                  totalUsers: 123,
                  onlineUsers: 23,
                  awayUsers: 32,
      apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.stories.tsx on lines 35..281

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

      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

              statistics: {
                  // Users
                  totalUsers: 123,
                  onlineUsers: 23,
                  awayUsers: 32,
      apps/meteor/client/views/admin/workspace/MessagesRoomsCard/MessagesRoomsCard.stories.tsx on lines 13..259

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

      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

      describe('actions', () => {
          it('renders all selects', () => {
              const payload = [
                  {
                      type: 'actions',
      packages/ui-kit/src/surfaces/attachment/UiKitParserAttachment.spec.ts on lines 795..1143
      packages/ui-kit/src/surfaces/contextualBar/UiKitParserContextualBar.spec.ts on lines 853..1201
      packages/ui-kit/src/surfaces/message/UiKitParserMessage.spec.ts on lines 795..1143
      packages/ui-kit/src/surfaces/modal/UiKitParserModal.spec.ts on lines 853..1201

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

      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