neyric/wireit

View on GitHub
sandbox/grouping/js/Group.js

Summary

Maintainability
F
3 days
Test Coverage

Function generateUI has 141 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    generateUI: function(map, changedCallback)
    {
        if (!Y.Lang.isValue(map))
        map = Y.GroupUtils.getMap(this)
        
Severity: Major
Found in sandbox/grouping/js/Group.js - About 5 hrs to fix

    File Group.js has 397 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (function() {
       
    /**
     * Handles a Group
     * @class Group
    Severity: Minor
    Found in sandbox/grouping/js/Group.js - About 5 hrs to fix

      Function collapse has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          collapse: function(expanded)
          {
              if (Y.Lang.isValue(this.groupContainer))
              return this.groupContainer; //This group is already collapsed
              
      Severity: Major
      Found in sandbox/grouping/js/Group.js - About 2 hrs to fix

        Function addRemapInput has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                var addRemapInput = function(name, moduleId, showOn, showCancel, defaultVisible, defaultName, visibleReadOnly, showSide, defaultSide)
                {
                    var addTds = function(row) {
                        tds = [];
                        
        Severity: Major
        Found in sandbox/grouping/js/Group.js - About 2 hrs to fix

          Function unGroup has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              unGroup: function()
              {
                  if (Y.Lang.isValue(this.groupContainer))
                  {
                  this.expand();
          Severity: Minor
          Found in sandbox/grouping/js/Group.js - About 1 hr to fix

            Function getAndCheckOverrides has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                getAndCheckOverrides: function(containerUIMap, groupUIMap)
                {
                    var tempGroup = {};
                    Y.mix(tempGroup, this);
                    tempGroup.containers = [];
            Severity: Minor
            Found in sandbox/grouping/js/Group.js - About 1 hr to fix

              Function addRemapInput has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      var addRemapInput = function(name, moduleId, showOn, showCancel, defaultVisible, defaultName, visibleReadOnly, showSide, defaultSide)
              Severity: Major
              Found in sandbox/grouping/js/Group.js - About 1 hr to fix

                Function addTerminal has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        var addTerminal = function(internalName, tMap, override, moduleId, fieldTerminals, showOn, showOff)
                Severity: Major
                Found in sandbox/grouping/js/Group.js - About 50 mins to fix

                  Function addField has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          var addField = function(internalName, fMap, override, moduleId, fieldTerminals, showOn, showOff)
                  Severity: Major
                  Found in sandbox/grouping/js/Group.js - About 50 mins to fix

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

                            var addControls = function (fieldsAndTerminals, overrides, results, showOnByIndex, showOffByIndex)
                    Severity: Minor
                    Found in sandbox/grouping/js/Group.js - About 35 mins to fix

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

                              for (var cI in this.containers)
                              {
                              var co = {};
                              co.container = this.containers[cI].container;
                              co.overrides = overrides.containerOverrides[cI];
                      Severity: Major
                      Found in sandbox/grouping/js/Group.js and 1 other location - About 2 hrs to fix
                      sandbox/grouping/js/Group.js on lines 474..481

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

                      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

                              for (var gI in this.groups)
                              {
                              var go = {};
                              go.group = this.groups[gI].group;
                              go.overrides = overrides.groupOverrides[gI];
                      Severity: Major
                      Found in sandbox/grouping/js/Group.js and 1 other location - About 2 hrs to fix
                      sandbox/grouping/js/Group.js on lines 466..473

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

                      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 (!Y.Lang.isValue(index))
                              index = Y.GroupUtils.firstTestSucess(this.groups, function (go) { return go.group == group });
                      Severity: Major
                      Found in sandbox/grouping/js/Group.js and 1 other location - About 1 hr to fix
                      sandbox/grouping/js/Group.js on lines 184..185

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

                      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 (!Y.Lang.isValue(index))
                              index = Y.GroupUtils.firstTestSucess(this.containers, function (co) { return co.container == container; });
                      Severity: Major
                      Found in sandbox/grouping/js/Group.js and 1 other location - About 1 hr to fix
                      sandbox/grouping/js/Group.js on lines 198..199

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

                      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

                              for (var cI in overrides.containerOverrides)
                              {
                              var o =  overrides.containerOverrides[cI];
                              
                              this.containers[cI].overrides = o;
                      Severity: Minor
                      Found in sandbox/grouping/js/Group.js and 1 other location - About 50 mins to fix
                      sandbox/grouping/js/Group.js on lines 508..513

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

                      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

                              for (var gI in overrides.groupOverrides)
                              {
                              var o =  overrides.groupOverrides[cI];
                              
                              this.groups[gI].overrides = o;
                      Severity: Minor
                      Found in sandbox/grouping/js/Group.js and 1 other location - About 50 mins to fix
                      sandbox/grouping/js/Group.js on lines 501..506

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

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

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

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

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

                      Refactorings

                      Further Reading

                      There are no issues that match your filters.

                      Category
                      Status