Showing 463 of 531 total issues

File 08-jquery.ui.autocomplete.js has 471 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery UI Autocomplete 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
Severity: Minor
Found in static/script/08-jquery.ui.autocomplete.js - About 7 hrs to fix

    Method call has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
    Open

      def call(context, page)
        geometry = context.params[:geometry]
        trim = context.params[:trim]
        ps = page.mime.to_s =~ /postscript/
        if ps || page.mime == 'application/pdf'
    Severity: Minor
    Found in plugins/aspects/image.rb - About 6 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 _setDimension has 167 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _setDimension: function () {
                var viewport   = F.getViewport(),
                    steps      = 0,
                    canShrink  = false,
                    canExpand  = false,
    Severity: Major
    Found in plugins/misc/fancybox/script/01-jquery.fancybox.js - About 6 hrs to fix

      File 06-jquery.ui.position.js has 419 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*!
       * jQuery UI Position 1.10.3
       * http://jqueryui.com
       *
       * Copyright 2013 jQuery Foundation and other contributors
      Severity: Minor
      Found in static/script/06-jquery.ui.position.js - About 6 hrs to fix

        Function position has 147 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        $.fn.position = function( options ) {
            if ( !options || !options.of ) {
                return _position.apply( this, arguments );
            }
        
        
        Severity: Major
        Found in static/script/06-jquery.ui.position.js - About 5 hrs to fix

          File 05-jquery.ui.widget.js has 403 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*!
           * jQuery UI Widget 1.10.3
           * http://jqueryui.com
           *
           * Copyright 2013 jQuery Foundation and other contributors
          Severity: Minor
          Found in static/script/05-jquery.ui.widget.js - About 5 hrs to fix

            Function itself has 141 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var itself = function (s, o) {
                    var a, i;
                    JSLINT.errors = [];
                    predefined = Object.create(standard);
                    if (o) {
            Severity: Major
            Found in tools/jslint.js - About 5 hrs to fix

              Function itself has 141 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var itself = function (s, o) {
                      var a, i;
                      JSLINT.errors = [];
                      predefined = Object.create(standard);
                      if (o) {
              Severity: Major
              Found in tools/jslint/fulljslint.js - About 5 hrs to fix

                File rugged_repository.rb has 398 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                description 'Git repository backend (Using rugged library)'
                require 'rugged'
                require 'fileutils'
                
                class RuggedRepository < Repository
                Severity: Minor
                Found in plugins/repositories/rugged_repository.rb - About 5 hrs to fix

                  Class Page has 40 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                    class Page
                      include Util
                      include Hooks
                      include Attributes
                  
                  
                  Severity: Minor
                  Found in lib/olelo/page.rb - About 5 hrs to fix

                    Function treeView has 132 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        $.fn.treeView = function(options) {
                            if (!options) {
                                options = {};
                            }
                            if (!options.root) {
                    Severity: Major
                    Found in plugins/treeview/script/00-jquery.treeview.js - About 5 hrs to fix

                      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/script/01-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/script/01-jquery.js - About 5 hrs to fix

                          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/script/01-jquery.js - About 4 hrs to fix

                            Function doTag has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function doTag(n, a) {
                                    var i, t = htmltag[n], x;
                                    src = false;
                                    if (!t) {
                                        error("Unrecognized tag '<{a}>'.",
                            Severity: Major
                            Found in tools/jslint.js - About 4 hrs to fix

                              Function doTag has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function doTag(n, a) {
                                      var i, t = htmltag[n], x;
                                      src = false;
                                      if (!t) {
                                          error("Unrecognized tag '<{a}>'.",
                              Severity: Major
                              Found in tools/jslint/fulljslint.js - About 4 hrs to fix

                                Function styleSelector has 116 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function styleSelector() {
                                        if (nexttoken.identifier) {
                                            if (!is_own(htmltag, option.cap ?
                                                    nexttoken.value.toLowerCase() : nexttoken.value)) {
                                                warning("Expected a tagName, and instead saw {a}.",
                                Severity: Major
                                Found in tools/jslint.js - About 4 hrs to fix

                                  Function styleSelector has 116 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function styleSelector() {
                                          if (nexttoken.identifier) {
                                              if (!is_own(htmltag, option.cap ?
                                                      nexttoken.value.toLowerCase() : nexttoken.value)) {
                                                  warning("Expected a tagName, and instead saw {a}.",
                                  Severity: Major
                                  Found in tools/jslint/fulljslint.js - About 4 hrs to fix

                                    Function string has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                    function string(x) {
                                                        var c, j, r = '';
                                    
                                                        if (jsonmode && x !== '"') {
                                                            warningAt("Strings must use doublequote.",
                                    Severity: Major
                                    Found in tools/jslint.js - About 4 hrs to fix

                                      Function string has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                      function string(x) {
                                                          var c, j, r = '';
                                      
                                                          if (jsonmode && x !== '"') {
                                                              warningAt("Strings must use doublequote.",
                                      Severity: Major
                                      Found in tools/jslint/fulljslint.js - About 4 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language