Showing 357 of 7,143 total issues
Function utf8ToBytes
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function utf8ToBytes (string, units) {
units = units || Infinity
var codePoint
var length = string.length
var leadSurrogate = null
Function sizeContent
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
, sizeContent = function (evt_or_panes, remeasure) {
if (!isInitialized()) return;
var panes = evtPane.call(this, evt_or_panes);
panes = panes ? panes.split(",") : _c.allPanes;
Function keydown
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
keydown: function( event ) {
var allowed, curVal, newVal, step,
index = $( event.target ).data( "ui-slider-handle-index" );
switch ( event.keyCode ) {
Function ngOnInit
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
ngOnInit() {
$("body").removeClass("is-loadingApp");
this.queryParams = this.urlShare.getQueryParameters();
this.allowHF = !(this.queryParams && this.queryParams.hasOwnProperty("hf"))
? true
- 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 createWrapper
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
createWrapper: function( element ) {
// if the element is already wrapped, return it
if ( element.parent().is( ".ui-effects-wrapper" )) {
return element.parent();
Function _mouseDrag
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
_mouseDrag: function(event) {
//Compute the helpers position
this.position = this._generatePosition(event);
this.positionAbs = this._convertPositionTo("absolute");
QueryBlocksComponent
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
@Component({
selector: "query-blocks",
templateUrl: "./app/queryBlocks/queryBlocks.component.html",
inputs: [
"detectChange",
Function write
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Buffer.prototype.write = function write (string, offset, length, encoding) {
// Buffer#write(string)
if (offset === undefined) {
encoding = 'utf8'
length = this.length
Function parse
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse: function( red, green, blue, alpha ) {
if ( red === undefined ) {
this._rgba = [ null, null, null, null ];
return this;
}
Function _generateMonthYearHeader
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
secondary, monthNames, monthNamesShort) {
var changeMonth = this._get(inst, 'changeMonth');
var changeYear = this._get(inst, 'changeYear');
var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
Function e
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
- 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 createUrl
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
UrlShare.prototype.createUrl = function() {
if (this.inputs && this.inputs.config) {
this.inputs.appname = this.inputs.config.appname;
this.inputs.url = this.inputs.config.url;
}
- 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 loadState
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
, loadState: function (inst, data, opts) {
if (!$.isPlainObject( data ) || $.isEmptyObject( data )) return;
// normalize data & cache in the state object
data = inst.state.stateData = $.layout.transformData( data ); // panes = default subkey
Function sizePane_2
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sizePane_2 () {
/* Panes are sometimes not sized precisely in some browsers!?
* This code will resize the pane up to 3 times to nudge the pane to the correct size
*/
var actual = dimName==='width' ? $P.outerWidth() : $P.outerHeight()
Function _refreshValue
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
_refreshValue: function() {
var lastValPercent, valPercent, value, valueMin, valueMax,
oRange = this.options.range,
o = this.options,
that = this,
Function _processTabs
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
_processTabs: function() {
var that = this;
this.tablist = this._getList()
.addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
Function _mouseStart
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
_mouseStart: function(event) {
var that = this;
this.opos = [event.pageX, event.pageY];
Function keydown
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
keydown: function( event ) {
if ( this.element.prop( "readOnly" ) ) {
suppressKeyPress = true;
suppressInput = true;
suppressKeyPressRepeat = true;
Function _setOption
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
_setOption: function( key, value ) {
var isDraggable, isResizable,
uiDialog = this.uiDialog;
switch ( key ) {
Function feedAvailableField
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function feedAvailableField(mapObj: any, parent: any = null) {
let mapObjWithFields = {};
for (let field in mapObj) {
mapObjWithFields[field] = mapObj[field];
if (mapObj[field].fields) {