cipele46/cipele46-web

View on GitHub

Showing 182 of 215 total issues

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

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

    Function enableCssMediaQueries has a Cognitive Complexity of 268 (exceeds 5 allowed). Consider refactoring.
    Open

    domReady(function enableCssMediaQueries(){
    var _37;
    var _38={LENGTH_UNIT:/[0-9]+(em|ex|px|in|cm|mm|pt|pc)$/,RESOLUTION_UNIT:/[0-9]+(dpi|dpcm)$/,ASPECT_RATIO:/^[0-9]+\/[0-9]+$/,ABSOLUTE_VALUE:/^[0-9]*(\.[0-9]+)*$/};
    var _39=[];
    var _3a=function(){
    Severity: Minor
    Found in public/js/css3-mediaqueries.js - About 5 days 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 cssHelper has a Cognitive Complexity of 185 (exceeds 5 allowed). Consider refactoring.
    Open

    var cssHelper=function(){
    var _3={BLOCKS:/[^\s{][^{]*\{(?:[^{}]*\{[^{}]*\}[^{}]*|[^{}]*)*\}/g,BLOCKS_INSIDE:/[^\s{][^{]*\{[^{}]*\}/g,DECLARATIONS:/[a-zA-Z\-]+[^;]*:[^;]+;/g,RELATIVE_URLS:/url\(['"]?([^\/\)'"][^:\)'"]+)['"]?\)/g,REDUNDANT_COMPONENTS:/(?:\/\*([^*\\\\]|\*(?!\/))+\*\/|@import[^;]+;)/g,REDUNDANT_WHITESPACE:/\s*(,|:|;|\{|\})\s*/g,MORE_WHITESPACE:/\s{2,}/g,FINAL_SEMICOLONS:/;\}/g,NOT_WHITESPACE:/\S+/g};
    var _4,_5=false;
    var _6=[];
    var _7=function(fn){
    Severity: Minor
    Found in public/js/css3-mediaqueries.js - About 3 days 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 cssHelper has 412 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var cssHelper=function(){
    var _3={BLOCKS:/[^\s{][^{]*\{(?:[^{}]*\{[^{}]*\}[^{}]*|[^{}]*)*\}/g,BLOCKS_INSIDE:/[^\s{][^{]*\{[^{}]*\}/g,DECLARATIONS:/[a-zA-Z\-]+[^;]*:[^;]+;/g,RELATIVE_URLS:/url\(['"]?([^\/\)'"][^:\)'"]+)['"]?\)/g,REDUNDANT_COMPONENTS:/(?:\/\*([^*\\\\]|\*(?!\/))+\*\/|@import[^;]+;)/g,REDUNDANT_WHITESPACE:/\s*(,|:|;|\{|\})\s*/g,MORE_WHITESPACE:/\s{2,}/g,FINAL_SEMICOLONS:/;\}/g,NOT_WHITESPACE:/\S+/g};
    var _4,_5=false;
    var _6=[];
    var _7=function(fn){
    Severity: Major
    Found in public/js/css3-mediaqueries.js - About 2 days to fix

      File css3-mediaqueries.js has 777 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      if(typeof Object.create!=="function"){
      Object.create=function(o){
      function F(){
      };
      F.prototype=o;
      Severity: Major
      Found in public/js/css3-mediaqueries.js - About 1 day to fix

        Function countdown has 348 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $.fn.countdown = function( method /*,options*/ ) {  
            
                var defaults = {
                        date: (new Date()),
                        updateTime: 1000,
        Severity: Major
        Found in public/js/jquery.jcountdown1.3.js - About 1 day to fix

          Function enableCssMediaQueries has 287 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          domReady(function enableCssMediaQueries(){
          var _37;
          var _38={LENGTH_UNIT:/[0-9]+(em|ex|px|in|cm|mm|pt|pc)$/,RESOLUTION_UNIT:/[0-9]+(dpi|dpcm)$/,ASPECT_RATIO:/^[0-9]+\/[0-9]+$/,ABSOLUTE_VALUE:/^[0-9]*(\.[0-9]+)*$/};
          var _39=[];
          var _3a=function(){
          Severity: Major
          Found in public/js/css3-mediaqueries.js - About 1 day to fix

            Function ajax has 237 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 public/js/jquery.js - About 1 day to fix

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

              jQuery.support = (function() {
              
                  var support,
                      all,
                      a,
              Severity: Major
              Found in public/js/jquery.js - About 5 hrs to fix

                Function _40 has 131 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var _40=function(_41,_42){
                var l=_41.length;
                var min=(_41.substring(0,4)==="min-");
                var max=(!min&&_41.substring(0,4)==="max-");
                if(_42!==null){
                Severity: Major
                Found in public/js/css3-mediaqueries.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 public/js/jquery.js - About 5 hrs to fix

                    Function Callbacks has 125 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 public/js/jquery.js - About 5 hrs to fix

                      Function app has 121 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var app = (function($, window, document, undefined) {
                          var $window = $(window),
                              $document = $(document);
                      
                          var _pageInit = function() {
                      Severity: Major
                      Found in app/assets/javascripts/front/app.js - About 4 hrs to fix

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

                        /* 
                        * jCountdown 1.3 jQuery Plugin
                        * Copyright 2011 Tom Ellis http://www.webmuse.co.uk
                        * Licensed under MIT License
                        * See http://www.webmuse.co.uk/license/
                        Severity: Minor
                        Found in public/js/jquery.jcountdown1.3.js - About 4 hrs to fix

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

                              trigger: function( event, data, elem, onlyHandlers ) {
                                  // Don't do events on text and comment nodes
                                  if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
                                      return;
                                  }
                          Severity: Major
                          Found in public/js/jquery.js - About 3 hrs to fix

                            Function send has 90 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 public/js/jquery.js - About 3 hrs to fix

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

                              function defaultPrefilter( elem, props, opts ) {
                                  var index, prop, value, length, dataShow, tween, hooks, oldfire,
                                      anim = this,
                                      style = elem.style,
                                      orig = {},
                              Severity: Major
                              Found in public/js/jquery.js - About 3 hrs to fix

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

                                    clean: function( elems, context, fragment, scripts ) {
                                        var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags,
                                            safe = context === document && safeFragment,
                                            ret = [];
                                
                                Severity: Major
                                Found in public/js/jquery.js - About 3 hrs to fix

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

                                                  init: function( options ){
                                                      
                                                      var opts = $.extend( {}, defaults, options ),
                                                          template;
                                                      
                                  Severity: Major
                                  Found in public/js/jquery.jcountdown1.3.js - About 3 hrs to fix

                                    Function app has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    var app = (function($, window, document, undefined) {
                                        var $window = $(window),
                                            $document = $(document);
                                    
                                        var _pageInit = function() {
                                    Severity: Minor
                                    Found in app/assets/javascripts/front/app.js - About 3 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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language