HabitRPG/habitrpg

View on GitHub
website/common/script/content/quests/masterclasser.js

Summary

Maintainability
F
1 wk
Test Coverage

File masterclasser.js has 728 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import t from '../translation';

const QUEST_MASTERCLASSER = {
  dilatoryDistress1: {
    text: t('questDilatoryDistress1Text'),
Severity: Major
Found in website/common/script/content/quests/masterclasser.js - About 1 day to fix

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

        drop: {
          items: [
            {
              type: 'food',
              key: 'Chocolate',
    Severity: Major
    Found in website/common/script/content/quests/masterclasser.js and 1 other location - About 1 day to fix
    website/common/script/content/quests/seasonal.js on lines 89..135

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

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

      mayhemMistiflying3: {
        text: t('questMayhemMistiflying3Text'),
        notes: t('questMayhemMistiflying3Notes'),
        group: 'questGroupMayhemMistiflying',
        completion: t('questMayhemMistiflying3Completion'),
    Severity: Major
    Found in website/common/script/content/quests/masterclasser.js and 3 other locations - About 1 day to fix
    website/common/script/content/quests/masterclasser.js on lines 77..122
    website/common/script/content/quests/masterclasser.js on lines 315..360
    website/common/script/content/quests/series.js on lines 482..527

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

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

      stoikalmCalamity3: {
        text: t('questStoikalmCalamity3Text'),
        notes: t('questStoikalmCalamity3Notes'),
        group: 'questGroupStoikalmCalamity',
        completion: t('questStoikalmCalamity3Completion'),
    Severity: Major
    Found in website/common/script/content/quests/masterclasser.js and 3 other locations - About 1 day to fix
    website/common/script/content/quests/masterclasser.js on lines 77..122
    website/common/script/content/quests/masterclasser.js on lines 200..245
    website/common/script/content/quests/series.js on lines 482..527

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

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

      dilatoryDistress3: {
        text: t('questDilatoryDistress3Text'),
        notes: t('questDilatoryDistress3Notes'),
        group: 'questGroupDilatoryDistress',
        completion: t('questDilatoryDistress3Completion'),
    Severity: Major
    Found in website/common/script/content/quests/masterclasser.js and 3 other locations - About 1 day to fix
    website/common/script/content/quests/masterclasser.js on lines 200..245
    website/common/script/content/quests/masterclasser.js on lines 315..360
    website/common/script/content/quests/series.js on lines 482..527

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

    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

        drop: {
          items: [
            {
              type: 'food',
              key: 'Potatoe',
    Severity: Major
    Found in website/common/script/content/quests/masterclasser.js and 1 other location - About 1 day to fix
    website/common/script/content/quests/series.js on lines 381..423

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

    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

      stoikalmCalamity1: {
        text: t('questStoikalmCalamity1Text'),
        notes: t('questStoikalmCalamity1Notes'),
        group: 'questGroupStoikalmCalamity',
        completion: t('questStoikalmCalamity1Completion'),
    Severity: Major
    Found in website/common/script/content/quests/masterclasser.js and 2 other locations - About 1 day to fix
    website/common/script/content/quests/masterclasser.js on lines 123..161
    website/common/script/content/quests/masterclasser.js on lines 361..399

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

    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

      mayhemMistiflying1: {
        text: t('questMayhemMistiflying1Text'),
        notes: t('questMayhemMistiflying1Notes'),
        group: 'questGroupMayhemMistiflying',
        completion: t('questMayhemMistiflying1Completion'),
    Severity: Major
    Found in website/common/script/content/quests/masterclasser.js and 2 other locations - About 1 day to fix
    website/common/script/content/quests/masterclasser.js on lines 246..284
    website/common/script/content/quests/masterclasser.js on lines 361..399

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

    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

      taskwoodsTerror1: {
        text: t('questTaskwoodsTerror1Text'),
        notes: t('questTaskwoodsTerror1Notes'),
        group: 'questGroupTaskwoodsTerror',
        completion: t('questTaskwoodsTerror1Completion'),
    Severity: Major
    Found in website/common/script/content/quests/masterclasser.js and 2 other locations - About 1 day to fix
    website/common/script/content/quests/masterclasser.js on lines 123..161
    website/common/script/content/quests/masterclasser.js on lines 246..284

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

    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

      taskwoodsTerror2: {
        text: t('questTaskwoodsTerror2Text'),
        notes: t('questTaskwoodsTerror2Notes'),
        group: 'questGroupTaskwoodsTerror',
        completion: t('questTaskwoodsTerror2Completion'),
    Severity: Major
    Found in website/common/script/content/quests/masterclasser.js and 1 other location - About 6 hrs to fix
    website/common/script/content/quests/masterclasser.js on lines 162..199

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

    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

      mayhemMistiflying2: {
        text: t('questMayhemMistiflying2Text'),
        notes: t('questMayhemMistiflying2Notes'),
        group: 'questGroupMayhemMistiflying',
        completion: t('questMayhemMistiflying2Completion'),
    Severity: Major
    Found in website/common/script/content/quests/masterclasser.js and 1 other location - About 6 hrs to fix
    website/common/script/content/quests/masterclasser.js on lines 400..437

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

    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

        drop: {
          items: [
            {
              type: 'hatchingPotions',
              key: 'Base',
    Severity: Major
    Found in website/common/script/content/quests/masterclasser.js and 1 other location - About 5 hrs to fix
    website/common/script/content/quests/series.js on lines 177..207

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

    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

        collect: {
          fireCoral: {
            text: t('questDilatoryDistress1CollectFireCoral'),
            count: 20,
          },
    Severity: Minor
    Found in website/common/script/content/quests/masterclasser.js and 1 other location - About 35 mins to fix
    website/common/script/content/quests/seasonal.js on lines 50..59

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

    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