juanmard/icestudio

View on GitHub

Showing 447 of 447 total issues

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

      return nodeSha1(
        prefix + new Date().getTime() + Math.floor(Math.random() * 1000)
      ).toString();
Severity: Minor
Found in iceplugmanager.js and 1 other location - About 40 mins to fix
iceplugmanager.js on lines 136..138

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

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

      copySelected: {
        linux: {label: 'Ctrl+C', ctrl: true, key: 67},
        mac: {label: '⌘+C', meta: true, key: 67},
      },
Severity: Major
Found in services/shortcuts.js and 9 other locations - About 40 mins to fix
services/shortcuts.js on lines 65..68
services/shortcuts.js on lines 69..72
services/shortcuts.js on lines 83..86
services/shortcuts.js on lines 102..105
services/shortcuts.js on lines 110..113
services/shortcuts.js on lines 119..122
services/shortcuts.js on lines 128..131
services/shortcuts.js on lines 132..135
services/shortcuts.js on lines 136..139

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

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

      uploadCode: {
        linux: {label: 'Ctrl+U', ctrl: true, key: 85},
        mac: {label: '⌘+U', meta: true, key: 85},
      },
Severity: Major
Found in services/shortcuts.js and 9 other locations - About 40 mins to fix
services/shortcuts.js on lines 65..68
services/shortcuts.js on lines 69..72
services/shortcuts.js on lines 83..86
services/shortcuts.js on lines 102..105
services/shortcuts.js on lines 106..109
services/shortcuts.js on lines 110..113
services/shortcuts.js on lines 119..122
services/shortcuts.js on lines 128..131
services/shortcuts.js on lines 132..135

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

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

      verifyCode: {
        linux: {label: 'Ctrl+R', ctrl: true, key: 82},
        mac: {label: '⌘+R', meta: true, key: 82},
      },
Severity: Major
Found in services/shortcuts.js and 9 other locations - About 40 mins to fix
services/shortcuts.js on lines 65..68
services/shortcuts.js on lines 69..72
services/shortcuts.js on lines 83..86
services/shortcuts.js on lines 102..105
services/shortcuts.js on lines 106..109
services/shortcuts.js on lines 110..113
services/shortcuts.js on lines 119..122
services/shortcuts.js on lines 132..135
services/shortcuts.js on lines 136..139

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

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

      openProject: {
        linux: {label: 'Ctrl+O', ctrl: true, key: 79},
        mac: {label: '⌘+O', meta: true, key: 79},
      },
Severity: Major
Found in services/shortcuts.js and 9 other locations - About 40 mins to fix
services/shortcuts.js on lines 65..68
services/shortcuts.js on lines 83..86
services/shortcuts.js on lines 102..105
services/shortcuts.js on lines 106..109
services/shortcuts.js on lines 110..113
services/shortcuts.js on lines 119..122
services/shortcuts.js on lines 128..131
services/shortcuts.js on lines 132..135
services/shortcuts.js on lines 136..139

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

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

      selectAll: {
        linux: {label: 'Ctrl+A', ctrl: true, key: 65},
        mac: {label: '⌘+A', meta: true, key: 65},
      },
Severity: Major
Found in services/shortcuts.js and 9 other locations - About 40 mins to fix
services/shortcuts.js on lines 65..68
services/shortcuts.js on lines 69..72
services/shortcuts.js on lines 83..86
services/shortcuts.js on lines 102..105
services/shortcuts.js on lines 106..109
services/shortcuts.js on lines 110..113
services/shortcuts.js on lines 128..131
services/shortcuts.js on lines 132..135
services/shortcuts.js on lines 136..139

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

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

      buildCode: {
        linux: {label: 'Ctrl+B', ctrl: true, key: 66},
        mac: {label: '⌘+B', meta: true, key: 66},
      },
Severity: Major
Found in services/shortcuts.js and 9 other locations - About 40 mins to fix
services/shortcuts.js on lines 65..68
services/shortcuts.js on lines 69..72
services/shortcuts.js on lines 83..86
services/shortcuts.js on lines 102..105
services/shortcuts.js on lines 106..109
services/shortcuts.js on lines 110..113
services/shortcuts.js on lines 119..122
services/shortcuts.js on lines 128..131
services/shortcuts.js on lines 136..139

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

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

      pasteSelected: {
        linux: {label: 'Ctrl+V', ctrl: true, key: 86},
        mac: {label: '⌘+V', meta: true, key: 86},
      },
Severity: Major
Found in services/shortcuts.js and 9 other locations - About 40 mins to fix
services/shortcuts.js on lines 65..68
services/shortcuts.js on lines 69..72
services/shortcuts.js on lines 83..86
services/shortcuts.js on lines 102..105
services/shortcuts.js on lines 106..109
services/shortcuts.js on lines 119..122
services/shortcuts.js on lines 128..131
services/shortcuts.js on lines 132..135
services/shortcuts.js on lines 136..139

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

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

      cutSelected: {
        linux: {label: 'Ctrl+X', ctrl: true, key: 88},
        mac: {label: '⌘+X', meta: true, key: 88},
      },
