wbrefvem/corkboard

View on GitHub

Showing 153 of 212 total issues

Function superMatcher has 63 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 static/admin/js/jquery.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 static/admin/js/jquery.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 static/admin/js/jquery.js - About 2 hrs to fix

        Consider simplifying this complex logical expression.
        Open

                                if ( forward && useCache ) {
                                    // Seek `elem` from a previously-cached index
                                    outerCache = parent[ expando ] || (parent[ expando ] = {});
                                    cache = outerCache[ type ] || [];
                                    nodeIndex = cache[0] === dirruns && cache[1];
        Severity: Critical
        Found in static/admin/js/jquery.js - About 2 hrs to fix

          Function init has 58 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              init: function( selector, context, rootjQuery ) {
                  var match, elem;
          
                  // HANDLE: $(""), $(null), $(undefined), $(false)
                  if ( !selector ) {
          Severity: Major
          Found in static/admin/js/jquery.js - About 2 hrs to fix

            File DateTimeShortcuts.js has 263 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            // Inserts shortcut buttons after all of the following:
            //     <input type="text" class="vDateField">
            //     <input type="text" class="vTimeField">
            
            var DateTimeShortcuts = {
            Severity: Minor
            Found in static/admin/js/admin/DateTimeShortcuts.js - About 2 hrs to fix

              Function stackedFormset has 55 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                $.fn.stackedFormset = function(options) {
                  var $rows = $(this);
                  var updateInlineLabel = function(row) {
                    $($rows.selector).find(".inline_label").each(function(i) {
                      var count = i + 1;
              Severity: Major
              Found in static/admin/js/inlines.js - About 2 hrs to fix

                Function tabularFormset has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  $.fn.tabularFormset = function(options) {
                    var $rows = $(this);
                    var alternatingRows = function(row) {
                      $($rows.selector).not(".add-row").removeClass("row1 row2")
                        .filter(":even").addClass("row1").end()
                Severity: Major
                Found in static/admin/js/inlines.js - About 2 hrs to fix

                  File forms.py has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  from django import forms
                  from cascade import models
                  from django.conf import settings
                  
                  FIELDS = [
                  Severity: Minor
                  Found in cascade/forms.py - About 2 hrs to fix

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

                        draw: function(month, year, div_id, callback, selected) { // month = 1-12, year = 1-9999
                            var today = new Date();
                            var todayDay = today.getDate();
                            var todayMonth = today.getMonth()+1;
                            var todayYear = today.getFullYear();
                    Severity: Minor
                    Found in static/admin/js/calendar.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 ajaxConvert has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function ajaxConvert( s, response ) {
                        var conv2, current, conv, tmp,
                            converters = {},
                            i = 0,
                            // Work with a copy of dataTypes in case we need to modify it for conversion
                    Severity: Major
                    Found in static/admin/js/jquery.js - About 2 hrs to fix

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

                      function internalData( elem, name, data, pvt /* Internal Use Only */ ){
                          if ( !jQuery.acceptData( elem ) ) {
                              return;
                          }
                      
                      
                      Severity: Major
                      Found in static/admin/js/jquery.js - About 2 hrs to fix

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

                            remove: function( elem, types, handler, selector, mappedTypes ) {
                                var j, handleObj, tmp,
                                    origCount, t, events,
                                    special, handlers, type,
                                    namespaces, origType,
                        Severity: Major
                        Found in static/admin/js/jquery.js - About 2 hrs to fix

                          Function draw has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              draw: function(month, year, div_id, callback, selected) { // month = 1-12, year = 1-9999
                                  var today = new Date();
                                  var todayDay = today.getDate();
                                  var todayMonth = today.getMonth()+1;
                                  var todayYear = today.getFullYear();
                          Severity: Minor
                          Found in static/admin/js/calendar.js - About 2 hrs to fix

                            Consider simplifying this complex logical expression.
                            Open

                                            if ( ( mappedTypes || origType === handleObj.origType ) &&
                                                ( !handler || handler.guid === handleObj.guid ) &&
                                                ( !tmp || tmp.test( handleObj.namespace ) ) &&
                                                ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
                                                handlers.splice( j, 1 );
                            Severity: Critical
                            Found in static/admin/js/jquery.js - About 2 hrs to fix

                              Function addCalendar has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  addCalendar: function(inp) {
                                      var num = DateTimeShortcuts.calendars.length;
                              
                                      DateTimeShortcuts.calendarInputs[num] = inp;
                                      DateTimeShortcuts.dismissCalendarFunc[num] = function() { DateTimeShortcuts.dismissCalendar(num); return true; };
                              Severity: Minor
                              Found in static/admin/js/admin/DateTimeShortcuts.js - About 1 hr to fix

                                Function internalRemoveData has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function internalRemoveData( elem, name, pvt ) {
                                    if ( !jQuery.acceptData( elem ) ) {
                                        return;
                                    }
                                
                                
                                Severity: Minor
                                Found in static/admin/js/jquery.js - About 1 hr to fix

                                  Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function tokenize( selector, parseOnly ) {
                                      var matched, match, tokens, type,
                                          soFar, groups, preFilters,
                                          cached = tokenCache[ selector + " " ];
                                  
                                  
                                  Severity: Minor
                                  Found in static/admin/js/jquery.js - About 1 hr to fix

                                    Function select has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function select( selector, context, results, seed ) {
                                        var i, tokens, token, type, find,
                                            match = tokenize( selector );
                                    
                                        if ( !seed ) {
                                    Severity: Minor
                                    Found in static/admin/js/jquery.js - About 1 hr to fix

                                      Function ajaxHandleResponses has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function ajaxHandleResponses( s, jqXHR, responses ) {
                                          var firstDataType, ct, finalDataType, type,
                                              contents = s.contents,
                                              dataTypes = s.dataTypes,
                                              responseFields = s.responseFields;
                                      Severity: Minor
                                      Found in static/admin/js/jquery.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language