huridocs/uwazi

View on GitHub

Showing 620 of 3,621 total issues

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

    it('should mark when currentValue = suggestedValue, labeledValue are empty', () => {
      const values = <SuggestionValues>{
        currentValue: 'some value',
        date: 1234,
        labeledValue: '',
Severity: Major
Found in app/shared/specs/getIXSuggestionState.spec.ts and 8 other locations - About 2 hrs to fix
app/shared/specs/getIXSuggestionState.spec.ts on lines 5..26
app/shared/specs/getIXSuggestionState.spec.ts on lines 28..49
app/shared/specs/getIXSuggestionState.spec.ts on lines 51..72
app/shared/specs/getIXSuggestionState.spec.ts on lines 97..118
app/shared/specs/getIXSuggestionState.spec.ts on lines 143..164
app/shared/specs/getIXSuggestionState.spec.ts on lines 166..187
app/shared/specs/getIXSuggestionState.spec.ts on lines 189..210
app/shared/specs/getIXSuggestionState.spec.ts on lines 212..233

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

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

    it('should mark obsolete when modelCreationDate < date', () => {
      const values = <SuggestionValues>{
        currentValue: '',
        date: 1234,
        labeledValue: '',
Severity: Major
Found in app/shared/specs/getIXSuggestionState.spec.ts and 8 other locations - About 2 hrs to fix
app/shared/specs/getIXSuggestionState.spec.ts on lines 5..26
app/shared/specs/getIXSuggestionState.spec.ts on lines 28..49
app/shared/specs/getIXSuggestionState.spec.ts on lines 51..72
app/shared/specs/getIXSuggestionState.spec.ts on lines 97..118
app/shared/specs/getIXSuggestionState.spec.ts on lines 120..141
app/shared/specs/getIXSuggestionState.spec.ts on lines 143..164
app/shared/specs/getIXSuggestionState.spec.ts on lines 166..187
app/shared/specs/getIXSuggestionState.spec.ts on lines 189..210

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

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

const TemplatesCell = ({ cell }: CellContext<TableExtractor, TableExtractor['namedTemplates']>) => (
  <div className="flex flex-wrap gap-2">
    {cell.getValue().map(templateName => (
      <div key={templateName} className="whitespace-nowrap">
        <Pill color="gray">{templateName}</Pill>
Severity: Major
Found in app/react/V2/Routes/Settings/IX/components/TableElements.tsx and 1 other location - About 2 hrs to fix
app/react/V2/Routes/Settings/ParagraphExtraction/components/TableElements.tsx on lines 33..43

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

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

const TemplateFromCell = ({
  cell,
}: CellContext<TableExtractor, TableExtractor['templateFrom']>) => (
  <div className="flex flex-wrap gap-2">
    {cell.getValue().map(value => (
app/react/V2/Routes/Settings/IX/components/TableElements.tsx on lines 164..172

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

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

    it('should mark when currentValue has value and suggestedValue, labeledValue are empty', () => {
      const values = <SuggestionValues>{
        currentValue: 'some value',
        date: 1234,
        labeledValue: '',
Severity: Major
Found in app/shared/specs/getIXSuggestionState.spec.ts and 8 other locations - About 2 hrs to fix
app/shared/specs/getIXSuggestionState.spec.ts on lines 5..26
app/shared/specs/getIXSuggestionState.spec.ts on lines 28..49
app/shared/specs/getIXSuggestionState.spec.ts on lines 97..118
app/shared/specs/getIXSuggestionState.spec.ts on lines 120..141
app/shared/specs/getIXSuggestionState.spec.ts on lines 143..164
app/shared/specs/getIXSuggestionState.spec.ts on lines 166..187
app/shared/specs/getIXSuggestionState.spec.ts on lines 189..210
app/shared/specs/getIXSuggestionState.spec.ts on lines 212..233

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

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

  before(() => {
    const env = { DATABASE_NAME: 'uwazi_e2e', INDEX_NAME: 'uwazi_e2e' };
    cy.exec('yarn e2e-fixtures', { env });
    clearCookiesAndLogin();
    cy.get('.only-desktop a[aria-label="Settings"]').click();
Severity: Major
Found in cypress/e2e/settings/groups.cy.ts and 1 other location - About 2 hrs to fix
cypress/e2e/settings/users.cy.ts on lines 22..30

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

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

    it('should mark when currentValue != suggestedValue, labeledValue is not empty', () => {
      const values = <SuggestionValues>{
        currentValue: 'some other value',
        date: 1234,
        labeledValue: 'some other value',
Severity: Major
Found in app/shared/specs/getIXSuggestionState.spec.ts and 8 other locations - About 2 hrs to fix
app/shared/specs/getIXSuggestionState.spec.ts on lines 5..26
app/shared/specs/getIXSuggestionState.spec.ts on lines 28..49
app/shared/specs/getIXSuggestionState.spec.ts on lines 51..72
app/shared/specs/getIXSuggestionState.spec.ts on lines 97..118
app/shared/specs/getIXSuggestionState.spec.ts on lines 120..141
app/shared/specs/getIXSuggestionState.spec.ts on lines 143..164
app/shared/specs/getIXSuggestionState.spec.ts on lines 189..210
app/shared/specs/getIXSuggestionState.spec.ts on lines 212..233

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

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

              <Tabs.Tab id="css" label={<Translate>Custom CSS</Translate>}>
                <CodeEditor
                  language="css"
                  intialValue={customCSS}
                  onMount={editor => {
Severity: Major
Found in app/react/V2/Routes/Settings/Customization/Customization.tsx and 1 other location - About 2 hrs to fix
app/react/V2/Routes/Settings/Customization/Customization.tsx on lines 80..91

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

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

  before(() => {
    const env = { DATABASE_NAME: 'uwazi_e2e', INDEX_NAME: 'uwazi_e2e' };
    cy.exec('yarn e2e-fixtures', { env });
    clearCookiesAndLogin();
    cy.get('.only-desktop a[aria-label="Settings"]').click();
Severity: Major
Found in cypress/e2e/settings/users.cy.ts and 1 other location - About 2 hrs to fix
cypress/e2e/settings/groups.cy.ts on lines 13..21

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

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

              <Tabs.Tab id="js" label={<Translate>Custom JS</Translate>}>
                <CodeEditor
                  language="javascript"
                  intialValue={customJS}
                  onMount={editor => {
Severity: Major
Found in app/react/V2/Routes/Settings/Customization/Customization.tsx and 1 other location - About 2 hrs to fix
app/react/V2/Routes/Settings/Customization/Customization.tsx on lines 67..78

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

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

    it('should mark when currentValue != suggestedValue, labeledValue is empty', () => {
      const values = <SuggestionValues>{
        currentValue: '',
        date: 1234,
        labeledValue: '',
Severity: Major
Found in app/shared/specs/getIXSuggestionState.spec.ts and 8 other locations - About 2 hrs to fix
app/shared/specs/getIXSuggestionState.spec.ts on lines 5..26
app/shared/specs/getIXSuggestionState.spec.ts on lines 28..49
app/shared/specs/getIXSuggestionState.spec.ts on lines 51..72
app/shared/specs/getIXSuggestionState.spec.ts on lines 97..118
app/shared/specs/getIXSuggestionState.spec.ts on lines 120..141
app/shared/specs/getIXSuggestionState.spec.ts on lines 143..164
app/shared/specs/getIXSuggestionState.spec.ts on lines 166..187
app/shared/specs/getIXSuggestionState.spec.ts on lines 212..233

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

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

    it('should mark when suggestedValue, labeledValue and currentValue are empty', () => {
      const values = <SuggestionValues>{
        currentValue: '',
        date: 1234,
        labeledValue: '',
Severity: Major
Found in app/shared/specs/getIXSuggestionState.spec.ts and 8 other locations - About 2 hrs to fix
app/shared/specs/getIXSuggestionState.spec.ts on lines 28..49
app/shared/specs/getIXSuggestionState.spec.ts on lines 51..72
app/shared/specs/getIXSuggestionState.spec.ts on lines 97..118
app/shared/specs/getIXSuggestionState.spec.ts on lines 120..141
app/shared/specs/getIXSuggestionState.spec.ts on lines 143..164
app/shared/specs/getIXSuggestionState.spec.ts on lines 166..187
app/shared/specs/getIXSuggestionState.spec.ts on lines 189..210
app/shared/specs/getIXSuggestionState.spec.ts on lines 212..233

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

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

  it('should render the radio buttons', () => {
    render();
    const optionElements = component.find('input[type="radio"]');

    expect(optionElements.length).toBe(2);
Severity: Major
Found in app/react/Forms/components/specs/RadioButtons.spec.js and 2 other locations - About 1 hr to fix
app/react/Forms/components/specs/MultiSelect.spec.js on lines 248..255
app/react/Forms/components/specs/MultiSelect.spec.js on lines 282..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 119.

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

const GeolocationPropertyIcon = ({ className }: CustomIconProps) => (
  <svg
    className={className || ''}
    xmlns="http://www.w3.org/2000/svg"
    fill="none"
app/react/V2/Components/CustomIcons/IDPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/ImagePropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/LinkPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/MarkdownPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/MediaPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/PreviewPropertyIcon.tsx on lines 4..17

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

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

const ImagePropertyIcon = ({ className }: CustomIconProps) => (
  <svg
    className={className || ''}
    xmlns="http://www.w3.org/2000/svg"
    fill="none"
Severity: Major
Found in app/react/V2/Components/CustomIcons/ImagePropertyIcon.tsx and 6 other locations - About 1 hr to fix
app/react/V2/Components/CustomIcons/GeolocationPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/IDPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/LinkPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/MarkdownPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/MediaPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/PreviewPropertyIcon.tsx on lines 4..17

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

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

const IDPropertyIcon = ({ className }: CustomIconProps) => (
  <svg
    className={className || ''}
    xmlns="http://www.w3.org/2000/svg"
    fill="none"
Severity: Major
Found in app/react/V2/Components/CustomIcons/IDPropertyIcon.tsx and 6 other locations - About 1 hr to fix
app/react/V2/Components/CustomIcons/GeolocationPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/ImagePropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/LinkPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/MarkdownPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/MediaPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/PreviewPropertyIcon.tsx on lines 4..17

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

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

      {
        name: 'relationshipProp1',
        type: 'newRelationship',
        label: 'relationshipProp1',
        query: [
app/api/relationships.v2/services/specs/DenormalizationService.spec.ts on lines 234..260

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

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

const LinkPropertyIcon = ({ className }: CustomIconProps) => (
  <svg
    className={className || ''}
    xmlns="http://www.w3.org/2000/svg"
    fill="none"
Severity: Major
Found in app/react/V2/Components/CustomIcons/LinkPropertyIcon.tsx and 6 other locations - About 1 hr to fix
app/react/V2/Components/CustomIcons/GeolocationPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/IDPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/ImagePropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/MarkdownPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/MediaPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/PreviewPropertyIcon.tsx on lines 4..17

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

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

const MediaPropertyIcon = ({ className }: CustomIconProps) => (
  <svg
    className={className || ''}
    xmlns="http://www.w3.org/2000/svg"
    fill="none"
Severity: Major
Found in app/react/V2/Components/CustomIcons/MediaPropertyIcon.tsx and 6 other locations - About 1 hr to fix
app/react/V2/Components/CustomIcons/GeolocationPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/IDPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/ImagePropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/LinkPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/MarkdownPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/PreviewPropertyIcon.tsx on lines 4..17

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

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

const PreviewPropertyIcon = ({ className }: CustomIconProps) => (
  <svg
    className={className || ''}
    xmlns="http://www.w3.org/2000/svg"
    fill="none"
app/react/V2/Components/CustomIcons/GeolocationPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/IDPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/ImagePropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/LinkPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/MarkdownPropertyIcon.tsx on lines 4..17
app/react/V2/Components/CustomIcons/MediaPropertyIcon.tsx on lines 4..17

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

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