Showing 200 of 421 total issues
Function _decompress
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_decompress: function (length, resetValue, getNextValue) {
var dictionary = [],
next,
enlargeIn = 4,
dictSize = 4,
Function buildView
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildView: function (params) {
var baseTextLines = params.baseTextLines;
var newTextLines = params.newTextLines;
var opcodes = params.opcodes;
var baseTextName = params.baseTextName ? params.baseTextName : "Base Text";
File plugin.js
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
Function output
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
InlineLexer.prototype.output = function(src) {
var out = ''
, link
, text
, href
Function diffString
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
Open
function diffString( o, n ) {
o = o.replace(/\s+$/, '');
n = n.replace(/\s+$/, '');
var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/) );
- 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 _layout
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_layout: function() {
var area = this.element,
editor = this.editor,
contentsRect = editor.ui.contentsElement.getClientRect(),
contentsPos = editor.ui.contentsElement.getDocumentPosition(),
File plugin.js
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Floating-Tools
* Author: Philipp Stracker (2013)
* Project page: http://stracker-phil.github.com/Floating-Tools/
*/
Function callPlugin
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
callPlugin: function () {
var map = this.map,
id = map.id,
//Map already normalized the prefix.
pluginMap = makeModuleMap(map.prefix);
Function tok
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.tok = function() {
switch (this.token.type) {
case 'space': {
return '';
}
Function makeRequire
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
makeRequire: function (relMap, options) {
options = options || {};
function localRequire(deps, callback, errback) {
var id, map, requireMod;
File difflib.js
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/***
This is part of jsdifflib v1.0. <http://snowtide.com/jsdifflib>
Copyright (c) 2007, Snowtide Informatics Systems, Inc.
All rights reserved.
Function init
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function(editor) {
// Source mode in inline editors is only available through the "sourcedialog" plugin.
if (editor.elementMode == CKEDITOR.ELEMENT_MODE_INLINE)
return;
Function setupDragAndDrop
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setupDragAndDrop( widgetsRepo ) {
var editor = widgetsRepo.editor,
lineutils = CKEDITOR.plugins.lineutils;
// These listeners handle inline and block widgets drag and drop.
File plugin.js
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @license Copyright (c) CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
Function pixelSearch
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pixelSearch: ( function() {
var contains = CKEDITOR.env.ie || CKEDITOR.env.webkit ?
function( el, found ) {
return el.contains( found );
} : function( el, found ) {
Function _layout
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
Open
_layout: function() {
var area = this.element,
editor = this.editor,
contentsRect = editor.ui.contentsElement.getClientRect(),
contentsPos = editor.ui.contentsElement.getDocumentPosition(),
- 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 marked
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function marked(src, opt, callback) {
if (callback || typeof opt === 'function') {
if (!callback) {
callback = opt;
opt = null;
Function configure
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
configure: function (cfg) {
//Make sure the baseUrl ends in a slash.
if (cfg.baseUrl) {
if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
cfg.baseUrl += '/';
Function GenerateAutoSaveDialog
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function GenerateAutoSaveDialog(editorInstance, autoSaveKey) {
CKEDITOR.dialog.add('autosaveDialog', function() {
return {
title: editorInstance.lang.autosave.title,
minHeight: 155,
Consider simplifying this complex logical expression. Open
Open
if (a && getParsingFlags(m).overflow === -2) {
overflow =
a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :