ElectronicBabylonianLiterature/ebl-frontend

View on GitHub

Showing 358 of 771 total issues

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

export function ArchibabLink({ number }: { number: string }): JSX.Element {
  return (
    <ExternalNumberLink
      number={number}
      baseUrl={'http://www.archibab.fr/'}
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 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

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

  const notesHtml: JQuery = $(
    renderToString(
      <DictionaryContext.Provider value={wordService}>
        <TransliterationNotes notes={fragment.text.notes} />
      </DictionaryContext.Provider>
Severity: Major
Found in src/fragmentarium/ui/fragment/WordExport.tsx and 1 other location - About 1 hr to fix
src/fragmentarium/ui/fragment/PdfExport.tsx on lines 38..44

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

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

  const notesHtml: JQuery = $(
    renderToString(
      <DictionaryContext.Provider value={wordService}>
        <TransliterationNotes notes={fragment.text.notes} />
      </DictionaryContext.Provider>
Severity: Major
Found in src/fragmentarium/ui/fragment/PdfExport.tsx and 1 other location - About 1 hr to fix
src/fragmentarium/ui/fragment/WordExport.tsx on lines 61..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 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 BmIdLink({ number }: { number: string }): JSX.Element {
  return (
    <ExternalNumberLink
      number={number}
      baseUrl={'https://www.britishmuseum.org/collection/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 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
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 UrOnlineLink({ number }: { number: string }): JSX.Element {
  return (
    <ExternalNumberLink
      number={number}
      baseUrl={'http://www.ur-online.org/subject/'}
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 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 AchemenetLink({ 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 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 MetropolitanLink({ number }: { number: string }): JSX.Element {
  return (
    <ExternalNumberLink
      number={number}
      baseUrl={'https://www.metmuseum.org/art/collection/search/'}
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 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

Function listController has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function listController(ListView) {
  return function ListController({
    value,
    children,
    onChange,
Severity: Minor
Found in src/common/List.tsx - About 1 hr to fix

    Function dealWithFootNotesHtml has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function dealWithFootNotesHtml(
      el: HTMLElement | Text | Comment | Document,
      doc: jsPDF,
      xPos: number,
      yPos: number
    Severity: Minor
    Found in src/fragmentarium/ui/fragment/PdfExport.tsx - About 1 hr to fix

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

              <Row>
                <Col className={'text-right'}>
                  <TwitterIcon />
                </Col>
                <Col className={'text-left'}>
      Severity: Major
      Found in src/Introduction.tsx and 1 other location - About 1 hr to fix
      src/Introduction.tsx on lines 125..132

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

      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

              <Row>
                <Col className={'text-right'}>
                  <LMUIcon />
                </Col>
                <Col className={'text-left'}>
      Severity: Major
      Found in src/Introduction.tsx and 1 other location - About 1 hr to fix
      src/Introduction.tsx on lines 133..140

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

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

      export const signFactory = Factory.define<Sign>(() => {
        return new Sign({
          name: chance.pickone(['BA', 'BAD', 'BAR', 'PI']),
          lists: chance.pickone([
            [{ name: 'MESZL', number: '1' }],
      Severity: Minor
      Found in src/test-support/sign-fixtures.ts - About 1 hr to fix

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

        async function renderWordSearch(): Promise<void> {
          render(
            <MemoryRouter>
              <WordSearch query={query} wordService={wordService} />
            </MemoryRouter>
        Severity: Major
        Found in src/dictionary/ui/search/WordSearch.test.tsx and 2 other locations - About 1 hr to fix
        src/bibliography/ui/BibliographySearch.test.tsx on lines 15..25
        src/signs/ui/search/SignSearch.test.tsx on lines 27..34

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

        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

        async function renderWordSearch(): Promise<void> {
          render(
            <MemoryRouter>
              <BibliographySearch
                query={query}
        Severity: Major
        Found in src/bibliography/ui/BibliographySearch.test.tsx and 2 other locations - About 1 hr to fix
        src/dictionary/ui/search/WordSearch.test.tsx on lines 14..21
        src/signs/ui/search/SignSearch.test.tsx on lines 27..34

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

        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

          searchLemma(lemma: string): Bluebird<readonly Word[]> {
            return _.isEmpty(lemma)
              ? Bluebird.resolve([])
              : this.wordRepository.searchLemma(lemma)
          }
        Severity: Major
        Found in src/fragmentarium/application/FragmentService.ts and 1 other location - About 1 hr to fix
        src/dictionary/application/WordService.ts on lines 35..39

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 67.

        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

          constructor(data: ImageDollarLineDto) {
            super(data)
            this.number = data.number
            this.letter = data.letter
            this.text = data.text
        Severity: Major
        Found in src/transliteration/domain/dollar-lines.ts and 1 other location - About 1 hr to fix
        src/transliteration/domain/at-lines.ts on lines 137..142

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

        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(makePairs(realProvenances))('%s and %s', (first, second) => {
            expect(compareStandardText(first, second)).toEqual(0)
            expect(compareStandardText(second, first)).toEqual(0)
          })
        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 93..99

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

        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

          searchLemma(lemma: string): Promise<readonly Word[]> {
            return _.isEmpty(lemma)
              ? Promise.resolve([])
              : this.wordRepository.searchLemma(lemma)
          }
        Severity: Major
        Found in src/dictionary/application/WordService.ts and 1 other location - About 1 hr to fix
        src/fragmentarium/application/FragmentService.ts on lines 314..318

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

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

        export default function automaticAlignment(
          tokens: readonly (readonly AnnotationToken[])[],
          annotation: Annotation,
          annotations: readonly Annotation[]
        ): readonly Annotation[] {

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

          async function renderSignSearch(): Promise<void> {
            render(
              <MemoryRouter>
                <SignsSearch signQuery={query} signService={signService} />
              </MemoryRouter>
          Severity: Major
          Found in src/signs/ui/search/SignSearch.test.tsx and 2 other locations - About 1 hr to fix
          src/bibliography/ui/BibliographySearch.test.tsx on lines 15..25
          src/dictionary/ui/search/WordSearch.test.tsx on lines 14..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 67.

          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