RocketChat/Rocket.Chat

View on GitHub
apps/meteor/server/settings/setup-wizard.ts

Summary

Maintainability
F
1 wk
Test Coverage

Function createSetupWSettings has 1348 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    settingsRegistry.addGroup('Setup_Wizard', async function () {
        await this.section('Organization_Info', async function () {
            await this.add('Organization_Type', '', {
                type: 'select',
                values: [
Severity: Major
Found in apps/meteor/server/settings/setup-wizard.ts - About 6 days to fix

    File setup-wizard.ts has 1352 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { settingsRegistry } from '../../app/settings/server';
    
    export const createSetupWSettings = () =>
        settingsRegistry.addGroup('Setup_Wizard', async function () {
            await this.section('Organization_Info', async function () {
    Severity: Major
    Found in apps/meteor/server/settings/setup-wizard.ts - About 3 days to fix

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

                      values: [
                          {
                              key: '0',
                              i18nLabel: '1-10 people',
                          },
      Severity: Major
      Found in apps/meteor/server/settings/setup-wizard.ts and 1 other location - About 3 hrs to fix
      apps/meteor/server/settings/general.ts on lines 231..264

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

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

                  await this.add('Cloud_Workspace_Client_Secret', '', {
                      type: 'string',
                      hidden: true,
                      readonly: true,
                      enableQuery: {
      Severity: Major
      Found in apps/meteor/server/settings/setup-wizard.ts and 11 other locations - About 50 mins to fix
      apps/meteor/server/settings/setup-wizard.ts on lines 1197..1206
      apps/meteor/server/settings/setup-wizard.ts on lines 1215..1224
      apps/meteor/server/settings/setup-wizard.ts on lines 1230..1239
      apps/meteor/server/settings/setup-wizard.ts on lines 1241..1250
      apps/meteor/server/settings/setup-wizard.ts on lines 1252..1261
      apps/meteor/server/settings/setup-wizard.ts on lines 1285..1294
      apps/meteor/server/settings/setup-wizard.ts on lines 1296..1305
      apps/meteor/server/settings/setup-wizard.ts on lines 1307..1316
      apps/meteor/server/settings/setup-wizard.ts on lines 1325..1334
      apps/meteor/server/settings/setup-wizard.ts on lines 1347..1356
      apps/meteor/server/settings/setup-wizard.ts on lines 1357..1366

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

                  await this.add('Cloud_Workspace_Client_Id', '', {
                      type: 'string',
                      hidden: true,
                      readonly: true,
                      enableQuery: {
      Severity: Major
      Found in apps/meteor/server/settings/setup-wizard.ts and 11 other locations - About 50 mins to fix
      apps/meteor/server/settings/setup-wizard.ts on lines 1197..1206
      apps/meteor/server/settings/setup-wizard.ts on lines 1215..1224
      apps/meteor/server/settings/setup-wizard.ts on lines 1230..1239
      apps/meteor/server/settings/setup-wizard.ts on lines 1241..1250
      apps/meteor/server/settings/setup-wizard.ts on lines 1263..1272
      apps/meteor/server/settings/setup-wizard.ts on lines 1285..1294
      apps/meteor/server/settings/setup-wizard.ts on lines 1296..1305
      apps/meteor/server/settings/setup-wizard.ts on lines 1307..1316
      apps/meteor/server/settings/setup-wizard.ts on lines 1325..1334
      apps/meteor/server/settings/setup-wizard.ts on lines 1347..1356
      apps/meteor/server/settings/setup-wizard.ts on lines 1357..1366

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

                  await this.add('Cloud_Workspace_PublicKey', '', {
                      type: 'string',
                      hidden: true,
                      readonly: true,
                      enableQuery: {
      Severity: Major
      Found in apps/meteor/server/settings/setup-wizard.ts and 11 other locations - About 50 mins to fix
      apps/meteor/server/settings/setup-wizard.ts on lines 1197..1206
      apps/meteor/server/settings/setup-wizard.ts on lines 1215..1224
      apps/meteor/server/settings/setup-wizard.ts on lines 1230..1239
      apps/meteor/server/settings/setup-wizard.ts on lines 1241..1250
      apps/meteor/server/settings/setup-wizard.ts on lines 1252..1261
      apps/meteor/server/settings/setup-wizard.ts on lines 1263..1272
      apps/meteor/server/settings/setup-wizard.ts on lines 1285..1294
      apps/meteor/server/settings/setup-wizard.ts on lines 1307..1316
      apps/meteor/server/settings/setup-wizard.ts on lines 1325..1334
      apps/meteor/server/settings/setup-wizard.ts on lines 1347..1356
      apps/meteor/server/settings/setup-wizard.ts on lines 1357..1366

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

                  await this.add('Cloud_Workspace_Registration_Client_Uri', '', {
                      type: 'string',
                      hidden: true,
                      readonly: true,
                      enableQuery: {
      Severity: Major
      Found in apps/meteor/server/settings/setup-wizard.ts and 11 other locations - About 50 mins to fix
      apps/meteor/server/settings/setup-wizard.ts on lines 1197..1206
      apps/meteor/server/settings/setup-wizard.ts on lines 1215..1224
      apps/meteor/server/settings/setup-wizard.ts on lines 1230..1239
      apps/meteor/server/settings/setup-wizard.ts on lines 1241..1250
      apps/meteor/server/settings/setup-wizard.ts on lines 1252..1261
      apps/meteor/server/settings/setup-wizard.ts on lines 1263..1272
      apps/meteor/server/settings/setup-wizard.ts on lines 1296..1305
      apps/meteor/server/settings/setup-wizard.ts on lines 1307..1316
      apps/meteor/server/settings/setup-wizard.ts on lines 1325..1334
      apps/meteor/server/settings/setup-wizard.ts on lines 1347..1356
      apps/meteor/server/settings/setup-wizard.ts on lines 1357..1366

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

                  await this.add('Cloud_Url', 'https://cloud.rocket.chat', {
                      type: 'string',
                      hidden: true,
                      readonly: true,
                      enableQuery: {
      Severity: Major
      Found in apps/meteor/server/settings/setup-wizard.ts and 11 other locations - About 50 mins to fix
      apps/meteor/server/settings/setup-wizard.ts on lines 1197..1206
      apps/meteor/server/settings/setup-wizard.ts on lines 1230..1239
      apps/meteor/server/settings/setup-wizard.ts on lines 1241..1250
      apps/meteor/server/settings/setup-wizard.ts on lines 1252..1261
      apps/meteor/server/settings/setup-wizard.ts on lines 1263..1272
      apps/meteor/server/settings/setup-wizard.ts on lines 1285..1294
      apps/meteor/server/settings/setup-wizard.ts on lines 1296..1305
      apps/meteor/server/settings/setup-wizard.ts on lines 1307..1316
      apps/meteor/server/settings/setup-wizard.ts on lines 1325..1334
      apps/meteor/server/settings/setup-wizard.ts on lines 1347..1356
      apps/meteor/server/settings/setup-wizard.ts on lines 1357..1366

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

                  await this.add('Cloud_Billing_Url', 'https://billing.rocket.chat', {
                      type: 'string',
                      hidden: true,
                      readonly: true,
                      enableQuery: {
      Severity: Major
      Found in apps/meteor/server/settings/setup-wizard.ts and 11 other locations - About 50 mins to fix
      apps/meteor/server/settings/setup-wizard.ts on lines 1197..1206
      apps/meteor/server/settings/setup-wizard.ts on lines 1215..1224
      apps/meteor/server/settings/setup-wizard.ts on lines 1230..1239
      apps/meteor/server/settings/setup-wizard.ts on lines 1241..1250
      apps/meteor/server/settings/setup-wizard.ts on lines 1252..1261
      apps/meteor/server/settings/setup-wizard.ts on lines 1263..1272
      apps/meteor/server/settings/setup-wizard.ts on lines 1285..1294
      apps/meteor/server/settings/setup-wizard.ts on lines 1296..1305
      apps/meteor/server/settings/setup-wizard.ts on lines 1307..1316
      apps/meteor/server/settings/setup-wizard.ts on lines 1325..1334
      apps/meteor/server/settings/setup-wizard.ts on lines 1347..1356

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

                  await this.add('Nps_Url', 'https://nps.rocket.chat', {
                      type: 'string',
                      hidden: true,
                      readonly: true,
                      enableQuery: {
      Severity: Major
      Found in apps/meteor/server/settings/setup-wizard.ts and 11 other locations - About 50 mins to fix
      apps/meteor/server/settings/setup-wizard.ts on lines 1215..1224
      apps/meteor/server/settings/setup-wizard.ts on lines 1230..1239
      apps/meteor/server/settings/setup-wizard.ts on lines 1241..1250
      apps/meteor/server/settings/setup-wizard.ts on lines 1252..1261
      apps/meteor/server/settings/setup-wizard.ts on lines 1263..1272
      apps/meteor/server/settings/setup-wizard.ts on lines 1285..1294
      apps/meteor/server/settings/setup-wizard.ts on lines 1296..1305
      apps/meteor/server/settings/setup-wizard.ts on lines 1307..1316
      apps/meteor/server/settings/setup-wizard.ts on lines 1325..1334
      apps/meteor/server/settings/setup-wizard.ts on lines 1347..1356
      apps/meteor/server/settings/setup-wizard.ts on lines 1357..1366

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

                  await this.add('Cloud_Workspace_Name', '', {
                      type: 'string',
                      hidden: true,
                      readonly: true,
                      enableQuery: {
      Severity: Major
      Found in apps/meteor/server/settings/setup-wizard.ts and 11 other locations - About 50 mins to fix
      apps/meteor/server/settings/setup-wizard.ts on lines 1197..1206
      apps/meteor/server/settings/setup-wizard.ts on lines 1215..1224
      apps/meteor/server/settings/setup-wizard.ts on lines 1230..1239
      apps/meteor/server/settings/setup-wizard.ts on lines 1252..1261
      apps/meteor/server/settings/setup-wizard.ts on lines 1263..1272
      apps/meteor/server/settings/setup-wizard.ts on lines 1285..1294
      apps/meteor/server/settings/setup-wizard.ts on lines 1296..1305
      apps/meteor/server/settings/setup-wizard.ts on lines 1307..1316
      apps/meteor/server/settings/setup-wizard.ts on lines 1325..1334
      apps/meteor/server/settings/setup-wizard.ts on lines 1347..1356
      apps/meteor/server/settings/setup-wizard.ts on lines 1357..1366

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

                  await this.add('Cloud_Workspace_Access_Token', '', {
                      type: 'string',
                      hidden: true,
                      readonly: true,
                      enableQuery: {
      Severity: Major
      Found in apps/meteor/server/settings/setup-wizard.ts and 11 other locations - About 50 mins to fix
      apps/meteor/server/settings/setup-wizard.ts on lines 1197..1206
      apps/meteor/server/settings/setup-wizard.ts on lines 1215..1224
      apps/meteor/server/settings/setup-wizard.ts on lines 1230..1239
      apps/meteor/server/settings/setup-wizard.ts on lines 1241..1250
      apps/meteor/server/settings/setup-wizard.ts on lines 1252..1261
      apps/meteor/server/settings/setup-wizard.ts on lines 1263..1272
      apps/meteor/server/settings/setup-wizard.ts on lines 1285..1294
      apps/meteor/server/settings/setup-wizard.ts on lines 1296..1305
      apps/meteor/server/settings/setup-wizard.ts on lines 1307..1316
      apps/meteor/server/settings/setup-wizard.ts on lines 1347..1356
      apps/meteor/server/settings/setup-wizard.ts on lines 1357..1366

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

                  await this.add('Cloud_Workspace_Registration_State', '', {
                      type: 'string',
                      hidden: true,
                      readonly: true,
                      enableQuery: {
      Severity: Major
      Found in apps/meteor/server/settings/setup-wizard.ts and 11 other locations - About 50 mins to fix
      apps/meteor/server/settings/setup-wizard.ts on lines 1197..1206
      apps/meteor/server/settings/setup-wizard.ts on lines 1215..1224
      apps/meteor/server/settings/setup-wizard.ts on lines 1230..1239
      apps/meteor/server/settings/setup-wizard.ts on lines 1241..1250
      apps/meteor/server/settings/setup-wizard.ts on lines 1252..1261
      apps/meteor/server/settings/setup-wizard.ts on lines 1263..1272
      apps/meteor/server/settings/setup-wizard.ts on lines 1285..1294
      apps/meteor/server/settings/setup-wizard.ts on lines 1296..1305
      apps/meteor/server/settings/setup-wizard.ts on lines 1307..1316
      apps/meteor/server/settings/setup-wizard.ts on lines 1325..1334
      apps/meteor/server/settings/setup-wizard.ts on lines 1357..1366

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

                  await this.add('Cloud_Workspace_Id', '', {
                      type: 'string',
                      hidden: true,
                      readonly: true,
                      enableQuery: {
      Severity: Major
      Found in apps/meteor/server/settings/setup-wizard.ts and 11 other locations - About 50 mins to fix
      apps/meteor/server/settings/setup-wizard.ts on lines 1197..1206
      apps/meteor/server/settings/setup-wizard.ts on lines 1215..1224
      apps/meteor/server/settings/setup-wizard.ts on lines 1241..1250
      apps/meteor/server/settings/setup-wizard.ts on lines 1252..1261
      apps/meteor/server/settings/setup-wizard.ts on lines 1263..1272
      apps/meteor/server/settings/setup-wizard.ts on lines 1285..1294
      apps/meteor/server/settings/setup-wizard.ts on lines 1296..1305
      apps/meteor/server/settings/setup-wizard.ts on lines 1307..1316
      apps/meteor/server/settings/setup-wizard.ts on lines 1325..1334
      apps/meteor/server/settings/setup-wizard.ts on lines 1347..1356
      apps/meteor/server/settings/setup-wizard.ts on lines 1357..1366

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

                  await this.add('Cloud_Workspace_License', '', {
                      type: 'string',
                      hidden: true,
                      readonly: true,
                      enableQuery: {
      Severity: Major
      Found in apps/meteor/server/settings/setup-wizard.ts and 11 other locations - About 50 mins to fix
      apps/meteor/server/settings/setup-wizard.ts on lines 1197..1206
      apps/meteor/server/settings/setup-wizard.ts on lines 1215..1224
      apps/meteor/server/settings/setup-wizard.ts on lines 1230..1239
      apps/meteor/server/settings/setup-wizard.ts on lines 1241..1250
      apps/meteor/server/settings/setup-wizard.ts on lines 1252..1261
      apps/meteor/server/settings/setup-wizard.ts on lines 1263..1272
      apps/meteor/server/settings/setup-wizard.ts on lines 1285..1294
      apps/meteor/server/settings/setup-wizard.ts on lines 1296..1305
      apps/meteor/server/settings/setup-wizard.ts on lines 1325..1334
      apps/meteor/server/settings/setup-wizard.ts on lines 1347..1356
      apps/meteor/server/settings/setup-wizard.ts on lines 1357..1366

      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

      There are no issues that match your filters.

      Category
      Status