Showing 122 of 122 total issues
Function Handlebars
has a Cognitive Complexity of 941 (exceeds 5 allowed). Consider refactoring. Open
Open
var Handlebars = (function() {
// handlebars/safe-string.js
var __module4__ = (function() {
"use strict";
var __exports__;
- Read upRead up
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
Open
var Handlebars = (function() {
// handlebars/safe-string.js
var __module4__ = (function() {
"use strict";
var __exports__;
File handlebars.js
has 2059 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
handlebars v1.3.0
Copyright (C) 2011 by Yehuda Katz
File typeahead.bundle.js
has 1772 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* typeahead.js 0.10.4
* https://github.com/twitter/typeahead.js
* Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
*/
Function __module11__
has 609 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __module11__ = (function(__dependency1__, __dependency2__) {
"use strict";
var __exports__;
var COMPILER_REVISION = __dependency1__.COMPILER_REVISION;
var REVISION_CHANGES = __dependency1__.REVISION_CHANGES;
Function __module9__
has 468 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __module9__ = (function() {
"use strict";
var __exports__;
/* jshint ignore:start */
/* Jison generated parser */
Function handlebars
has 464 lines of code (exceeds 25 allowed). Consider refactoring. Open
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"},
Function __module10__
has 358 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __module10__ = (function(__dependency1__) {
"use strict";
var __exports__ = {};
var Exception = __dependency1__;
File bootstrap-tokenfield.js
has 701 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* bootstrap-tokenfield
* https://github.com/sliptree/bootstrap-tokenfield
* Copyright 2013-2014 Sliptree and other contributors; Licensed MIT
*/
Function lexer
has 247 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var lexer = (function(){
var lexer = ({EOF:1,
parseError:function parseError(str, hash) {
if (this.yy.parser) {
this.yy.parser.parseError(str, hash);
Function Typeahead
has 244 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Typeahead = function() {
"use strict";
var attrsKey = "ttAttrs";
function Typeahead(o) {
var $menu, $input, $hint;
Function Input
has 188 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Input = function() {
"use strict";
var specialKeyCodeMap;
specialKeyCodeMap = {
9: "tab",
Function __module7__
has 174 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __module7__ = (function(__dependency1__) {
"use strict";
var __exports__;
var Exception = __dependency1__;
Function Dropdown
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Dropdown = function() {
"use strict";
function Dropdown(o) {
var that = this, onSuggestionClick, onSuggestionMouseEnter, onSuggestionMouseLeave;
o = o || {};
Function __module2__
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __module2__ = (function(__dependency1__, __dependency2__) {
"use strict";
var __exports__ = {};
var Utils = __dependency1__;
var Exception = __dependency2__;
Function Dataset
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Dataset = function() {
"use strict";
var datasetKey = "ttDataset", valueKey = "ttValue", datumKey = "ttDatum";
function Dataset(o) {
o = o || {};
Function _
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var _ = function() {
"use strict";
return {
isMsie: function() {
return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false;
Function SearchIndex
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var SearchIndex = function() {
"use strict";
function SearchIndex(o) {
o = o || {};
if (!o.datumTokenizer || !o.queryTokenizer) {
Function __module6__
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __module6__ = (function(__dependency1__, __dependency2__, __dependency3__) {
"use strict";
var __exports__ = {};
var Utils = __dependency1__;
var Exception = __dependency2__;
Function Tokenfield
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Tokenfield = function (element, options) {
var _self = this
this.$element = $(element)
this.textDirection = this.$element.css('direction');