Showing 531 of 531 total issues

Function Sizzle has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Sizzle( selector, context, results, seed ) {
    var match, elem, m, nodeType,
        // QSA vars
        i, groups, old, nid, newContext, newSelector;

Severity: Major
Found in static/script/01-jquery.js - About 3 hrs to fix

    Function buildFragment has 74 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        buildFragment: function( elems, context, scripts, selection ) {
            var j, elem, contains,
                tmp, tag, tbody, wrap,
                l = elems.length,
    
    
    Severity: Major
    Found in static/script/01-jquery.js - About 2 hrs to fix

      File helper.rb has 289 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      module Olelo
        module BlockHelper
          def blocks
            @blocks ||= Hash.new('')
          end
      Severity: Minor
      Found in lib/olelo/helper.rb - About 2 hrs to fix

        Function openTree has 73 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function openTree(element, path) {
                    // Cache key for cached json data
                    var cacheKey = options.cacheStore ? options.cacheStore + ':' + path : null;
        
                    // Store json in cache
        Severity: Major
        Found in plugins/treeview/script/00-jquery.treeview.js - About 2 hrs to fix

          Function _create has 73 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _create: function() {
                  this.activeMenu = this.element;
                  // flag used to prevent firing of the click handler
                  // as the event bubbles up through nested menus
                  this.mouseHandled = false;
          Severity: Major
          Found in static/script/07-jquery.ui.menu.js - About 2 hrs to fix

            Function widget has 72 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            $.widget = function( name, base, prototype ) {
                var fullName, existingConstructor, constructor, basePrototype,
                    // proxiedPrototype allows the provided prototype to remain unmodified
                    // so that it can be used as a mixin for multiple widgets (#8876)
                    proxiedPrototype = {},
            Severity: Major
            Found in static/script/05-jquery.ui.widget.js - About 2 hrs to fix

              Function data has 72 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  itself.data = function () {
              
                      var data = {functions: []}, fu, globals, implieds = [], f, i, j,
                          members = [], n, unused = [], v;
                      if (itself.errors.length) {
              Severity: Major
              Found in tools/jslint.js - About 2 hrs to fix

                Function data has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    itself.data = function () {
                
                        var data = {functions: []}, fu, globals, implieds = [], f, i, j,
                            members = [], n, unused = [], v;
                        if (itself.errors.length) {
                Severity: Major
                Found in tools/jslint/fulljslint.js - About 2 hrs to fix

                  Function matcherFromGroupMatchers has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
                      // A counter to specify which element is currently being matched
                      var matcherCachedRuns = 0,
                          bySet = setMatchers.length > 0,
                          byElement = elementMatchers.length > 0,
                  Severity: Major
                  Found in static/script/01-jquery.js - About 2 hrs to fix

                    Function add has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        add: function( elem, types, handler, data, selector ) {
                            var tmp, events, t, handleObjIn,
                                special, eventHandle, handleObj,
                                handlers, type, namespaces, origType,
                                elemData = jQuery._data( elem );
                    Severity: Major
                    Found in static/script/01-jquery.js - About 2 hrs to fix

                      Function domManip has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          domManip: function( args, table, callback ) {
                      
                              // Flatten any nested arrays
                              args = core_concat.apply( [], args );
                      
                      
                      Severity: Major
                      Found in static/script/01-jquery.js - About 2 hrs to fix

                        Function statements has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function statements(begin) {
                                var a = [], f, p;
                                if (begin && !use_strict() && option.strict) {
                                    warning('Missing "use strict" statement.', nexttoken);
                                }
                        Severity: Major
                        Found in tools/jslint.js - About 2 hrs to fix

                          Function str has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function str(key, holder) {
                          
                          // Produce a string from holder[key].
                          
                                  var i,          // The loop counter.
                          Severity: Major
                          Found in static/script/00-json2.js - About 2 hrs to fix

                            Function statements has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function statements(begin) {
                                    var a = [], f, p;
                                    if (begin && !use_strict() && option.strict) {
                                        warning('Missing "use strict" statement.', nexttoken);
                                    }
                            Severity: Major
                            Found in tools/jslint/fulljslint.js - About 2 hrs to fix

                              Method run has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                              Open

                                def run(data = nil)
                                  cmd = @cmd.join(' | ')
                                  return `#{cmd}` if !data
                                  Open3.popen3(cmd) do |stdin, stdout, stderr|
                                    output = ''
                              Severity: Minor
                              Found in plugins/utils/shell.rb - 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

                              Method pagination has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def pagination(path, page_count, page_nr, options = {})
                                    return if page_count <= 1
                                    unlimited = options.delete(:unlimited)
                                    li = []
                                    li << if page_nr > 1
                              Severity: Minor
                              Found in lib/olelo/helper.rb - 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 done has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      function done( status, nativeStatusText, responses, headers ) {
                                          var isSuccess, success, error, response, modified,
                                              statusText = nativeStatusText;
                              
                                          // Called once
                              Severity: Major
                              Found in static/script/01-jquery.js - About 2 hrs to fix

                                Function exps has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    infix('(', function (left, that) {
                                        if (prevtoken.id !== '}' && prevtoken.id !== ')') {
                                            nobreak(prevtoken, token);
                                        }
                                        nospace();
                                Severity: Major
                                Found in tools/jslint.js - About 2 hrs to fix

                                  Function exps has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      infix('(', function (left, that) {
                                          if (prevtoken.id !== '}' && prevtoken.id !== ')') {
                                              nobreak(prevtoken, token);
                                          }
                                          nospace();
                                  Severity: Major
                                  Found in tools/jslint/fulljslint.js - About 2 hrs to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                                if ((i.id === '(number)' && /[.+\-Ee]/.test(i.value)) ||
                                                                        (i.id === '-' && !i.right) ||
                                                                        i.id === '(string)' || i.id === '[' ||
                                                                        i.id === '{' || i.id === 'true' ||
                                                                        i.id === 'false' ||
                                    Severity: Critical
                                    Found in tools/jslint.js - About 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language