Showing 61 of 81 total issues
File URI.js
has 1284 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* URI.js - Mutating URLs
*
* Version: 1.8.3
*
File sunlight.js
has 884 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Sunlight
* Intelligent syntax highlighting
*
* http://sunlightjs.com/
Function prototype
has 420 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Highlighter.prototype = (function() {
var parseNextToken = (function() {
function isIdentMatch(context) {
return context.language.identFirstLetter && context.language.identFirstLetter.test(context.reader.current());
}
File prettify.js
has 480 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var q = null;
window.PR_SHOULD_USE_CONTINUATION = !0;
(function() {
function L(a) {
function m(a) {
Function moogREST
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.moogREST = function moogREST(options) {
'use strict';
if ((this instanceof moogREST)) {
util.log("ERROR Don't use new for moogREST");
return;
Function moogREST
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
Open
exports.moogREST = function moogREST(options) {
'use strict';
if ((this instanceof moogREST)) {
util.log("ERROR Don't use new for moogREST");
return;
- 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 parseNextToken
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var parseNextToken = (function() {
function isIdentMatch(context) {
return context.language.identFirstLetter && context.language.identFirstLetter.test(context.reader.current());
}
Function createCodeReader
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createCodeReader(text) {
var index = 0,
line = 1,
column = 1,
length,
Function L
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function L(a) {
function m(a) {
var f = a.charCodeAt(0);
if (f !== 92) return f;
var b = a.charAt(1);
Function sendEvent
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self.sendEvent = function (mEvent, callback) {
// Parse the data we're going to add.
var myEvent = mEvent;
var epochDate = Math.round(Date.now() / 1000);
var num = myEvent.external_id++ || 0;
Function toc
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.toc = function(options) {
var self = this;
var opts = $.extend({}, jQuery.fn.toc.defaults, options);
var container = $(opts.container);
Function tokenize
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function tokenize(unhighlightedCode, language, partialContext, options) {
var tokens = [],
context,
continuation,
token;
Function equals
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
p.equals = function(uri) {
var one = this.clone();
var two = new URI(uri);
var one_map = {};
var two_map = {};
Function E
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function E(a) {
var m =
a.g;
try {
var e = M(a.h),
Function highlightRecursive
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
highlightNode: function highlightRecursive(node) {
var match,
languageId,
currentNodeCount,
j,
Function D
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function D(a, m) {
function e(a) {
switch (a.nodeType) {
case 1:
if (k.test(a.className)) break;
Function x
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function x(a, m) {
function e(a) {
for (var l = a.d, p = [l, "pln"], d = 0, g = a.a.match(y) || [], r = {}, n = 0, z = g.length; n < z; ++n) {
var f = g[n],
b = r[f],
Consider simplifying this complex logical expression. Open
Open
if (myEvent instanceof Array) {
event.events = myEvent;
debug('Event array length ' + event.events.length);
} else {
if (!(mEvent instanceof self.MoogEvent)) {
Function is
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
p.is = function(what) {
var ip = false;
var ip4 = false;
var ip6 = false;
var name = false;
Function normalizePath
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
p.normalizePath = function(build) {
if (this._parts.urn) {
return this;
}
if (!this._parts.path || this._parts.path === '/') {