Showing 3,238 of 3,238 total issues
Function handleStrictParse
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function handleStrictParse(monthName, format, strict) {
var i, ii, mom, llc = monthName.toLocaleLowerCase();
if (!this._monthsParse) {
// this is not used
this._monthsParse = [];
Function handleStrictParse
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function handleStrictParse(monthName, format, strict) {
var i, ii, mom, llc = monthName.toLocaleLowerCase();
if (!this._monthsParse) {
// this is not used
this._monthsParse = [];
Function defineLocale
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defineLocale (name, config) {
if (config !== null) {
var parentConfig = baseConfig;
config.abbr = name;
if (locales[name] != null) {
Function defineLocale
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defineLocale (name, config) {
if (config !== null) {
var parentConfig = baseConfig;
config.abbr = name;
if (locales[name] != null) {
Function handleStrictParse
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function handleStrictParse(monthName, format, strict) {
var i, ii, mom, llc = monthName.toLocaleLowerCase();
if (!this._monthsParse) {
// this is not used
this._monthsParse = [];
Function mightThrow
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
mightThrow = function() {
var returned, then;
// Support: Promises/A+ section 2.3.3.3.3
// https://promisesaplus.com/#point-59
Function mightThrow
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
mightThrow = function() {
var returned, then;
// Support: Promises/A+ section 2.3.3.3.3
// https://promisesaplus.com/#point-59
Function mightThrow
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
mightThrow = function() {
var returned, then;
// Support: Promises/A+ section 2.3.3.3.3
// https://promisesaplus.com/#point-59
Function getDatePickerTemplate
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
getDatePickerTemplate = function () {
var headTemplate = $('<thead>')
.append($('<tr>')
.append($('<th>').addClass('prev').attr('data-action', 'previous')
.append($('<span>').addClass(options.icons.previous))
Function addPointerListenerStart
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
addPointerListenerStart: function (obj, type, handler, id) {
var pre = '_leaflet_',
pointers = this._pointers;
var cb = function (e) {
Function throws
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
"throws": function( block, expected, message ) {
var actual, expectedType,
expectedOutput = expected,
ok = false,
currentTest = ( this instanceof Assert && this.test ) || QUnit.config.current;
Function before
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
before: function() {
if (
// Emit moduleStart when we're switching from one module to another
this.module !== config.previousModule ||
Function when
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
when: function( subordinate /* , ..., subordinateN */ ) {
var i = 0,
resolveValues = slice.call( arguments ),
length = resolveValues.length,
Function show
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Collapse.prototype.show = function () {
if (this.transitioning || this.$element.hasClass('in')) return
var activesData
var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
Function show
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Collapse.prototype.show = function () {
if (this.transitioning || this.$element.hasClass('in')) return
var activesData
var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
Function localeMonthsParse
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function localeMonthsParse (monthName, format, strict) {
var i, mom, regex;
if (this._monthsParseExact) {
return handleStrictParse.call(this, monthName, format, strict);
- 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 weekdaysRegex
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function weekdaysRegex (isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
- 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 ordinal
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
ordinal : function (number, period) {
var output = (number === 1) ? 'r' :
(number === 2) ? 'n' :
(number === 3) ? 'r' :
(number === 4) ? 't' : 'è';
- 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 chooseLocale
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function chooseLocale(names) {
var i = 0, j, next, locale, split;
while (i < names.length) {
split = normalizeLocale(names[i]).split('-');
- 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 getSetOffset
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function getSetOffset (input, keepLocalTime) {
var offset = this._offset || 0,
localAdjust;
if (!this.isValid()) {
return input != null ? this : NaN;