Showing 345 of 549 total issues
Function performObjectSearch
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
Open
performObjectSearch : function(object, otherterms) {
var filenames = this._index.filenames;
var objects = this._index.objects;
var objnames = this._index.objnames;
var titles = this._index.titles;
- 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 DanishStemmer
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
st = new function DanishStemmer() {
var a_0 = [new Among("hed", -1, 1), new Among("ethed", 0, 1),
new Among("ered", -1, 1), new Among("e", -1, 1),
new Among("erede", 3, 1), new Among("ende", 3, 1),
new Among("erende", 5, 1), new Among("ene", 3, 1),
Function r_standard_suffix
has 165 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function r_standard_suffix() {
var among_var, v_1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_4, 43);
if (among_var) {
Function query
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
Open
query : function(query) {
var i;
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
// stem the searchterms and add them to the correct list
- 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 stemmer
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
lunr.no.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function NorwegianStemmer() {
Function Stemmer
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Stemmer = function() {
var step2list = {
ational: 'ate',
tional: 'tion',
Function stemmer
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
lunr.sv.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function SwedishStemmer() {
Function NorwegianStemmer
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
st = new function NorwegianStemmer() {
var a_0 = [new Among("a", -1, 1), new Among("e", -1, 1),
new Among("ede", 1, 1), new Among("ande", 1, 1),
new Among("ende", 1, 1), new Among("ane", 1, 1),
new Among("ene", 1, 1), new Among("hetene", 6, 1),
Function SwedishStemmer
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
st = new function SwedishStemmer() {
var a_0 = [new Among("a", -1, 1), new Among("arna", 0, 1),
new Among("erna", 0, 1), new Among("heterna", 2, 1),
new Among("orna", 0, 1), new Among("ad", -1, 1),
new Among("e", -1, 1), new Among("ade", 6, 1),
File jquery.tocify.js
has 398 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* jquery Tocify - v1.9.0 - 2013-10-01
* http://www.gregfranko.com/jquery.tocify.js/
* Copyright (c) 2013 Greg Franko; Licensed MIT */
// Immediately-Invoked Function Expression (IIFE) [Ben Alman Blog Post](http://benalman.com/news/2010/11/immediately-invoked-function-expression/) that calls another IIFE that contains all of the plugin logic. I used this pattern so that anyone viewing this code would not have to scroll to the bottom of the page to view the local parameters that were passed to the main IIFE.
Function Callbacks
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.Callbacks = function( options ) {
// Convert options from String-formatted to Object-formatted if needed
// (we check in cache first)
options = typeof options === "string" ?
Consider simplifying this complex logical expression. Open
Open
if ( event.pageX == null && original.clientX != null ) {
eventDoc = event.target.ownerDocument || document;
doc = eventDoc.documentElement;
body = eventDoc.body;
File lunr.du.js
has 374 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* Lunr languages, `Dutch` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
Function sphinx-rtd-theme
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"sphinx-rtd-theme":[function(require,module,exports){
var jQuery = (typeof(window) != 'undefined') ? window.jQuery : require('jquery');
// Sphinx theme nav state
function ThemeNav () {
Function query
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
query : function(query) {
var i;
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
// stem the searchterms and add them to the correct list
Function r_stem_noun_suffixes
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function r_stem_noun_suffixes() {
var v_1 = sbp.limit - sbp.cursor,
v_2, v_3;
sbp.ket = sbp.cursor;
if (r_mark_lAr()) {
Function ThemeNav
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ThemeNav () {
var nav = {
navBar: null,
win: null,
Function stemWord
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
Function defaultPrefilter
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function defaultPrefilter( elem, props, opts ) {
/* jshint validthis: true */
var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
anim = this,
orig = {},
Function r_standard_suffix
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function r_standard_suffix() {
var among_var, v_1 = sbp.limit - sbp.cursor,
v_2, v_3, v_4, v_5, v_6;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_3, 5);