ember-cli-deploy/ember-cli-deploy

View on GitHub

Showing 70 of 70 total issues

Function _buildDisabledMap has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

  _buildDisabledMap: function(aliasMap, config) {
    var aliases = this._flattenAliasMap(aliasMap);
    var allExcept = null;

    if (typeof config.allExcept !== 'undefined') {
Severity: Minor
Found in lib/models/plugin-registry.js - About 1 hr 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

      project = {
        name: function() {return 'test-project';},
        root: process.cwd(),
        addons: [
          makePlugin('foo', { runAfter: ['bar'] }),
Severity: Major
Found in node-tests/unit/models/plugin-registry-test.js and 1 other location - About 1 hr to fix
node-tests/unit/models/plugin-registry-test.js on lines 479..487

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

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

      project = {
        name: function() {return 'test-project';},
        root: process.cwd(),
        addons: [
          makePlugin('foo', { runAfter: ['bar'] }),
Severity: Major
Found in node-tests/unit/models/plugin-registry-test.js and 1 other location - About 1 hr to fix
node-tests/unit/models/plugin-registry-test.js on lines 591..599

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function run has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  run: function(commandOptions, rawArgs) {
    commandOptions.deployTarget = rawArgs.shift();

    this.ui.verbose = chooseOptionValue(commandOptions.verbose, this.settings, 'verbose');
    this.ui.logInfoColor = chooseOptionValue(commandOptions.logInfoColor, this.settings, 'logInfoColor', 'blue');
Severity: Minor
Found in lib/commands/activate.js - About 1 hr to fix

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

          testOrder(project, {
            pipeline: {
              alias: {
                bar: { as: ['bar', 'boo'] },
              },
    Severity: Major
    Found in node-tests/unit/models/plugin-registry-test.js and 1 other location - About 1 hr to fix
    node-tests/unit/models/plugin-registry-test.js on lines 564..573

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

    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

    function makeProject(addonNames) {
      return {
        name: function() {return 'test-project';},
        root: process.cwd(),
        addons: addonNames.map(function(name){
    Severity: Major
    Found in node-tests/unit/models/deprecated-plugin-registry-test.js and 1 other location - About 1 hr to fix
    node-tests/unit/models/plugin-registry-test.js on lines 614..622

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

    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

          testOrder(project, {
            pipeline: {
              alias: {
                foo: { as: ['foo', 'boo'] },
              },
    Severity: Major
    Found in node-tests/unit/models/plugin-registry-test.js and 1 other location - About 1 hr to fix
    node-tests/unit/models/plugin-registry-test.js on lines 526..535

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

    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

    function makeProject(addonNames) {
      return {
        name: function() {return 'test-project';},
        root: process.cwd(),
        addons: addonNames.map(function(name){
    Severity: Major
    Found in node-tests/unit/models/plugin-registry-test.js and 1 other location - About 1 hr to fix
    node-tests/unit/models/deprecated-plugin-registry-test.js on lines 73..81

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function run has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      run: function(commandOptions, rawArgs) {
        commandOptions.deployTarget = rawArgs.shift();
    
        commandOptions.deployConfigFile = chooseOptionValue(commandOptions.deployConfigFile, this.settings, 'deploy-config-file', 'config/deploy.js');
        this.ui.verbose = chooseOptionValue(commandOptions.verbose, this.settings, 'verbose');
    Severity: Minor
    Found in lib/commands/list.js - About 1 hr to fix

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

            var project = {
              name: function() {return 'test-project';},
              root: process.cwd(),
              addons: [
                makePlugin('foo', {}),
      Severity: Major
      Found in node-tests/unit/models/plugin-registry-test.js and 1 other location - About 1 hr to fix
      node-tests/unit/models/plugin-registry-test.js on lines 453..461

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

      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

            project = {
              name: function() {return 'test-project';},
              root: process.cwd(),
              addons: [
                makePlugin('foo', {}),
      Severity: Major
      Found in node-tests/unit/models/plugin-registry-test.js and 1 other location - About 1 hr to fix
      node-tests/unit/models/plugin-registry-test.js on lines 427..435

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function _buildDisabledMap has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        _buildDisabledMap: function(aliasMap, config) {
          var aliases = this._flattenAliasMap(aliasMap);
          var allExcept = null;
      
          if (typeof config.allExcept !== 'undefined') {
      Severity: Minor
      Found in lib/models/plugin-registry.js - About 1 hr to fix

        Function _buildRunOrderMap has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          _buildRunOrderMap: function(config, aliasMap, pluginInstances) {
            var self = this;
        
            pluginInstances.forEach(function(instance) {
              if (instance.runBefore) {
        Severity: Minor
        Found in lib/models/plugin-registry.js - About 1 hr to fix

          Function postBuild has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            postBuild: function(result) {
              var _this = this;
              if (!this.app) {
                // You will need ember-cli >= 1.13 to use ember-cli-deploy's postBuild integration.
                // This is because prior to 1.13, `this.app` is not available in the postBuild hook.
          Severity: Minor
          Found in index.js - About 1 hr to fix

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

              run: function(commandOptions, rawArgs) {
                commandOptions.deployTarget = rawArgs.shift();
            
                commandOptions.deployConfigFile = chooseOptionValue(commandOptions.deployConfigFile, this.settings, 'deploy-config-file', 'config/deploy.js');
                commandOptions.activate = chooseOptionValue(commandOptions.activate, this.settings, 'activate');
            Severity: Minor
            Found in lib/commands/deploy.js - About 1 hr to fix

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

                      expect(logLines[ 3]).to.eq(chalk.styles.blue.close + chalk.styles.blue.open + 'Registering hook -> upload[test-plugin]');
              Severity: Major
              Found in node-tests/unit/tasks/pipeline-test.js and 17 other locations - About 1 hr to fix
              node-tests/unit/tasks/pipeline-test.js on lines 214..214
              node-tests/unit/tasks/pipeline-test.js on lines 215..215
              node-tests/unit/tasks/pipeline-test.js on lines 217..217
              node-tests/unit/tasks/pipeline-test.js on lines 218..218
              node-tests/unit/tasks/pipeline-test.js on lines 219..219
              node-tests/unit/tasks/pipeline-test.js on lines 220..220
              node-tests/unit/tasks/pipeline-test.js on lines 221..221
              node-tests/unit/tasks/pipeline-test.js on lines 222..222
              node-tests/unit/tasks/pipeline-test.js on lines 223..223
              node-tests/unit/tasks/pipeline-test.js on lines 224..224
              node-tests/unit/tasks/pipeline-test.js on lines 225..225
              node-tests/unit/tasks/pipeline-test.js on lines 226..226
              node-tests/unit/tasks/pipeline-test.js on lines 227..227
              node-tests/unit/tasks/pipeline-test.js on lines 228..228
              node-tests/unit/tasks/pipeline-test.js on lines 229..229
              node-tests/unit/tasks/pipeline-test.js on lines 230..230
              node-tests/unit/tasks/pipeline-test.js on lines 231..231

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

                      expect(logLines[ 9]).to.eq(chalk.styles.blue.close + chalk.styles.blue.open + '|  |');
              Severity: Major
              Found in node-tests/unit/tasks/pipeline-test.js and 17 other locations - About 1 hr to fix
              node-tests/unit/tasks/pipeline-test.js on lines 214..214
              node-tests/unit/tasks/pipeline-test.js on lines 215..215
              node-tests/unit/tasks/pipeline-test.js on lines 216..216
              node-tests/unit/tasks/pipeline-test.js on lines 217..217
              node-tests/unit/tasks/pipeline-test.js on lines 218..218
              node-tests/unit/tasks/pipeline-test.js on lines 219..219
              node-tests/unit/tasks/pipeline-test.js on lines 220..220
              node-tests/unit/tasks/pipeline-test.js on lines 221..221
              node-tests/unit/tasks/pipeline-test.js on lines 223..223
              node-tests/unit/tasks/pipeline-test.js on lines 224..224
              node-tests/unit/tasks/pipeline-test.js on lines 225..225
              node-tests/unit/tasks/pipeline-test.js on lines 226..226
              node-tests/unit/tasks/pipeline-test.js on lines 227..227
              node-tests/unit/tasks/pipeline-test.js on lines 228..228
              node-tests/unit/tasks/pipeline-test.js on lines 229..229
              node-tests/unit/tasks/pipeline-test.js on lines 230..230
              node-tests/unit/tasks/pipeline-test.js on lines 231..231

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

                      expect(logLines[17]).to.eq(chalk.styles.blue.close + chalk.styles.blue.open + '|');
              Severity: Major
              Found in node-tests/unit/tasks/pipeline-test.js and 17 other locations - About 1 hr to fix
              node-tests/unit/tasks/pipeline-test.js on lines 214..214
              node-tests/unit/tasks/pipeline-test.js on lines 215..215
              node-tests/unit/tasks/pipeline-test.js on lines 216..216
              node-tests/unit/tasks/pipeline-test.js on lines 217..217
              node-tests/unit/tasks/pipeline-test.js on lines 218..218
              node-tests/unit/tasks/pipeline-test.js on lines 219..219
              node-tests/unit/tasks/pipeline-test.js on lines 220..220
              node-tests/unit/tasks/pipeline-test.js on lines 221..221
              node-tests/unit/tasks/pipeline-test.js on lines 222..222
              node-tests/unit/tasks/pipeline-test.js on lines 223..223
              node-tests/unit/tasks/pipeline-test.js on lines 224..224
              node-tests/unit/tasks/pipeline-test.js on lines 225..225
              node-tests/unit/tasks/pipeline-test.js on lines 226..226
              node-tests/unit/tasks/pipeline-test.js on lines 227..227
              node-tests/unit/tasks/pipeline-test.js on lines 228..228
              node-tests/unit/tasks/pipeline-test.js on lines 229..229
              node-tests/unit/tasks/pipeline-test.js on lines 231..231

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

                      expect(logLines[18]).to.eq(chalk.styles.blue.close + chalk.styles.blue.open + 'Pipeline complete');
              Severity: Major
              Found in node-tests/unit/tasks/pipeline-test.js and 17 other locations - About 1 hr to fix
              node-tests/unit/tasks/pipeline-test.js on lines 214..214
              node-tests/unit/tasks/pipeline-test.js on lines 215..215
              node-tests/unit/tasks/pipeline-test.js on lines 216..216
              node-tests/unit/tasks/pipeline-test.js on lines 217..217
              node-tests/unit/tasks/pipeline-test.js on lines 218..218
              node-tests/unit/tasks/pipeline-test.js on lines 219..219
              node-tests/unit/tasks/pipeline-test.js on lines 220..220
              node-tests/unit/tasks/pipeline-test.js on lines 221..221
              node-tests/unit/tasks/pipeline-test.js on lines 222..222
              node-tests/unit/tasks/pipeline-test.js on lines 223..223
              node-tests/unit/tasks/pipeline-test.js on lines 224..224
              node-tests/unit/tasks/pipeline-test.js on lines 225..225
              node-tests/unit/tasks/pipeline-test.js on lines 226..226
              node-tests/unit/tasks/pipeline-test.js on lines 227..227
              node-tests/unit/tasks/pipeline-test.js on lines 228..228
              node-tests/unit/tasks/pipeline-test.js on lines 229..229
              node-tests/unit/tasks/pipeline-test.js on lines 230..230

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

                      expect(logLines[ 5]).to.eq(chalk.styles.blue.close + chalk.styles.blue.open + '|');
              Severity: Major
              Found in node-tests/unit/tasks/pipeline-test.js and 17 other locations - About 1 hr to fix
              node-tests/unit/tasks/pipeline-test.js on lines 214..214
              node-tests/unit/tasks/pipeline-test.js on lines 215..215
              node-tests/unit/tasks/pipeline-test.js on lines 216..216
              node-tests/unit/tasks/pipeline-test.js on lines 217..217
              node-tests/unit/tasks/pipeline-test.js on lines 219..219
              node-tests/unit/tasks/pipeline-test.js on lines 220..220
              node-tests/unit/tasks/pipeline-test.js on lines 221..221
              node-tests/unit/tasks/pipeline-test.js on lines 222..222
              node-tests/unit/tasks/pipeline-test.js on lines 223..223
              node-tests/unit/tasks/pipeline-test.js on lines 224..224
              node-tests/unit/tasks/pipeline-test.js on lines 225..225
              node-tests/unit/tasks/pipeline-test.js on lines 226..226
              node-tests/unit/tasks/pipeline-test.js on lines 227..227
              node-tests/unit/tasks/pipeline-test.js on lines 228..228
              node-tests/unit/tasks/pipeline-test.js on lines 229..229
              node-tests/unit/tasks/pipeline-test.js on lines 230..230
              node-tests/unit/tasks/pipeline-test.js on lines 231..231

              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

              Severity
              Category
              Status
              Source
              Language