ElectronicBabylonianLiterature/ebl-frontend

View on GitHub

Showing 358 of 771 total issues

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

  test.each(cities)(
    'compareAssyriaAndBabylonia Babylonia and %s',
    (provenance) => {
      expect(
        compareAssyriaAndBabylonia(Provenances.Babylonia, provenance)
Severity: Major
Found in src/corpus/domain/provenance.test.ts and 1 other location - About 1 hr to fix
src/corpus/domain/provenance.test.ts on lines 69..79

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

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 default withData<
  unknown,
  {
    query: WordQuery
    wordService: WordService
Severity: Major
Found in src/dictionary/ui/search/WordSearch.tsx and 1 other location - About 1 hr to fix
src/bibliography/ui/BibliographySearch.tsx on lines 31..46

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

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 default withData<
  unknown,
  {
    bibliographyService: BibliographyService
    query: string
Severity: Major
Found in src/bibliography/ui/BibliographySearch.tsx and 1 other location - About 1 hr to fix
src/dictionary/ui/search/WordSearch.tsx on lines 27..38

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

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

  test.each(cities)(
    'compareAssyriaAndBabylonia Assyria and %s',
    (provenance) => {
      expect(
        compareAssyriaAndBabylonia(Provenances.Assyria, provenance)
Severity: Major
Found in src/corpus/domain/provenance.test.ts and 1 other location - About 1 hr to fix
src/corpus/domain/provenance.test.ts on lines 81..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 72.

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

test.each([
  [manuscriptLineDisplayFactory.build(), false],
  [manuscriptLineDisplayFactory.standardText().build(), true],
])('isStandardText', (line, expected) => {
  expect(line.isStandardText).toEqual(expected)
Severity: Major
Found in src/corpus/domain/ManuscriptLineDisplay.test.ts and 1 other location - About 1 hr to fix
src/corpus/domain/ManuscriptLineDisplay.test.ts on lines 69..74

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

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

function LMUIcon(): JSX.Element {
  return (
    <ExternalLink
      className="LMUIcon"
      href="https://www.lmu.de/de/index.html"
Severity: Major
Found in src/Introduction.tsx and 1 other location - About 1 hr to fix
src/Introduction.tsx on lines 11..25

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

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

test.each([
  [manuscriptLineDisplayFactory.build(), false],
  [manuscriptLineDisplayFactory.parallelText().build(), true],
])('isStandardText', (line, expected) => {
  expect(line.isParallelText).toEqual(expected)
Severity: Major
Found in src/corpus/domain/ManuscriptLineDisplay.test.ts and 1 other location - About 1 hr to fix
src/corpus/domain/ManuscriptLineDisplay.test.ts on lines 62..67

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

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

function InjectedApp(): JSX.Element {
  const authenticationService = useAuthentication()
  const apiClient = new ApiClient(authenticationService, errorReporter)
  const wordRepository = new WordRepository(apiClient)
  const signsRepository = new SignRepository(apiClient)
Severity: Minor
Found in src/index.tsx - About 1 hr to fix

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

    export function sealLink({ number }: { number: string }): JSX.Element {
      return (
        <ExternalNumberLink
          number={number}
          baseUrl={'https://seal.huji.ac.il/node/'}
    Severity: Major
    Found in src/fragmentarium/ui/info/ExternalNumberLink.tsx and 14 other locations - About 1 hr to fix
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 22..30
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 31..39
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 40..48
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 49..57
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 58..66
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 67..75
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 76..88
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 99..109
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 110..118
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 119..127
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 128..136
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 137..147
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 157..169
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 170..178

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

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

    export function HilprechtHeidelbergLink({
      number,
    }: {
      number: string
    }): JSX.Element {
    Severity: Major
    Found in src/fragmentarium/ui/info/ExternalNumberLink.tsx and 14 other locations - About 1 hr to fix
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 22..30
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 31..39
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 40..48
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 49..57
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 58..66
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 67..75
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 99..109
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 110..118
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 119..127
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 128..136
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 137..147
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 148..156
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 157..169
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 170..178

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

    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

      new Annotation(
        { type: 'RECTANGLE', x: 2, y: 2, width: 5, height: 5 },
        {
          id: '5',
          value: AnnotationTokenType.Blank,
    src/fragmentarium/ui/image-annotation/annotation-tool/automatic-alignment.test.ts on lines 124..133

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

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

    export function LouvreLink({ number }: { number: string }): JSX.Element {
      return (
        <ExternalNumberLink
          number={number}
          baseUrl={'https://collections.louvre.fr/ark:/53355/'}
    Severity: Major
    Found in src/fragmentarium/ui/info/ExternalNumberLink.tsx and 14 other locations - About 1 hr to fix
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 22..30
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 31..39
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 40..48
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 49..57
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 58..66
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 67..75
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 76..88
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 99..109
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 110..118
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 119..127
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 137..147
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 148..156
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 157..169
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 170..178

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

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

    export function alalahHpmLink({ number }: { number: string }): JSX.Element {
      return (
        <ExternalNumberLink
          number={number}
          baseUrl={
    Severity: Major
    Found in src/fragmentarium/ui/info/ExternalNumberLink.tsx and 14 other locations - About 1 hr to fix
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 22..30
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 31..39
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 40..48
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 49..57
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 58..66
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 67..75
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 76..88
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 99..109
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 110..118
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 119..127
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 128..136
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 148..156
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 157..169
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 170..178

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

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

    export function PhiladelphiaLink({ number }: { number: string }): JSX.Element {
      return (
        <ExternalNumberLink
          number={number}
          baseUrl={'https://www.penn.museum/collections/object/'}
    Severity: Major
    Found in src/fragmentarium/ui/info/ExternalNumberLink.tsx and 14 other locations - About 1 hr to fix
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 22..30
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 31..39
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 40..48
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 49..57
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 58..66
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 67..75
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 76..88
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 99..109
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 110..118
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 119..127
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 128..136
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 137..147
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 148..156
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 157..169

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

    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

      new Annotation(
        { type: 'RECTANGLE', x: 3, y: 2, width: 1, height: 1 },
        {
          id: '6',
          value: AnnotationTokenType.Blank,
    src/fragmentarium/ui/image-annotation/annotation-tool/automatic-alignment.test.ts on lines 114..123

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

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

    export function HilprechtJenaLink({ number }: { number: string }): JSX.Element {
      return (
        <ExternalNumberLink
          number={number}
          baseUrl={'https://hilprecht.mpiwg-berlin.mpg.de/object3d/'}
    Severity: Major
    Found in src/fragmentarium/ui/info/ExternalNumberLink.tsx and 14 other locations - About 1 hr to fix
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 22..30
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 31..39
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 40..48
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 49..57
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 58..66
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 76..88
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 99..109
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 110..118
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 119..127
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 128..136
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 137..147
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 148..156
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 157..169
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 170..178

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

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

    export function NabuccoLink({ number }: { number: string }): JSX.Element {
      return (
        <ExternalNumberLink
          number={number}
          baseUrl={'https://nabucco.acdh.oeaw.ac.at/archiv/tablet/detail/'}
    Severity: Major
    Found in src/fragmentarium/ui/info/ExternalNumberLink.tsx and 14 other locations - About 1 hr to fix
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 22..30
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 31..39
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 40..48
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 49..57
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 58..66
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 67..75
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 76..88
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 99..109
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 119..127
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 128..136
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 137..147
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 148..156
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 157..169
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 170..178

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

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

    export function australianinstituteofarchaeologyLink({
      number,
    }: {
      number: string
    }): JSX.Element {
    Severity: Major
    Found in src/fragmentarium/ui/info/ExternalNumberLink.tsx and 14 other locations - About 1 hr to fix
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 22..30
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 31..39
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 40..48
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 49..57
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 58..66
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 67..75
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 76..88
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 99..109
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 110..118
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 119..127
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 128..136
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 137..147
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 148..156
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 170..178

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

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

    export function CdliLink({ number }: { number: string }): JSX.Element {
      return (
        <ExternalNumberLink
          number={number}
          baseUrl={'https://cdli.mpiwg-berlin.mpg.de/'}
    Severity: Major
    Found in src/fragmentarium/ui/info/ExternalNumberLink.tsx and 14 other locations - About 1 hr to fix
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 22..30
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 40..48
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 49..57
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 58..66
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 67..75
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 76..88
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 99..109
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 110..118
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 119..127
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 128..136
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 137..147
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 148..156
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 157..169
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 170..178

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

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

    export function BdtnsLink({ number }: { number: string }): JSX.Element {
      return (
        <ExternalNumberLink
          number={number}
          baseUrl={'http://bdtns.filol.csic.es/'}
    Severity: Major
    Found in src/fragmentarium/ui/info/ExternalNumberLink.tsx and 14 other locations - About 1 hr to fix
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 22..30
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 31..39
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 49..57
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 58..66
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 67..75
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 76..88
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 99..109
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 110..118
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 119..127
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 128..136
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 137..147
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 148..156
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 157..169
    src/fragmentarium/ui/info/ExternalNumberLink.tsx on lines 170..178

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

    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