Showing 2,728 of 4,984 total issues
Function tokenPerl
has 270 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function tokenPerl(stream,state){
if(stream.eatSpace())
return null;
if(state.chain)
return tokenChain(stream,state,state.chain,state.style,state.tail);
File markdown.js
has 615 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
File javascript.js
has 615 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// TODO actually recognize syntax of TypeScript constructs
Function setOptions
has 258 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setOptions: function(options, callback) {
this.startDate = moment().startOf('day');
this.endDate = moment().endOf('day');
this.timeZone = moment().utcOffset();
Function WorkerTransport_setupMessageHandler
has 256 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function WorkerTransport_setupMessageHandler() {
var messageHandler = this.messageHandler;
function updatePassword(password) {
messageHandler.send('UpdatePassword', password);
Function Collapse
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Collapse = function ($$$1) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
Function Collapse
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Collapse = function ($$$1) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
Function ajax
has 251 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ajax: function( url, options ) {
// If url is an object, simulate pre-1.5 signature
if ( typeof url === "object" ) {
options = url;
File jquery.knob.js
has 582 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!jQuery Knob*/
/**
* Downward compatible, touchable dial
*
* Version: 1.2.8
Function Dropdown
has 249 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function () {
function Dropdown(element, config) {
this._element = element;
this._popper = null;
this._config = this._getConfig(config);
Function Dropdown
has 249 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function () {
function Dropdown(element, config) {
this._element = element;
this._popper = null;
this._config = this._getConfig(config);
Function PromiseClosure
has 248 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(function PromiseClosure() {
if (globalScope.Promise) {
// Promises existing in the DOM/Worker, checking presence of all/resolve
if (typeof globalScope.Promise.all !== 'function') {
globalScope.Promise.all = function (iterable) {
Function setDocument
has 245 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setDocument = Sizzle.setDocument = function( node ) {
var hasCompare, subWindow,
doc = node ? node.ownerDocument || node : preferredDoc;
// Return early if doc is invalid or already selected
Function ajax
has 240 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ajax: function( url, options ) {
// If url is an object, simulate pre-1.5 signature
if ( typeof url === "object" ) {
options = url;
Function ajax
has 240 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ajax: function( url, options ) {
// If url is an object, simulate pre-1.5 signature
if ( typeof url === "object" ) {
options = url;
Function editable
has 235 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.editable = function(target, options) {
if ('disable' == target) {
$(this).data('disabled.editable', true);
return;
File clockpicker.js
has 554 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* ClockPicker v{package.version} (http://weareoutman.github.io/clockpicker/)
* Copyright 2014 Wang Shenwei.
* Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)
*/
Function bootstrap
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
Open
$.fn.dataTable.ext.renderer.pageButton.bootstrap = function(settings, host, idx, buttons, page, pages) {
var api = new $.fn.dataTable.Api(settings);
var classes = settings.oClasses;
var lang = settings.oLanguage.oPaginate;
var btnDisplay, btnClass;
- 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 Bar
has 229 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Morris.Bar = (function(_super) {
__extends(Bar, _super);
function Bar(options) {
this.onHoverOut = __bind(this.onHoverOut, this);
Function PDFPageProxyClosure
has 226 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFPageProxy = (function PDFPageProxyClosure() {
function PDFPageProxy(pageIndex, pageInfo, transport) {
this.pageIndex = pageIndex;
this.pageInfo = pageInfo;
this.transport = transport;