Showing 463 of 531 total issues

Function report has 112 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    itself.report = function (option) {
        var data = itself.data();

        var a = [], c, e, err, f, i, k, l, m = '', n, o = [], s;

Severity: Major
Found in tools/jslint.js - About 4 hrs to fix

    Function report has 112 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        itself.report = function (option) {
            var data = itself.data();
    
            var a = [], c, e, err, f, i, k, l, m = '', n, o = [], s;
    
    
    Severity: Major
    Found in tools/jslint/fulljslint.js - About 4 hrs to fix

      Method show_page has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

        def show_page
          params[:aspect] ||= 'subpages' if params[:path].to_s.ends_with? '/'
      
          env['HTTP_ACCEPT'].to_s =~ %r{[\w\.\+\-\*]+/[\*\w\.\+\-]+}
          preferred_mime = $&
      Severity: Minor
      Found in plugins/aspects/main.rb - About 4 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 cache_control has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

          def cache_control(options)
            return if !Config['production']
      
            if options[:no_cache]
              response.headers.delete('ETag')
      Severity: Minor
      Found in lib/olelo/helper.rb - About 4 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 _start has 98 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              _start: function (index) {
                  var coming = {},
                      obj,
                      href,
                      type,
      Severity: Major
      Found in plugins/misc/fancybox/script/01-jquery.fancybox.js - About 3 hrs to fix

        Function open has 98 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                open: function (group, opts) {
                    if (!group) {
                        return;
                    }
        
        
        Severity: Major
        Found in plugins/misc/fancybox/script/01-jquery.fancybox.js - About 3 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/script/01-jquery.js - About 3 hrs to fix

            Function Selection has 91 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              var Selection = (function() {
            
                  var hasRange = (typeof document.selection !== 'undefined' && typeof document.selection.createRange !== 'undefined');
            
                return {
            Severity: Major
            Found in plugins/editor/markup/script/00-jquery.textselection.js - About 3 hrs to fix

              Function doOption has 91 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function doOption() {
                      var b, obj, filter, o = nexttoken.value, t, v;
                      switch (o) {
                      case '*/':
                          error("Unbegun comment.");
              Severity: Major
              Found in tools/jslint.js - About 3 hrs to fix

                Function doOption has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function doOption() {
                        var b, obj, filter, o = nexttoken.value, t, v;
                        switch (o) {
                        case '*/':
                            error("Unbegun comment.");
                Severity: Major
                Found in tools/jslint/fulljslint.js - About 3 hrs to fix

                  Method process_tag has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def process_tag(name, attrs, content, context)
                      tag = @@tags[name]
                      name = tag.full_name
                  
                      tag_counter = context[:tag_counter] ||= {}
                  Severity: Minor
                  Found in plugins/tags/main.rb - 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

                  Function labelled has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      blockstmt('switch', function () {
                          var t = nexttoken,
                              g = false;
                          funct['(breakage)'] += 1;
                          advance('(');
                  Severity: Major
                  Found in tools/jslint.js - About 3 hrs to fix

                    Function labelled has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        blockstmt('switch', function () {
                            var t = nexttoken,
                                g = false;
                            funct['(breakage)'] += 1;
                            advance('(');
                    Severity: Major
                    Found in tools/jslint/fulljslint.js - About 3 hrs to fix

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

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

                                _afterLoad: function () {
                                    var coming   = F.coming,
                                        previous = F.current,
                                        placeholder = 'fancybox-placeholder',
                                        current,
                        Severity: Major
                        Found in plugins/misc/fancybox/script/01-jquery.fancybox.js - About 3 hrs to fix

                          Function jsonValue has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function jsonValue() {
                          
                                  function jsonObject() {
                                      var o = {}, t = nexttoken;
                                      advance('{');
                          Severity: Major
                          Found in tools/jslint.js - About 3 hrs to fix

                            Function jsonValue has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function jsonValue() {
                            
                                    function jsonObject() {
                                        var o = {}, t = nexttoken;
                                        advance('{');
                            Severity: Major
                            Found in tools/jslint/fulljslint.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/script/01-jquery.js - About 3 hrs to fix

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

                                        nud: function () {
                                            var v = this.value,
                                                s = scope[v],
                                                f;
                                            if (typeof s === 'function') {
                                Severity: Major
                                Found in tools/jslint.js - About 3 hrs to fix

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

                                          nud: function () {
                                              var v = this.value,
                                                  s = scope[v],
                                                  f;
                                              if (typeof s === 'function') {
                                  Severity: Major
                                  Found in tools/jslint/fulljslint.js - About 3 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language