sicambria/skilltree

View on GitHub

Showing 537 of 537 total issues

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

    deleteBtn.onclick = function () {
        var children = [];
        getChildren(skillsToAdd, skillsToAdd.find(obj => obj.name == skillList.options[skillList.selectedIndex].text), children);

        if (children.length == 0) {
new design/draft_create_skill_modal_design/user/chartandtree.js on lines 746..769
new design/draft_create_skill_modal_design/user/chartandtree.js on lines 877..900

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

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

    deleteBtn.onclick = function () {
        var children = [];
        getChildren(skillsToAdd, skillsToAdd.find(obj => obj.name == skillList.options[skillList.selectedIndex].text), children);

        if (children.length == 0) {
new design/draft_create_skill_modal_design/user/chartandtree.js on lines 589..612
new design/draft_create_skill_modal_design/user/chartandtree.js on lines 746..769

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

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

class Link {
    constructor (textString, url, style, underline) {
        var link = new PIXI.Container();

        var text = new PIXI.Text(textString, style);
Severity: Major
Found in new design/draft_offers_modal_design/user/classes/link.js and 2 other locations - About 2 days to fix
new design/draft_create_skill_modal_design/user/classes/link.js on lines 1..40
public/user/classes/link.js on lines 1..40

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

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

class Link {
    constructor (textString, url, style, underline) {
        var link = new PIXI.Container();

        var text = new PIXI.Text(textString, style);
Severity: Major
Found in public/user/classes/link.js and 2 other locations - About 2 days to fix
new design/draft_create_skill_modal_design/user/classes/link.js on lines 1..40
new design/draft_offers_modal_design/user/classes/link.js on lines 1..40

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

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

class Link {
    constructor (textString, url, style, underline) {
        var link = new PIXI.Container();

        var text = new PIXI.Text(textString, style);
new design/draft_offers_modal_design/user/classes/link.js on lines 1..40
public/user/classes/link.js on lines 1..40

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

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 approveTrainings () {
    hideMenus();

    var approveTrees = document.getElementById("approveTrainings");
    approveTrees.style.display = "block";
Severity: Major
Found in new design/draft_offers_modal_design/user/chartandtree.js and 1 other location - About 2 days to fix
public/user/chartandtree.js on lines 1049..1080

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

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 approveTrainings () {
    hideMenus();

    var approveTrees = document.getElementById("approveTrainings");
    approveTrees.style.display = "block";
Severity: Major
Found in public/user/chartandtree.js and 1 other location - About 2 days to fix
new design/draft_offers_modal_design/user/chartandtree.js on lines 1048..1079

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

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

File chartandtree.js has 904 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var data = undefined;
var change = false;
initData();

// creates the pixi app
Severity: Major
Found in new design/draft_offers_modal_design/user/chartandtree.js - About 2 days to fix

    File chartandtree.js has 868 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    var data = undefined;
    initData();
    
    // creates the pixi app
    var app = new PIXI.Application({
    Severity: Major
    Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 2 days to fix

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

      function approveTrees() {
          hideMenus();
      
          var approveTrees = document.getElementById("approveTrees");
          approveTrees.style.display = "block";
      Severity: Major
      Found in new design/draft_offers_modal_design/user/chartandtree.js and 1 other location - About 2 days to fix
      public/user/chartandtree.js on lines 960..990

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

      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 approveTrees() {
          hideMenus();
      
          var approveTrees = document.getElementById("approveTrees");
          approveTrees.style.display = "block";
      Severity: Major
      Found in public/user/chartandtree.js and 1 other location - About 2 days to fix
      new design/draft_offers_modal_design/user/chartandtree.js on lines 959..989

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

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

      function searchSkillsByName(element, global){
          var skillToSearch = {value: element.value};
          var skillSearchResult = document.getElementById('skillSearchResult');
          if (global) {
              request('POST', '/protected/searchSkillsByName', skillToSearch, function () {
      Severity: Major
      Found in public/user/src/search.js and 5 other locations - About 1 day to fix
      new design/draft_create_skill_modal_design/user/src/search.js on lines 21..45
      new design/draft_create_skill_modal_design/user/src/search.js on lines 48..71
      new design/draft_offers_modal_design/user/src/search.js on lines 20..43
      new design/draft_offers_modal_design/user/src/search.js on lines 46..69
      public/user/src/search.js on lines 20..43

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

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

      function searchSkillsByName(element, global){
          var skillToSearch = {value: element.value};
          var skillSearchResult = document.getElementById('skillSearchResult');
          if (global) {
              request('POST', '/protected/searchSkillsByName', skillToSearch, function () {
      Severity: Major
      Found in new design/draft_offers_modal_design/user/src/search.js and 5 other locations - About 1 day to fix
      new design/draft_create_skill_modal_design/user/src/search.js on lines 21..45
      new design/draft_create_skill_modal_design/user/src/search.js on lines 48..71
      new design/draft_offers_modal_design/user/src/search.js on lines 20..43
      public/user/src/search.js on lines 20..43
      public/user/src/search.js on lines 46..69

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 321.

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

      function searchTreesByName (element, global) {
          var treeToSearch = {value: element.value};
          var TreeSearchResult = document.getElementById('TreeSearchResult');
          if (global) {
              request('POST', '/protected/searchTreesByName', treeToSearch, function() {
      Severity: Major
      Found in new design/draft_offers_modal_design/user/src/search.js and 5 other locations - About 1 day to fix
      new design/draft_create_skill_modal_design/user/src/search.js on lines 21..45
      new design/draft_create_skill_modal_design/user/src/search.js on lines 48..71
      new design/draft_offers_modal_design/user/src/search.js on lines 46..69
      public/user/src/search.js on lines 20..43
      public/user/src/search.js on lines 46..69

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 321.

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

      function searchSkillsByName(element, global){
          var skillToSearch = {value: element.value};
          var skillSearchResult = document.getElementById('skillSearchResult');
          if (global) {
              request('POST', '/protected/searchSkillsByName', skillToSearch, function () {
      new design/draft_create_skill_modal_design/user/src/search.js on lines 21..45
      new design/draft_offers_modal_design/user/src/search.js on lines 20..43
      new design/draft_offers_modal_design/user/src/search.js on lines 46..69
      public/user/src/search.js on lines 20..43
      public/user/src/search.js on lines 46..69

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 321.

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

      function searchTreesByName (element, global) {
          var treeToSearch = {value: element.value};
          var TreeSearchResult = document.getElementById('TreeSearchResult');
          if (global) {
              request('POST', '/protected/searchTreesByName', treeToSearch, function() {
      Severity: Major
      Found in public/user/src/search.js and 5 other locations - About 1 day to fix
      new design/draft_create_skill_modal_design/user/src/search.js on lines 21..45
      new design/draft_create_skill_modal_design/user/src/search.js on lines 48..71
      new design/draft_offers_modal_design/user/src/search.js on lines 20..43
      new design/draft_offers_modal_design/user/src/search.js on lines 46..69
      public/user/src/search.js on lines 46..69

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 321.

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

      function searchTreesByName (element, global) {
          var treeToSearch = {value: element.value};
          var TreeSearchResult = document.getElementById('TreeSearchResult');
      
          if (global) {
      new design/draft_create_skill_modal_design/user/src/search.js on lines 48..71
      new design/draft_offers_modal_design/user/src/search.js on lines 20..43
      new design/draft_offers_modal_design/user/src/search.js on lines 46..69
      public/user/src/search.js on lines 20..43
      public/user/src/search.js on lines 46..69

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 321.

      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 (pixi_display) {
          Object.assign(PIXI.WebGLRenderer.prototype, {
              _lastDisplayOrder: 0,
              _activeLayer: null,
              incDisplayOrder: function () {
      new design/draft_create_skill_modal_design/user/pixi/pixi-layers.js on lines 684..721

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

      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 (pixi_display) {
          Object.assign(PIXI.WebGLRenderer.prototype, {
              _lastDisplayOrder: 0,
              _activeLayer: null,
              incDisplayOrder: function () {
      new design/draft_offers_modal_design/user/pixi/pixi-layers.js on lines 684..721

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

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

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

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

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

      Refactorings

      Further Reading

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

      window.onresize = function () {
          app.renderer.resize(window.innerWidth, window.innerHeight - 60);
      
          if (chartContainer != undefined) {
              var ratio = chartContainer.width / chartContainer.height;
      Severity: Major
      Found in new design/draft_offers_modal_design/user/chartandtree.js and 2 other locations - About 1 day to fix
      new design/draft_create_skill_modal_design/user/chartandtree.js on lines 125..146
      public/user/chartandtree.js on lines 103..124

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

      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