wbrefvem/corkboard

View on GitHub

Showing 212 of 212 total issues

File jquery.js has 6570 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v1.9.1
 * http://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in static/admin/js/jquery.js - About 2 wks to fix

    Function ajax has 241 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        ajax: function( url, options ) {
    
            // If url is an object, simulate pre-1.5 signature
            if ( typeof url === "object" ) {
                options = url;
    Severity: Major
    Found in static/admin/js/jquery.js - About 1 day to fix

      Function setDocument has 230 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      setDocument = Sizzle.setDocument = function( node ) {
          var doc = node ? node.ownerDocument || node : preferredDoc;
      
          // If no document and documentElement is available, return
          if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
      Severity: Major
      Found in static/admin/js/jquery.js - About 1 day to fix

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

            var initPrepopulatedFields = function(row) {
              row.find('.prepopulated_field').each(function() {
                var field = $(this),
                    input = field.find('input, select, textarea'),
                    dependency_list = input.data('dependency_list') || [],
        Severity: Major
        Found in static/admin/js/inlines.js and 1 other location - About 7 hrs to fix
        static/admin/js/inlines.js on lines 173..186

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

        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

            var initPrepopulatedFields = function(row) {
              row.find('.prepopulated_field').each(function() {
                var field = $(this),
                    input = field.find('input, select, textarea'),
                    dependency_list = input.data('dependency_list') || [],
        Severity: Major
        Found in static/admin/js/inlines.js and 1 other location - About 7 hrs to fix
        static/admin/js/inlines.js on lines 239..252

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

        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 (typeof SelectFilter != "undefined"){
                $(".selectfilter").each(function(index, value){
                  var namearr = value.name.split('-');
                  SelectFilter.init(value.id, namearr[namearr.length-1], false, options.adminStaticPrefix);
                });
        Severity: Major
        Found in static/admin/js/inlines.js and 1 other location - About 5 hrs to fix
        static/admin/js/inlines.js on lines 161..170

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

        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 (typeof SelectFilter != 'undefined'){
                $('.selectfilter').each(function(index, value){
                  var namearr = value.name.split('-');
                  SelectFilter.init(value.id, namearr[namearr.length-1], false, options.adminStaticPrefix );
                });
        Severity: Major
        Found in static/admin/js/inlines.js and 1 other location - About 5 hrs to fix
        static/admin/js/inlines.js on lines 227..236

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

        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

        Function Callbacks has 127 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        jQuery.Callbacks = function( options ) {
        
            // Convert options from String-formatted to Object-formatted if needed
            // (we check in cache first)
            options = typeof options === "string" ?
        Severity: Major
        Found in static/admin/js/jquery.js - About 5 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                      if ( event.pageX == null && original.clientX != null ) {
                          eventDoc = event.target.ownerDocument || document;
                          doc = eventDoc.documentElement;
                          body = eventDoc.body;
          
          
          Severity: Critical
          Found in static/admin/js/jquery.js - About 5 hrs to fix

            Function actions has 123 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                $.fn.actions = function(opts) {
                    var options = $.extend({}, $.fn.actions.defaults, opts);
                    var actionCheckboxes = $(this);
                    var list_editable_changed = false;
                    var checker = function(checked) {
            Severity: Major
            Found in static/admin/js/actions.js - About 4 hrs to fix

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

              function findPosY(obj) {
                  var curtop = 0;
                  if (obj.offsetParent) {
                      while (obj.offsetParent) {
                          curtop += obj.offsetTop - ((isOpera) ? 0 : obj.scrollTop);
              Severity: Major
              Found in static/admin/js/core.js and 1 other location - About 4 hrs to fix
              static/admin/js/core.js on lines 85..100

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

              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

              function findPosX(obj) {
                  var curleft = 0;
                  if (obj.offsetParent) {
                      while (obj.offsetParent) {
                          curleft += obj.offsetLeft - ((isOpera) ? 0 : obj.scrollLeft);
              Severity: Major
              Found in static/admin/js/core.js and 1 other location - About 4 hrs to fix
              static/admin/js/core.js on lines 102..117

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

              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

              Function support has 119 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              jQuery.support = (function() {
              
                  var support, all, a,
                      input, select, fragment,
                      opt, eventName, isSupported, i,
              Severity: Major
              Found in static/admin/js/jquery.js - About 4 hrs to fix

                Function defaultPrefilter has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function defaultPrefilter( elem, props, opts ) {
                    /*jshint validthis:true */
                    var prop, index, length,
                        value, dataShow, toggle,
                        tween, hooks, oldfire,
                Severity: Major
                Found in static/admin/js/jquery.js - About 3 hrs to fix

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

                      $rows.formset({
                        prefix: options.prefix,
                        addText: options.addText,
                        formCssClass: "dynamic-" + options.prefix,
                        deleteCssClass: "inline-deletelink",
                  Severity: Major
                  Found in static/admin/js/inlines.js and 1 other location - About 3 hrs to fix
                  static/admin/js/inlines.js on lines 254..268

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

                  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

                      $rows.formset({
                        prefix: options.prefix,
                        addText: options.addText,
                        formCssClass: "dynamic-" + options.prefix,
                        deleteCssClass: "inline-deletelink",
                  Severity: Major
                  Found in static/admin/js/inlines.js and 1 other location - About 3 hrs to fix
                  static/admin/js/inlines.js on lines 188..202

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

                  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

                  Function trigger has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      trigger: function( event, data, elem, onlyHandlers ) {
                          var handle, ontype, cur,
                              bubbleType, special, tmp, i,
                              eventPath = [ elem || document ],
                              type = core_hasOwn.call( event, "type" ) ? event.type : event,
                  Severity: Major
                  Found in static/admin/js/jquery.js - About 3 hrs to fix

                    Function formset has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      $.fn.formset = function(opts) {
                        var options = $.extend({}, $.fn.formset.defaults, opts);
                        var $this = $(this);
                        var $parent = $this.parent();
                        var updateElementIndex = function(el, prefix, ndx) {
                    Severity: Major
                    Found in static/admin/js/inlines.js - About 3 hrs to fix

                      Function Animation has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function Animation( elem, properties, options ) {
                          var result,
                              stopped,
                              index = 0,
                              length = animationPrefilters.length,
                      Severity: Major
                      Found in static/admin/js/jquery.js - About 3 hrs to fix

                        Function send has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                        send: function( headers, complete ) {
                        
                                            // Get a new xhr
                                            var handle, i,
                                                xhr = s.xhr();
                        Severity: Major
                        Found in static/admin/js/jquery.js - About 3 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language