HabitRPG/habitrpg

View on GitHub

Showing 2,663 of 3,327 total issues

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

    context('user stats when direction is up', () => {
      let updatedUser;

      beforeEach(async () => {
        await user.post(`/tasks/${daily._id}/score/up`);
test/api/v3/integration/tasks/POST-tasks_id_score_direction.test.js on lines 204..223

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

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

Object.keys(gearEvents).forEach(event => {
  CLASSES.forEach(klass => {
    const classNameString = getClassName(klass);
    const eventString = `${event}${upperFirst(classNameString)}`;
    const textString = `armorSpecial${upperFirst(event)}${upperFirst(classNameString)}`;
Severity: Major
Found in website/common/script/content/gear/sets/special/index.js and 1 other location - About 1 day to fix
website/common/script/content/gear/sets/special/index.js on lines 1888..1904

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

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

  context('flat allocation mode', () => {
    beforeEach(() => {
      user.stats.con = 5;
      user.stats.int = 5;
      user.stats.per = 3;
Severity: Major
Found in test/common/fns/autoAllocate.test.js and 1 other location - About 1 day to fix
test/common/fns/autoAllocate.test.js on lines 107..125

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

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

  context('invalid alocation mode', () => {
    beforeEach(() => {
      user.stats.con = 5;
      user.stats.int = 5;
      user.stats.per = 3;
Severity: Major
Found in test/common/fns/autoAllocate.test.js and 1 other location - About 1 day to fix
test/common/fns/autoAllocate.test.js on lines 19..37

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

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

Object.keys(gearEvents).forEach(event => {
  CLASSES.forEach(klass => {
    const classNameString = getClassName(klass);
    const eventString = `${event}${upperFirst(classNameString)}`;
    const textString = `headSpecial${upperFirst(event)}${upperFirst(classNameString)}`;
Severity: Major
Found in website/common/script/content/gear/sets/special/index.js and 1 other location - About 1 day to fix
website/common/script/content/gear/sets/special/index.js on lines 782..798

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

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

  context('Sub-Level Protected Operations', () => {
    const protectedOperations = {
      'class stat': { 'stats.class': 'wizard' },
      'flags unless whitelisted': { 'flags.chatRevoked': true },
      webhooks: { 'preferences.webhooks': [1, 2, 3] },
Severity: Major
Found in test/api/v3/integration/user/PUT-user.test.js and 1 other location - About 1 day to fix
test/api/v4/user/PUT-user.test.js on lines 109..130

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

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

  context('Sub-Level Protected Operations', () => {
    const protectedOperations = {
      'class stat': { 'stats.class': 'wizard' },
      'flags unless whitelisted': { 'flags.chatRevoked': true },
      webhooks: { 'preferences.webhooks': [1, 2, 3] },
Severity: Major
Found in test/api/v4/user/PUT-user.test.js and 1 other location - About 1 day to fix
test/api/v3/integration/user/PUT-user.test.js on lines 160..181

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

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

      it('throws an error if the user is not found', async () => {
        const customerId = 456;
        constructEventStub.returns({
          id: 123,
          type: eventType,
Severity: Major
Found in test/api/unit/libs/payments/stripe/webhooks.test.js and 1 other location - About 1 day to fix
test/api/unit/libs/payments/stripe/webhooks.test.js on lines 170..195

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

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

      it('cancels a group subscription', async () => {
        await stripePayments.cancelSubscription({
          user,
          groupId,
        }, stripe);
Severity: Major
Found in test/api/unit/libs/payments/stripe/subscriptions.test.js and 1 other location - About 1 day to fix
test/api/unit/libs/payments/stripe/subscriptions.test.js on lines 395..413

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

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

      it('throws an error if the group is not found', async () => {
        const customerId = 456;
        constructEventStub.returns({
          id: 123,
          type: eventType,
Severity: Major
Found in test/api/unit/libs/payments/stripe/webhooks.test.js and 1 other location - About 1 day to fix
test/api/unit/libs/payments/stripe/webhooks.test.js on lines 106..131

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

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

      it('cancels a user subscription', async () => {
        await stripePayments.cancelSubscription({
          user,
          groupId: undefined,
        }, stripe);
Severity: Major
Found in test/api/unit/libs/payments/stripe/subscriptions.test.js and 1 other location - About 1 day to fix
test/api/unit/libs/payments/stripe/subscriptions.test.js on lines 415..433

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

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

const shield = {
  1: {
    text: t('shieldWarrior1Text'),
    notes: t('shieldWarrior1Notes', { con: 2 }),
    con: 2,
Severity: Major
Found in website/common/script/content/gear/sets/warrior.js and 9 other locations - About 1 day to fix
website/common/script/content/gear/sets/healer.js on lines 3..35
website/common/script/content/gear/sets/healer.js on lines 37..69
website/common/script/content/gear/sets/healer.js on lines 71..103
website/common/script/content/gear/sets/rogue.js on lines 3..35
website/common/script/content/gear/sets/rogue.js on lines 37..69
website/common/script/content/gear/sets/warrior.js on lines 3..35
website/common/script/content/gear/sets/warrior.js on lines 37..69
website/common/script/content/gear/sets/wizard.js on lines 3..35
website/common/script/content/gear/sets/wizard.js on lines 37..69

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

const head = {
  1: {
    text: t('headHealer1Text'),
    notes: t('headHealer1Notes', { int: 2 }),
    int: 2,
Severity: Major
Found in website/common/script/content/gear/sets/healer.js and 9 other locations - About 1 day to fix
website/common/script/content/gear/sets/healer.js on lines 3..35
website/common/script/content/gear/sets/healer.js on lines 71..103
website/common/script/content/gear/sets/rogue.js on lines 3..35
website/common/script/content/gear/sets/rogue.js on lines 37..69
website/common/script/content/gear/sets/warrior.js on lines 3..35
website/common/script/content/gear/sets/warrior.js on lines 37..69
website/common/script/content/gear/sets/warrior.js on lines 71..103
website/common/script/content/gear/sets/wizard.js on lines 3..35
website/common/script/content/gear/sets/wizard.js on lines 37..69

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

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

const armor = {
  1: {
    text: t('armorWarrior1Text'),
    notes: t('armorWarrior1Notes', { con: 3 }),
    con: 3,
Severity: Major
Found in website/common/script/content/gear/sets/warrior.js and 9 other locations - About 1 day to fix
website/common/script/content/gear/sets/healer.js on lines 3..35
website/common/script/content/gear/sets/healer.js on lines 37..69
website/common/script/content/gear/sets/healer.js on lines 71..103
website/common/script/content/gear/sets/rogue.js on lines 3..35
website/common/script/content/gear/sets/rogue.js on lines 37..69
website/common/script/content/gear/sets/warrior.js on lines 37..69
website/common/script/content/gear/sets/warrior.js on lines 71..103
website/common/script/content/gear/sets/wizard.js on lines 3..35
website/common/script/content/gear/sets/wizard.js on lines 37..69

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

const armor = {
  1: {
    text: t('armorHealer1Text'),
    notes: t('armorHealer1Notes', { con: 6 }),
    con: 6,
Severity: Major
Found in website/common/script/content/gear/sets/healer.js and 9 other locations - About 1 day to fix
website/common/script/content/gear/sets/healer.js on lines 37..69
website/common/script/content/gear/sets/healer.js on lines 71..103
website/common/script/content/gear/sets/rogue.js on lines 3..35
website/common/script/content/gear/sets/rogue.js on lines 37..69
website/common/script/content/gear/sets/warrior.js on lines 3..35
website/common/script/content/gear/sets/warrior.js on lines 37..69
website/common/script/content/gear/sets/warrior.js on lines 71..103
website/common/script/content/gear/sets/wizard.js on lines 3..35
website/common/script/content/gear/sets/wizard.js on lines 37..69

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

  vice3: {
    text: t('questVice3Text'),
    notes: t('questVice3Notes'),
    group: 'questGroupVice',
    completion: t('questVice3Completion'),
Severity: Major
Found in website/common/script/content/quests/series.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/masterclasser.js on lines 315..360

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

const shield = {
  1: {
    text: t('shieldHealer1Text'),
    notes: t('shieldHealer1Notes', { con: 2 }),
    con: 2,
Severity: Major
Found in website/common/script/content/gear/sets/healer.js and 9 other locations - About 1 day to fix
website/common/script/content/gear/sets/healer.js on lines 3..35
website/common/script/content/gear/sets/healer.js on lines 37..69
website/common/script/content/gear/sets/rogue.js on lines 3..35
website/common/script/content/gear/sets/rogue.js on lines 37..69
website/common/script/content/gear/sets/warrior.js on lines 3..35
website/common/script/content/gear/sets/warrior.js on lines 37..69
website/common/script/content/gear/sets/warrior.js on lines 71..103
website/common/script/content/gear/sets/wizard.js on lines 3..35
website/common/script/content/gear/sets/wizard.js on lines 37..69

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

const head = {
  1: {
    text: t('headRogue1Text'),
    notes: t('headRogue1Notes', { per: 2 }),
    per: 2,
Severity: Major
Found in website/common/script/content/gear/sets/rogue.js and 9 other locations - About 1 day to fix
website/common/script/content/gear/sets/healer.js on lines 3..35
website/common/script/content/gear/sets/healer.js on lines 37..69
website/common/script/content/gear/sets/healer.js on lines 71..103
website/common/script/content/gear/sets/rogue.js on lines 3..35
website/common/script/content/gear/sets/warrior.js on lines 3..35
website/common/script/content/gear/sets/warrior.js on lines 37..69
website/common/script/content/gear/sets/warrior.js on lines 71..103
website/common/script/content/gear/sets/wizard.js on lines 3..35
website/common/script/content/gear/sets/wizard.js on lines 37..69

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

Severity
Category
Status
Source
Language