Severity: Major
Found in services/shortcuts.js and 9 other locations - About 40 mins to fix
services/shortcuts.js on lines 65..68
services/shortcuts.js on lines 69..72
services/shortcuts.js on lines 83..86
services/shortcuts.js on lines 106..109
services/shortcuts.js on lines 110..113
services/shortcuts.js on lines 119..122
services/shortcuts.js on lines 128..131
services/shortcuts.js on lines 132..135
services/shortcuts.js on lines 136..139

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

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

      newProject: {
        linux: {label: 'Ctrl+N', ctrl: true, key: 78},
        mac: {label: '⌘+N', meta: true, key: 78},
      },
Severity: Major
Found in services/shortcuts.js and 9 other locations - About 40 mins to fix
services/shortcuts.js on lines 69..72
services/shortcuts.js on lines 83..86
services/shortcuts.js on lines 102..105
services/shortcuts.js on lines 106..109
services/shortcuts.js on lines 110..113
services/shortcuts.js on lines 119..122
services/shortcuts.js on lines 128..131
services/shortcuts.js on lines 132..135
services/shortcuts.js on lines 136..139

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

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

      quit: {
        linux: {label: 'Ctrl+Q', ctrl: true, key: 81},
        mac: {label: '⌘+Q', meta: true, key: 81},
      },
Severity: Major
Found in services/shortcuts.js and 9 other locations - About 40 mins to fix
services/shortcuts.js on lines 65..68
services/shortcuts.js on lines 69..72
services/shortcuts.js on lines 102..105
services/shortcuts.js on lines 106..109
services/shortcuts.js on lines 110..113
services/shortcuts.js on lines 119..122
services/shortcuts.js on lines 128..131
services/shortcuts.js on lines 132..135
services/shortcuts.js on lines 136..139

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

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

        if (collection.package) {
          dest = collection.package.replace(pattern, collection.name);
          safeExtract(collection.package, dest, zip);
        }
Severity: Minor
Found in services/tools.js and 1 other location - About 40 mins to fix
services/tools.js on lines 1035..1038

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

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

        if (collection.readme) {
          dest = collection.readme.replace(pattern, collection.name);
          safeExtract(collection.readme, dest, zip);
        }
Severity: Minor
Found in services/tools.js and 1 other location - About 40 mins to fix
services/tools.js on lines 1031..1034

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

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 _navigateProject has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

      function _navigateProject(update, prj, submodule, submoduleId, editMode) {
Severity: Minor
Found in controllers/design.js - About 35 mins to fix

    Function _addBlockFile has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

          function _addBlockFile(self, orig, name, data, notify) {
    Severity: Minor
    Found in services/project.js - About 35 mins to fix

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

        update: function () {
          'use strict';
      
          this.renderPorts();
          joint.dia.ElementView.prototype.update.apply(this, arguments);
      Severity: Minor
      Found in graphics/joint.shapes.js and 2 other locations - About 35 mins to fix
      graphics/joint.shapes.js on lines 1128..1133
      graphics/joint.shapes.js on lines 1470..1475

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

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

        update: function () {
          'use strict';
      
          this.renderPorts();
          joint.dia.ElementView.prototype.update.apply(this, arguments);
      Severity: Minor
      Found in graphics/joint.shapes.js and 2 other locations - About 35 mins to fix
      graphics/joint.shapes.js on lines 481..486
      graphics/joint.shapes.js on lines 1128..1133

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

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

        update: function () {
          'use strict';
      
          this.renderPorts();
          joint.dia.ElementView.prototype.update.apply(this, arguments);
      Severity: Minor
      Found in graphics/joint.shapes.js and 2 other locations - About 35 mins to fix
      graphics/joint.shapes.js on lines 481..486
      graphics/joint.shapes.js on lines 1470..1475

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

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

            pendingTasks.push({
              e: sels[i],
              property: 'height',
              value: Math.round(bbox.height) + 'px',
            });
      Severity: Major
      Found in graphics/joint.selection.js and 4 other locations - About 35 mins to fix
      graphics/joint.selection.js on lines 437..441
      graphics/joint.shapes.js on lines 768..772
      graphics/joint.shapes.js on lines 773..777
      graphics/joint.shapes.js on lines 1512..1516

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

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

            pendingTasks.push({
              e: sels[i],
              property: 'width',
              value: Math.round(bbox.width) + 'px',
            });
      Severity: Major
      Found in graphics/joint.selection.js and 4 other locations - About 35 mins to fix
      graphics/joint.selection.js on lines 442..446
      graphics/joint.shapes.js on lines 768..772
      graphics/joint.shapes.js on lines 773..777
      graphics/joint.shapes.js on lines 1512..1516

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

      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