wbrefvem/corkboard

View on GitHub

Showing 153 of 212 total issues

Function attr has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    attr: function( elem, name, value ) {
        var hooks, notxml, ret,
            nType = elem.nodeType;

        // don't get/set attributes on text, comment and attribute nodes
Severity: Minor
Found in static/admin/js/jquery.js - About 1 hr to fix

    Function load has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    jQuery.fn.load = function( url, params, callback ) {
        if ( typeof url !== "string" && _load ) {
            return _load.apply( this, arguments );
        }
    
    
    Severity: Minor
    Found in static/admin/js/jquery.js - About 1 hr to fix

      Function promise has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      jQuery.ready.promise = function( obj ) {
          if ( !readyList ) {
      
              readyList = jQuery.Deferred();
      
      
      Severity: Minor
      Found in static/admin/js/jquery.js - About 1 hr to fix

        Function addTimezoneWarning has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            addTimezoneWarning: function(inp) {
                var $ = django.jQuery;
                var warningClass = DateTimeShortcuts.timezoneWarningClass;
                var timezoneOffset = DateTimeShortcuts.timezoneOffset / 3600;
        
        
        Severity: Minor
        Found in static/admin/js/admin/DateTimeShortcuts.js - About 1 hr to fix

          Function handlers has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              handlers: function( event, handlers ) {
                  var sel, handleObj, matches, i,
                      handlerQueue = [],
                      delegateCount = handlers.delegateCount,
                      cur = event.target;
          Severity: Minor
          Found in static/admin/js/jquery.js - About 1 hr to fix

            Function removeClass has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                removeClass: function( value ) {
                    var classes, elem, cur, clazz, j,
                        i = 0,
                        len = this.length,
                        proceed = arguments.length === 0 || typeof value === "string" && value;
            Severity: Minor
            Found in static/admin/js/jquery.js - About 1 hr to fix

              Function addClass has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  addClass: function( value ) {
                      var classes, elem, cur, clazz, j,
                          i = 0,
                          len = this.length,
                          proceed = typeof value === "string" && value;
              Severity: Minor
              Found in static/admin/js/jquery.js - About 1 hr to fix

                Function html has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    html: function( value ) {
                        return jQuery.access( this, function( value ) {
                            var elem = this[0] || {},
                                i = 0,
                                l = this.length;
                Severity: Minor
                Found in static/admin/js/jquery.js - About 1 hr to fix

                  Function fix has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      fix: function( event ) {
                          if ( event[ jQuery.expando ] ) {
                              return event;
                          }
                  
                  
                  Severity: Minor
                  Found in static/admin/js/jquery.js - About 1 hr to fix

                    Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        finish: function( type ) {
                            if ( type !== false ) {
                                type = type || "fx";
                            }
                            return this.each(function() {
                    Severity: Minor
                    Found in static/admin/js/jquery.js - About 1 hr to fix

                      Function strftime has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Date.prototype.strftime = function(format) {
                          var fields = {
                              c: this.toString(),
                              d: this.getTwoDigitDate(),
                              H: this.getTwoDigitHour(),
                      Severity: Minor
                      Found in static/admin/js/core.js - About 1 hr to fix

                        Function dismissAddAnotherPopup has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function dismissAddAnotherPopup(win, newId, newRepr) {
                            // newId and newRepr are expected to have previously been escaped by
                            // django.utils.html.escape.
                            newId = html_unescape(newId);
                            newRepr = html_unescape(newRepr);
                        Severity: Minor
                        Found in static/admin/js/admin/RelatedObjectLookups.js - About 1 hr 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 Initialize has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            'Initialize': function() {
                                if (Downcoder.map) {  // already made
                                    return;
                                }
                                Downcoder.map = {};
                        Severity: Minor
                        Found in static/admin/js/urlify.js - About 1 hr 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 post has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def post(self, request, *args, **kwargs):
                        
                                form = forms.BlobForm(request.POST, request.FILES)
                        
                                if form.is_valid():
                        Severity: Minor
                        Found in cascade/views.py - About 1 hr 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 propFilter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function propFilter( props, specialEasing ) {
                            var value, name, index, easing, hooks;
                        
                            // camelCase, specialEasing and expand cssHook pass
                            for ( index in props ) {
                        Severity: Minor
                        Found in static/admin/js/jquery.js - About 1 hr to fix

                          Function setup has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  setup: function() {
                          
                                      if ( rformElems.test( this.nodeName ) ) {
                                          // IE doesn't fire change on a check/radio until blur; trigger it on click
                                          // after a propertychange. Eat the blur-change in special.change.handle.
                          Severity: Minor
                          Found in static/admin/js/jquery.js - About 1 hr to fix

                            Function offset has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            jQuery.fn.offset = function( options ) {
                                if ( arguments.length ) {
                                    return options === undefined ?
                                        this :
                                        this.each(function( i ) {
                            Severity: Minor
                            Found in static/admin/js/jquery.js - About 1 hr to fix

                              Function off has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  off: function( types, selector, fn ) {
                                      var handleObj, type;
                                      if ( types && types.preventDefault && types.handleObj ) {
                                          // ( event )  dispatched jQuery.Event
                                          handleObj = types.handleObj;
                              Severity: Minor
                              Found in static/admin/js/jquery.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                                if ( unit !== "px" && start ) {
                                                    // Iteratively approximate from a nonzero starting point
                                                    // Prefer the current property, because this process will be trivial if it uses the same units
                                                    // Fallback to end or a simple constant
                                                    start = jQuery.css( tween.elem, prop, true ) || end || 1;
                                Severity: Major
                                Found in static/admin/js/jquery.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                  if ( jQuery.expr && jQuery.expr.filters ) {
                                      jQuery.expr.filters.hidden = function( elem ) {
                                          // Support: Opera <= 12.12
                                          // Opera reports offsetWidths and offsetHeights less than zero on some elements
                                          return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
                                  Severity: Major
                                  Found in static/admin/js/jquery.js - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language