RocketChat/Rocket.Chat

View on GitHub
apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts

Summary

Maintainability
D
2 days
Test Coverage

Function convertShortName has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    (shortname) => {
        // the fix is basically adding this .replace(/[+]/g, '\\$&')
        if (typeof shortname === 'undefined' || shortname === '' || emojione.shortnames.indexOf(shortname.replace(/[+]/g, '\\$&')) === -1) {
            // if the shortname doesnt exist just return the entire match
            return shortname;
Severity: Minor
Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts - About 2 hrs 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

Function convertShortName has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    (shortname) => {
        // the fix is basically adding this .replace(/[+]/g, '\\$&')
        if (typeof shortname === 'undefined' || shortname === '' || emojione.shortnames.indexOf(shortname.replace(/[+]/g, '\\$&')) === -1) {
            // if the shortname doesnt exist just return the entire match
            return shortname;
Severity: Minor
Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts - About 1 hr to fix

    Function convertUnicode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        (entire, _m1, m2, m3) => {
            const mappedUnicode = emojione.mapUnicodeToShort();
    
            if (typeof m3 === 'undefined' || m3 === '' || !(emojione.unescapeHTML(m3) in emojione.asciiList)) {
                // if the ascii doesnt exist just return the entire match
    Severity: Minor
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts - About 25 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

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

            const ePath =
                emojione.defaultPathPNG !== emojione.imagePathPNG ? emojione.imagePathPNG : `${emojione.defaultPathPNG + emojione.emojiSize}/`;
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 1 other location - About 1 hr to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 201..202

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

    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 ePath =
                emojione.defaultPathPNG !== emojione.imagePathPNG ? emojione.imagePathPNG : `${emojione.defaultPathPNG + emojione.emojiSize}/`;
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 1 other location - About 1 hr to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 231..232

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

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

    emojione.emojioneList[':digit_three:'] = {
        uc_base: '0033',
        uc_output: '0033-fe0f',
        uc_match: '0033-fe0f',
        uc_greedy: '0033-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 16..24
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 26..34
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 36..44
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 46..54
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 56..64
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 66..74
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 86..94
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 96..104
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 106..114
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 116..124
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 126..134
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 136..144
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 146..154

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

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

    emojione.emojioneList[':registered:'] = {
        uc_base: '00ae',
        uc_output: '00ae-fe0f',
        uc_match: '00ae-fe0f',
        uc_greedy: '00ae-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 16..24
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 26..34
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 46..54
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 56..64
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 66..74
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 76..84
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 86..94
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 96..104
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 106..114
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 116..124
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 126..134
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 136..144
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 146..154

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

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

    emojione.emojioneList[':digit_two:'] = {
        uc_base: '0032',
        uc_output: '0032-fe0f',
        uc_match: '0032-fe0f',
        uc_greedy: '0032-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 16..24
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 26..34
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 36..44
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 46..54
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 56..64
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 76..84
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 86..94
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 96..104
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 106..114
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 116..124
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 126..134
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 136..144
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 146..154

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

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

    emojione.emojioneList[':digit_four:'] = {
        uc_base: '0034',
        uc_output: '0034-fe0f',
        uc_match: '0034-fe0f',
        uc_greedy: '0034-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 16..24
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 26..34
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 36..44
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 46..54
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 56..64
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 66..74
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 76..84
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 96..104
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 106..114
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 116..124
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 126..134
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 136..144
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 146..154

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

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

    emojione.emojioneList[':digit_eight:'] = {
        uc_base: '0038',
        uc_output: '0038-fe0f',
        uc_match: '0038-fe0f',
        uc_greedy: '0038-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 16..24
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 26..34
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 36..44
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 46..54
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 56..64
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 66..74
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 76..84
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 86..94
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 96..104
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 106..114
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 116..124
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 136..144
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 146..154

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

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

    emojione.emojioneList[':digit_nine:'] = {
        uc_base: '0039',
        uc_output: '0039-fe0f',
        uc_match: '0039-fe0f',
        uc_greedy: '0039-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 16..24
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 26..34
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 36..44
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 46..54
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 56..64
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 66..74
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 76..84
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 86..94
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 96..104
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 106..114
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 116..124
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 126..134
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 146..154

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

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

    emojione.emojioneList[':digit_zero:'] = {
        uc_base: '0030',
        uc_output: '0030-fe0f',
        uc_match: '0030-fe0f',
        uc_greedy: '0030-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 16..24
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 26..34
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 36..44
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 56..64
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 66..74
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 76..84
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 86..94
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 96..104
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 106..114
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 116..124
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 126..134
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 136..144
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 146..154

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

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

    emojione.emojioneList[':digit_one:'] = {
        uc_base: '0031',
        uc_output: '0031-fe0f',
        uc_match: '0031-fe0f',
        uc_greedy: '0031-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 16..24
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 26..34
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 36..44
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 46..54
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 66..74
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 76..84
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 86..94
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 96..104
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 106..114
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 116..124
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 126..134
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 136..144
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 146..154

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

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

    emojione.emojioneList[':digit_six:'] = {
        uc_base: '0036',
        uc_output: '0036-fe0f',
        uc_match: '0036-fe0f',
        uc_greedy: '0036-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 16..24
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 26..34
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 36..44
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 46..54
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 56..64
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 66..74
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 76..84
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 86..94
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 96..104
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 116..124
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 126..134
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 136..144
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 146..154

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

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

    emojione.emojioneList[':pound_symbol:'] = {
        uc_base: '0023',
        uc_output: '0023-fe0f',
        uc_match: '0023-fe0f',
        uc_greedy: '0023-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 16..24
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 26..34
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 36..44
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 46..54
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 56..64
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 66..74
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 76..84
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 86..94
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 96..104
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 106..114
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 116..124
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 126..134
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 136..144

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

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

    emojione.emojioneList[':digit_five:'] = {
        uc_base: '0035',
        uc_output: '0035-fe0f',
        uc_match: '0035-fe0f',
        uc_greedy: '0035-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 16..24
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 26..34
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 36..44
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 46..54
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 56..64
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 66..74
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 76..84
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 86..94
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 106..114
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 116..124
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 126..134
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 136..144
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 146..154

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

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

    emojione.emojioneList[':tm:'] = {
        uc_base: '2122',
        uc_output: '2122-fe0f',
        uc_match: '2122-fe0f',
        uc_greedy: '2122-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 26..34
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 36..44
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 46..54
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 56..64
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 66..74
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 76..84
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 86..94
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 96..104
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 106..114
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 116..124
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 126..134
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 136..144
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 146..154

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

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

    emojione.emojioneList[':copyright:'] = {
        uc_base: '00a9',
        uc_output: '00a9-f0ef',
        uc_match: '00a9-fe0f',
        uc_greedy: '00a9-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 16..24
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 36..44
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 46..54
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 56..64
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 66..74
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 76..84
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 86..94
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 96..104
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 106..114
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 116..124
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 126..134
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 136..144
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 146..154

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

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

    emojione.emojioneList[':digit_seven:'] = {
        uc_base: '0037',
        uc_output: '0037-fe0f',
        uc_match: '0037-fe0f',
        uc_greedy: '0037-fe0f',
    Severity: Major
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 13 other locations - About 50 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 16..24
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 26..34
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 36..44
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 46..54
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 56..64
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 66..74
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 76..84
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 86..94
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 96..104
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 106..114
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 126..134
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 136..144
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 146..154

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

    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

        if (emojione.ascii) {
            const asciiRX = emojione.riskyMatchAscii ? emojione.regAsciiRisky : emojione.regAscii;
    
            return str.replace(asciiRX, convertUnicode);
        }
    Severity: Minor
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 1 other location - About 45 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 263..267

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

    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

        if (emojione.ascii) {
            const asciiRX = emojione.riskyMatchAscii ? emojione.regAsciiRisky : emojione.regAscii;
    
            return str.replace(asciiRX, convertUnicode);
        }
    Severity: Minor
    Found in apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts and 1 other location - About 45 mins to fix
    apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts on lines 250..254

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

    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

    There are no issues that match your filters.

    Category
    Status