fiuba/alfred

View on GitHub

Showing 339 of 654 total issues

Function formatDate has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    formatDate: function (format, date, settings) {
        if (!date)
            return '';
        var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
        var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
Severity: Major
Found in public/javascripts/jquery-ui/jquery-ui.js - About 2 hrs to fix

    Function widget has 70 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    $.widget = function( name, base, prototype ) {
        var fullName, existingConstructor, constructor, basePrototype,
            namespace = name.split( "." )[ 0 ];
    
        name = name.split( "." )[ 1 ];
    Severity: Major
    Found in public/javascripts/jquery-ui/jquery-ui.js - About 2 hrs to fix

      Function domManip has 69 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          domManip: function( args, table, callback ) {
      
              // Flatten any nested arrays
              args = core_concat.apply( [], args );
      
      
      Severity: Major
      Found in public/javascripts/jquery-1.9.0.js - About 2 hrs to fix

        Function matcherFromGroupMatchers has 69 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
            // A counter to specify which element is currently being matched
            var matcherCachedRuns = 0,
                bySet = setMatchers.length > 0,
                byElement = elementMatchers.length > 0,
        Severity: Major
        Found in public/javascripts/jquery-1.9.0.js - About 2 hrs to fix

          Function attachToHTMLTable has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
          Open

          EditableGrid.prototype.attachToHTMLTable = function(_table, _columns)
          {
              // clear model and pointer to current table
              this.data = [];
              this.dataUnfiltered = null;
          Severity: Minor
          Found in public/javascripts/editablegrid-2.0.1.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 _mouseDrag has 68 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _mouseDrag: function(event) {
                  var that = this;
                  this.dragged = true;
          
                  if (this.options.disabled)
          Severity: Major
          Found in public/javascripts/jquery-ui/jquery-ui.js - About 2 hrs to fix

            Function _doKeyDown has 67 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _doKeyDown: function(event) {
                    var inst = $.datepicker._getInst(event.target);
                    var handled = true;
                    var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
                    inst._keyEvent = true;
            Severity: Major
            Found in public/javascripts/jquery-ui/jquery-ui.js - About 2 hrs to fix

              Function _open has 67 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _open: function( event, target, content ) {
                      var tooltip, events, delayedShow,
                          positionOption = $.extend( {}, this.options.position );
              
                      if ( !content ) {
              Severity: Major
              Found in public/javascripts/jquery-ui/jquery-ui.js - About 2 hrs to fix

                Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                    if ( postFilter && !postFilter[ expando ] ) {
                        postFilter = setMatcher( postFilter );
                    }
                    if ( postFinder && !postFinder[ expando ] ) {
                Severity: Major
                Found in public/javascripts/jquery-1.9.0.js - About 2 hrs to fix

                  Function done has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          function done( status, nativeStatusText, responses, headers ) {
                              var isSuccess, success, error, response, modified,
                                  statusText = nativeStatusText;
                  
                              // Called once
                  Severity: Major
                  Found in public/javascripts/jquery-1.9.0.js - About 2 hrs to fix

                    Function filter has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                    Open

                    EditableGrid.prototype.filter = function(filterString)
                    {
                        with (this) {
                    
                            if (typeof filterString != 'undefined') {
                    Severity: Minor
                    Found in public/javascripts/editablegrid-2.0.1.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 bounce has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    $.effects.effect.bounce = function( o, done ) {
                        var el = $( this ),
                            props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
                    
                            // defaults:
                    Severity: Major
                    Found in public/javascripts/jquery-ui/jquery-ui.js - About 2 hrs to fix

                      Function _showDatepicker has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _showDatepicker: function(input) {
                              input = input.target || input;
                              if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
                                  input = $('input', input.parentNode)[0];
                              if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
                      Severity: Major
                      Found in public/javascripts/jquery-ui/jquery-ui.js - About 2 hrs to fix

                        Function superMatcher has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                superMatcher = function( seed, context, xml, results, expandContext ) {
                                    var elem, j, matcher,
                                        setMatched = [],
                                        matchedCount = 0,
                                        i = "0",
                        Severity: Major
                        Found in public/javascripts/jquery-1.9.0.js - About 2 hrs to fix

                          Function drag has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              drag: function(event, ui) {
                          
                                  var inst = $(this).data("draggable"), that = this;
                          
                                  var checkPos = function(o) {
                          Severity: Major
                          Found in public/javascripts/jquery-ui/jquery-ui.js - About 2 hrs to fix

                            Function _create has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                _create: function() {
                                    var that = this,
                                        options = this.options,
                                        active = options.active,
                                        locationHash = location.hash.substring( 1 );
                            Severity: Major
                            Found in public/javascripts/jquery-ui/jquery-ui.js - About 2 hrs to fix

                              Function _mouseStart has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _mouseStart: function(event, overrideHandle, noActivation) {
                              
                                      var o = this.options;
                                      this.currentContainer = this;
                              
                              
                              Severity: Major
                              Found in public/javascripts/jquery-ui/jquery-ui.js - About 2 hrs to fix

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

                                    Deferred: function( func ) {
                                        var tuples = [
                                                // action, add listener, listener list, final state
                                                [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
                                                [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
                                Severity: Major
                                Found in public/javascripts/jquery-1.9.0.js - About 2 hrs to fix

                                  Function CHILD has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          "CHILD": function( type, what, argument, first, last ) {
                                              var simple = type.slice( 0, 3 ) !== "nth",
                                                  forward = type.slice( -4 ) !== "last",
                                                  ofType = what === "of-type";
                                  
                                  
                                  Severity: Major
                                  Found in public/javascripts/jquery-1.9.0.js - About 2 hrs to fix

                                    Function explode has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    $.effects.effect.explode = function( o, done ) {
                                    
                                        var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
                                            cells = rows,
                                            el = $( this ),
                                    Severity: Major
                                    Found in public/javascripts/jquery-ui/jquery-ui.js - About 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language