nalgeon/iuliia-js

View on GitHub

Showing 16 of 16 total issues

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

export default {
    name: "ungegn_1987",
    description: "UNGEGN 1987 V/18 transliteration schema",
    url: "https://iuliia.ru/ungegn-1987/",
    mapping: {
Severity: Major
Found in src/generated/ungegn_1987.ts and 1 other location - About 1 day to fix
src/generated/gost_52535.ts on lines 3..52

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

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 {
    name: "gost_52535",
    description: "GOST R 52535.1-2006 transliteration schema",
    url: "https://iuliia.ru/gost-52535/",
    mapping: {
Severity: Major
Found in src/generated/gost_52535.ts and 1 other location - About 1 day to fix
src/generated/ungegn_1987.ts on lines 3..55

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

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

export default {
    name: "telegram",
    description: "Telegram transliteration schema",
    url: "https://iuliia.ru/telegram/",
    mapping: {
Severity: Major
Found in src/generated/telegram.ts and 8 other locations - About 1 day to fix
src/generated/ala_lc.ts on lines 3..51
src/generated/ala_lc_alt.ts on lines 3..51
src/generated/gost_16876.ts on lines 3..51
src/generated/gost_16876_alt.ts on lines 3..51
src/generated/iso_9_1954.ts on lines 3..51
src/generated/iso_9_1968.ts on lines 3..51
src/generated/iso_9_1968_alt.ts on lines 3..51
src/generated/scientific.ts on lines 3..51

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

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

export default {
    name: "iso_9_1968",
    description: "ISO/R 9:1968 transliteration schema",
    url: "https://iuliia.ru/iso-9-1968/",
    mapping: {
Severity: Major
Found in src/generated/iso_9_1968.ts and 8 other locations - About 1 day to fix
src/generated/ala_lc.ts on lines 3..51
src/generated/ala_lc_alt.ts on lines 3..51
src/generated/gost_16876.ts on lines 3..51
src/generated/gost_16876_alt.ts on lines 3..51
src/generated/iso_9_1954.ts on lines 3..51
src/generated/iso_9_1968_alt.ts on lines 3..51
src/generated/scientific.ts on lines 3..51
src/generated/telegram.ts on lines 3..51

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

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

export default {
    name: "scientific",
    description: "Scientific transliteration schema",
    url: "https://iuliia.ru/scientific/",
    mapping: {
Severity: Major
Found in src/generated/scientific.ts and 8 other locations - About 1 day to fix
src/generated/ala_lc.ts on lines 3..51
src/generated/ala_lc_alt.ts on lines 3..51
src/generated/gost_16876.ts on lines 3..51
src/generated/gost_16876_alt.ts on lines 3..51
src/generated/iso_9_1954.ts on lines 3..51
src/generated/iso_9_1968.ts on lines 3..51
src/generated/iso_9_1968_alt.ts on lines 3..51
src/generated/telegram.ts on lines 3..51

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

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

export default {
    name: "gost_16876",
    description: "GOST 16876-71 (aka GOST 1983) transliteration schema",
    url: "https://iuliia.ru/gost-16876/",
    mapping: {
Severity: Major
Found in src/generated/gost_16876.ts and 8 other locations - About 1 day to fix
src/generated/ala_lc.ts on lines 3..51
src/generated/ala_lc_alt.ts on lines 3..51
src/generated/gost_16876_alt.ts on lines 3..51
src/generated/iso_9_1954.ts on lines 3..51
src/generated/iso_9_1968.ts on lines 3..51
src/generated/iso_9_1968_alt.ts on lines 3..51
src/generated/scientific.ts on lines 3..51
src/generated/telegram.ts on lines 3..51

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

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

export default {
    name: "iso_9_1954",
    description: "ISO/R 9:1954 transliteration schema",
    url: "https://iuliia.ru/iso-9-1954/",
    mapping: {
Severity: Major
Found in src/generated/iso_9_1954.ts and 8 other locations - About 1 day to fix
src/generated/ala_lc.ts on lines 3..51
src/generated/ala_lc_alt.ts on lines 3..51
src/generated/gost_16876.ts on lines 3..51
src/generated/gost_16876_alt.ts on lines 3..51
src/generated/iso_9_1968.ts on lines 3..51
src/generated/iso_9_1968_alt.ts on lines 3..51
src/generated/scientific.ts on lines 3..51
src/generated/telegram.ts on lines 3..51

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

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

export default {
    name: "ala_lc",
    description: "ALA-LC transliteration schema.",
    url: "https://iuliia.ru/ala-lc/",
    mapping: {
Severity: Major
Found in src/generated/ala_lc.ts and 8 other locations - About 1 day to fix
src/generated/ala_lc_alt.ts on lines 3..51
src/generated/gost_16876.ts on lines 3..51
src/generated/gost_16876_alt.ts on lines 3..51
src/generated/iso_9_1954.ts on lines 3..51
src/generated/iso_9_1968.ts on lines 3..51
src/generated/iso_9_1968_alt.ts on lines 3..51
src/generated/scientific.ts on lines 3..51
src/generated/telegram.ts on lines 3..51

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

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

export default {
    name: "iso_9_1968_alt",
    description: "ISO/R 9:1968 transliteration schema",
    url: "https://iuliia.ru/iso-9-1968/",
    mapping: {
Severity: Major
Found in src/generated/iso_9_1968_alt.ts and 8 other locations - About 1 day to fix
src/generated/ala_lc.ts on lines 3..51
src/generated/ala_lc_alt.ts on lines 3..51
src/generated/gost_16876.ts on lines 3..51
src/generated/gost_16876_alt.ts on lines 3..51
src/generated/iso_9_1954.ts on lines 3..51
src/generated/iso_9_1968.ts on lines 3..51
src/generated/scientific.ts on lines 3..51
src/generated/telegram.ts on lines 3..51

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

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

export default {
    name: "ala_lc_alt",
    description: "ALA-LC transliteration schema.",
    url: "https://iuliia.ru/ala-lc/",
    mapping: {
Severity: Major
Found in src/generated/ala_lc_alt.ts and 8 other locations - About 1 day to fix
src/generated/ala_lc.ts on lines 3..51
src/generated/gost_16876.ts on lines 3..51
src/generated/gost_16876_alt.ts on lines 3..51
src/generated/iso_9_1954.ts on lines 3..51
src/generated/iso_9_1968.ts on lines 3..51
src/generated/iso_9_1968_alt.ts on lines 3..51
src/generated/scientific.ts on lines 3..51
src/generated/telegram.ts on lines 3..51

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

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

export default {
    name: "gost_16876_alt",
    description: "GOST 16876-71 (aka GOST 1983) transliteration schema",
    url: "https://iuliia.ru/gost-16876/",
    mapping: {
Severity: Major
Found in src/generated/gost_16876_alt.ts and 8 other locations - About 1 day to fix
src/generated/ala_lc.ts on lines 3..51
src/generated/ala_lc_alt.ts on lines 3..51
src/generated/gost_16876.ts on lines 3..51
src/generated/iso_9_1954.ts on lines 3..51
src/generated/iso_9_1968.ts on lines 3..51
src/generated/iso_9_1968_alt.ts on lines 3..51
src/generated/scientific.ts on lines 3..51
src/generated/telegram.ts on lines 3..51

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

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

    samples: [
        [
            "Юлия, съешь ещё этих мягких французских булок из Йошкар-Олы, да выпей алтайского чаю",
            "Yuliya, s”yesh’ yeshchё etikh myagkikh frantsuzskikh bulok iz Yoshkar-Oly, da vypey altayskogo chayu",
        ],
Severity: Major
Found in src/generated/bgn_pcgn.ts and 1 other location - About 3 hrs to fix
src/generated/bgn_pcgn_alt.ts on lines 74..107

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

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

    samples: [
        [
            "Юлия, съешь ещё этих мягких французских булок из Йошкар-Олы, да выпей алтайского чаю",
            "Yuliya, s”yesh’ yeshchё etikh myagkikh frantsuzskikh bulok iz Yoshkar-Oly, da vypey altayskogo chayu",
        ],
Severity: Major
Found in src/generated/bgn_pcgn_alt.ts and 1 other location - About 3 hrs to fix
src/generated/bgn_pcgn.ts on lines 115..148

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

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

    next_mapping: {
        йа: "y·",
        йу: "y·",
        йы: "y·",
        йэ: "y·",
Severity: Major
Found in src/generated/bgn_pcgn.ts and 1 other location - About 1 hr to fix
src/generated/wikipedia.ts on lines 42..53

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

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

    prev_mapping: {
        е: "ye",
        ае: "ye",
        ие: "ye",
        ое: "ye",
Severity: Major
Found in src/generated/wikipedia.ts and 1 other location - About 1 hr to fix
src/generated/bgn_pcgn.ts on lines 102..113

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

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 letterReader has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function* letterReader(stem: string) {
    let prev = "";
    let curr = "";
    let next = "";
    for (let idx = 0; idx < stem.length; idx++) {
Severity: Minor
Found in src/engine.ts - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Severity
Category
Status
Source
Language