holderdeord/hdo-site

View on GitHub

Showing 195 of 302 total issues

Function Handlebars has a Cognitive Complexity of 941 (exceeds 5 allowed). Consider refactoring.
Open

var Handlebars = (function() {
// handlebars/safe-string.js
var __module4__ = (function() {
  "use strict";
  var __exports__;
Severity: Minor
Found in app/assets/javascripts/lib/handlebars-v1.3.0.js - About 2 wks 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 Handlebars has 2057 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var Handlebars = (function() {
// handlebars/safe-string.js
var __module4__ = (function() {
  "use strict";
  var __exports__;
Severity: Major
Found in app/assets/javascripts/lib/handlebars-v1.3.0.js - About 1 wk to fix

    File handlebars-v1.3.0.js has 2059 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
    
     handlebars v1.3.0
    
    Copyright (C) 2011 by Yehuda Katz
    Severity: Major
    Found in app/assets/javascripts/lib/handlebars-v1.3.0.js - About 5 days to fix

      File Markdown.Editor.js has 1512 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // needs Markdown.Converter.js at the moment
      
      (function () {
      
          var util = {},
      Severity: Major
      Found in app/assets/javascripts/lib/pagedown/Markdown.Editor.js - About 4 days to fix

        Function __module11__ has 609 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var __module11__ = (function(__dependency1__, __dependency2__) {
          "use strict";
          var __exports__;
          var COMPILER_REVISION = __dependency1__.COMPILER_REVISION;
          var REVISION_CHANGES = __dependency1__.REVISION_CHANGES;
        Severity: Major
        Found in app/assets/javascripts/lib/handlebars-v1.3.0.js - About 3 days to fix

          File idangerous.swiper-1.8.7.js has 1037 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*
           * Swiper 1.8.7 - Mobile Touch Slider
           * http://www.idangero.us/sliders/swiper/
           *
           * Copyright 2012-2013, Vladimir Kharlampidi
          Severity: Major
          Found in app/assets/javascripts/lib/idangerous.swiper-1.8.7.js - About 2 days to fix

            Function Converter has 469 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Markdown.Converter = function () {
                    var pluginHooks = this.hooks = new HookCollection();
                    
                    // given a URL that was encountered by itself (without markup), should return the link text that's to be given to this link
                    pluginHooks.addNoop("plainLinkText");
            Severity: Major
            Found in app/assets/javascripts/lib/pagedown/Markdown.Converter.js - About 2 days to fix

              Function __module9__ has 468 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var __module9__ = (function() {
                "use strict";
                var __exports__;
                /* jshint ignore:start */
                /* Jison generated parser */
              Severity: Major
              Found in app/assets/javascripts/lib/handlebars-v1.3.0.js - About 2 days to fix

                Function handlebars has 464 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  var handlebars = (function(){
                  var parser = {trace: function trace() { },
                  yy: {},
                  symbols_: {"error":2,"root":3,"statements":4,"EOF":5,"program":6,"simpleInverse":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"sexpr":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"CLOSE_UNESCAPED":24,"OPEN_PARTIAL":25,"partialName":26,"partial_option0":27,"sexpr_repetition0":28,"sexpr_option0":29,"dataName":30,"param":31,"STRING":32,"INTEGER":33,"BOOLEAN":34,"OPEN_SEXPR":35,"CLOSE_SEXPR":36,"hash":37,"hash_repetition_plus0":38,"hashSegment":39,"ID":40,"EQUALS":41,"DATA":42,"pathSegments":43,"SEP":44,"$accept":0,"$end":1},
                  terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"},
                Severity: Major
                Found in app/assets/javascripts/lib/handlebars-v1.3.0.js - About 2 days to fix

                  Function cull has 390 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var cull = (function (global) {
                    "use strict";
                  
                    var _ = global._ || require("underscore");
                    var slice = Array.prototype.slice;
                  Severity: Major
                  Found in app/assets/javascripts/lib/cull.js - About 1 day to fix

                    Function tagsManager has 380 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      jQuery.fn.tagsManager = function (options,tagToManipulate) {
                        var tagManagerOptions = {
                          prefilled: null,
                          CapitalizeFirstLetter: false,
                          preventSubmitOnEnter: true,
                    Severity: Major
                    Found in app/assets/javascripts/lib/bootstrap-tagsmanager.js - About 1 day to fix

                      Function __module10__ has 358 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var __module10__ = (function(__dependency1__) {
                        "use strict";
                        var __exports__ = {};
                        var Exception = __dependency1__;
                      
                      
                      Severity: Major
                      Found in app/assets/javascripts/lib/handlebars-v1.3.0.js - About 1 day to fix

                        Function lexer has 247 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          var lexer = (function(){
                          var lexer = ({EOF:1,
                          parseError:function parseError(str, hash) {
                                  if (this.yy.parser) {
                                      this.yy.parser.parseError(str, hash);
                        Severity: Major
                        Found in app/assets/javascripts/lib/handlebars-v1.3.0.js - About 1 day to fix

                          Function UIManager has 237 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function UIManager(postfix, panels, undoManager, previewManager, commandManager, helpOptions, getString) {
                          
                                  var inputBox = panels.input,
                                      buttons = {}; // buttons.undo, buttons.link, etc. The actual DOM elements.
                          
                          Severity: Major
                          Found in app/assets/javascripts/lib/pagedown/Markdown.Editor.js - About 1 day to fix

                            Function cull has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
                            Open

                            var cull = (function (global) {
                              "use strict";
                            
                              var _ = global._ || require("underscore");
                              var slice = Array.prototype.slice;
                            Severity: Minor
                            Found in app/assets/javascripts/lib/cull.js - About 1 day 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

                            File Markdown.Converter.js has 517 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            var Markdown;
                            
                            if (typeof exports === "object" && typeof require === "function") // we're in a CommonJS (e.g. Node.js) module
                                Markdown = exports;
                            else
                            Severity: Major
                            Found in app/assets/javascripts/lib/pagedown/Markdown.Converter.js - About 1 day to fix

                              Function __module7__ has 174 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              var __module7__ = (function(__dependency1__) {
                                "use strict";
                                var __exports__;
                                var Exception = __dependency1__;
                              
                              
                              Severity: Major
                              Found in app/assets/javascripts/lib/handlebars-v1.3.0.js - About 6 hrs to fix

                                Function UndoManager has 171 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function UndoManager(callback, panels) {
                                
                                        var undoObj = this;
                                        var undoStack = []; // A stack of undo states
                                        var stackPtr = 0; // The index of the current state
                                Severity: Major
                                Found in app/assets/javascripts/lib/pagedown/Markdown.Editor.js - About 6 hrs to fix

                                  File cli.rb has 442 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  require 'optparse'
                                  require 'set'
                                  require 'open-uri'
                                  require 'fileutils'
                                  
                                  
                                  Severity: Minor
                                  Found in lib/hdo/import/cli.rb - About 6 hrs to fix

                                    Function __module2__ has 149 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    var __module2__ = (function(__dependency1__, __dependency2__) {
                                      "use strict";
                                      var __exports__ = {};
                                      var Utils = __dependency1__;
                                      var Exception = __dependency2__;
                                    Severity: Major
                                    Found in app/assets/javascripts/lib/handlebars-v1.3.0.js - About 5 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language