Showing 1,331 of 3,238 total issues
File ajax.js
has 505 lines of code (exceeds 250 allowed). Consider refactoring. Open
define( [
"./core",
"./var/document",
"./var/rnothtmlwhite",
"./ajax/var/location",
File moment.d.ts
has 501 lines of code (exceeds 250 allowed). Consider refactoring. Open
declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSpecification, strict?: boolean): moment.Moment;
declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSpecification, language?: string, strict?: boolean): moment.Moment;
declare namespace moment {
type RelativeTimeKey = 's' | 'm' | 'mm' | 'h' | 'hh' | 'd' | 'dd' | 'M' | 'MM' | 'y' | 'yy';
Function chili
has 196 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.chili = function( options ) {
var book = $.extend( {}, ChiliBook, options || {} );
function cook( ingredients, recipe ) {
Function translate
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
function translate(number, withoutSuffix, key, isFuture) {
var result = number + ' ';
switch (key) {
case 's': // a few seconds / in a few seconds / a few seconds ago
return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
- 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 translate
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
function translate(number, withoutSuffix, key, isFuture) {
var result = number + ' ';
switch (key) {
case 's': // a few seconds / in a few seconds / a few seconds ago
return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
- 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 handleStrictParse
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
function handleStrictParse(weekdayName, format, strict) {
var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._shortWeekdaysParse = [];
- 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 jsDump
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
QUnit.jsDump = (function() {
function quote( str ) {
return '"' + str.toString().replace(/"/g, '\\"') + '"';
}
function literal( o ) {
Function exports
has 179 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
Function equiv
has 178 lines of code (exceeds 25 allowed). Consider refactoring. Open
QUnit.equiv = (function() {
// Call the o related callback with the given arguments.
function bindCallbacks( o, callbacks, args ) {
var prop = QUnit.objectType( o );
Function Deferred
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
Deferred: function( func ) {
var tuples = [
// action, add listener, callbacks,
// ... .then handlers, argument index, [final state]
Function Deferred
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
Deferred: function( func ) {
var tuples = [
// action, add listener, callbacks,
// ... .then handlers, argument index, [final state]
Function Deferred
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
Deferred: function( func ) {
var tuples = [
// action, add listener, callbacks,
// ... .then handlers, argument index, [final state]
Function init
has 163 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function() {
this.each(function() {
var i, l, tmp, newChar, summTagless, summOpens, summCloses,
lastCloseTag, detailText, detailTagless, html, expand;
var $thisDetails, $readMore;
Function setOptions
has 161 lines of code (exceeds 25 allowed). Consider refactoring. Open
datetimepicker.setOptions = function (_options) {
var highlightedDates = {};
options = $.extend(true, {}, options, _options);
Function setOptions
has 161 lines of code (exceeds 25 allowed). Consider refactoring. Open
datetimepicker.setOptions = function (_options) {
var highlightedDates = {};
options = $.extend(true, {}, options, _options);
File php-date-formatter.js
has 431 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2017
* @version 1.3.4
*
* Date formatter utility library that allows formatting date/time variables or Date objects using PHP DateTime format.
File Gruntfile.js
has 431 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Bootstrap's Gruntfile
* http://getbootstrap.com
* Copyright 2013-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
Function checkOverflow
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
export default function checkOverflow (m) {
var overflow;
var a = m._a;
if (a && getParsingFlags(m).overflow === -2) {
- 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 fill
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
fill: function(){
var d = new Date(this.viewDate),
year = d.getUTCFullYear(),
month = d.getUTCMonth(),
startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity,
Function fill
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
fill: function(){
var d = new Date(this.viewDate),
year = d.getUTCFullYear(),
month = d.getUTCMonth(),
startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity,