neyric/wireit

View on GitHub

Showing 179 of 497 total issues

Function initializer has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        initializer: function(args) {    
                
                function onTitleClicked(e, a) {
                 var i = a.findSection(e.target);
                 if (i >= 0) {
Severity: Major
Found in sandbox/yide/accordionView.js - About 2 hrs to fix

    File modules.js has 271 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    var modules= [];
    
    modules[modules.length++] = {
        "name":"xpath",
        "container": {
    Severity: Minor
    Found in sandbox/grouping/examples/sawire/modules.js - About 2 hrs to fix

      File Grouper.js has 268 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      (function() {
      
      /**
       * @class Grouper
       */    
      Severity: Minor
      Found in sandbox/grouping/js/Grouper.js - About 2 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 positionTerminals has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              positionTerminals: function()
              {
              var terminals = {};
              
              for (var i in this.options.terminals)
          Severity: Major
          Found in sandbox/grouping/js/GroupFormContainer.js - About 2 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                if (rule &&
                    (rule == TOK_DIV ||
                     rule == TOK_MOD ||
                     rule == TOK_AND ||
                     rule == TOK_OR) &&
            Severity: Critical
            Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 2 hrs to fix

              Function initializer has 57 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      initializer: function(args) {
              
                         var oMenuBar = new YAHOO.widget.MenuBar("menuContainer2", { 
                             autosubmenudisplay: true, 
                               hidedelay: 750, 
              Severity: Major
              Found in sandbox/yide/menuBar.js - About 2 hrs to fix

                Function LocalStorageSync has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function LocalStorageSync(key) {
                    var localStorage;
                
                    if (!key) {
                        Y.error('No storage key specified.');
                Severity: Major
                Found in src/wireit-app/js/local-storage-sync.js - About 2 hrs to fix

                  Function getOverridesFromUI has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      getOverridesFromUI: function(containerUIMap, groupUIMap)
                      {
                          containerOverrides = [];
                          groupOverrides = [];
                          
                  Severity: Major
                  Found in sandbox/grouping/js/GroupUtils.js - About 2 hrs to fix

                    Function LocalStorageSync has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function LocalStorageSync(key) {
                        var localStorage;
                    
                        if (!key) {
                            Y.error('No storage key specified.');
                    Severity: Major
                    Found in build/wireit-all/wireit-all.js - About 2 hrs to fix

                      Function LocalStorageSync has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function LocalStorageSync(key) {
                          var localStorage;
                      
                          if (!key) {
                              Y.error('No storage key specified.');
                      Severity: Major
                      Found in build/wireit-app/wireit-app-debug.js - About 2 hrs to fix

                        Function LocalStorageSync has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function LocalStorageSync(key) {
                            var localStorage;
                        
                            if (!key) {
                                Y.error('No storage key specified.');
                        Severity: Major
                        Found in build/wireit-all/wireit-all-debug.js - About 2 hrs to fix

                          Function LocalStorageSync has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function LocalStorageSync(key) {
                              var localStorage;
                          
                              if (!key) {
                                  Y.error('No storage key specified.');
                          Severity: Major
                          Found in build/wireit-app/wireit-app.js - About 2 hrs to fix

                            Function xpathMatchStack has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function xpathMatchStack(stack, pattern) {
                            
                              // NOTE(mesch): The stack matches for variable cardinality are
                              // greedy but don't do backtracking. This would be an issue only
                              // with rules of the form A* A, i.e. with an element with variable
                            Severity: Major
                            Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 2 hrs to fix

                              Function render has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                 render: function() {
                                    Y.LayerContainer.superclass.render.call(this);
                              
                                       this.subLayer = new Y.Layer({layerMap: false, parentEl: this.bodyEl});
                              
                              
                              Severity: Major
                              Found in sandbox/layer-container/layer-container.js - About 2 hrs to fix

                                Function xpathParseInit has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function xpathParseInit() {
                                  if (xpathRules.length) {
                                    return;
                                  }
                                
                                
                                Severity: Major
                                Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 2 hrs to fix

                                  Function replaceChild has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  XNode.prototype.replaceChild = function(newNode, oldNode) {
                                    if (oldNode == newNode) {
                                      return;
                                    }
                                  
                                  
                                  Severity: Minor
                                  Found in sandbox/grouping/examples/sawire/xml/dom.js - About 2 hrs 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

                                  Function removeChild has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  XNode.prototype.removeChild = function(node) {
                                    var newChildren = [];
                                    for (var i = 0; i < this.childNodes.length; ++i) {
                                      var c = this.childNodes[i];
                                      if (c != node) {
                                  Severity: Minor
                                  Found in sandbox/grouping/examples/sawire/xml/dom.js - About 2 hrs 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

                                  Function Php has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  SyntaxHighlighter.brushes.Php = function()
                                  {
                                      var funcs    =    'abs acos acosh addcslashes addslashes ' +
                                                      'array_change_key_case array_chunk array_combine array_count_values array_diff '+
                                                      'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
                                  Severity: Major
                                  Found in sandbox/res/SyntaxHighlighter/shBrushPhp.js - About 2 hrs to fix

                                    Function generateFields has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        generateFields: function(fieldConfigs, overrides, external)
                                        {
                                            var fields = [];
                                            var neededFields = [];
                                            var terminalNamesUsed  = [];
                                    Severity: Major
                                    Found in sandbox/grouping/js/GroupUtils.js - About 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language