Showing 256 of 374 total issues
Consider simplifying this complex logical expression. Open
Open
if (autoPlace) {
var $parent = this.$element.parent()
var orgPlacement = placement
var docScroll = document.documentElement.scrollTop || document.body.scrollTop
Function writeValueToProperty
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
writeValueToProperty: function(property, allBindings, key, value, checkIfDifferent) {
Function renderTemplateForEach
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ko.renderTemplateForEach = function (template, arrayOrObservableArray, options, targetNode, parentBindingContext) {
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
'init' : function (element, valueAccessor, allBindings, viewModel, bindingContext) {
Function update
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
'update': function (element, valueAccessor, allBindings, viewModel, bindingContext) {
Function value
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
enumerable: false, configurable: true, value: function(timeout, thisArg, arg1, arg2, arg3) {
Function setDomNodeChildrenFromArrayMapping
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ko.utils.setDomNodeChildrenFromArrayMapping = function (domNode, array, mapping, options, callbackAfterAddingNodes) {
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
'init': function(element, valueAccessor, allBindings, viewModel, bindingContext) {
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
'init': function (element, valueAccessor, allBindings, viewModel, bindingContext) {
Function compareSmallArrayToBigArray
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function compareSmallArrayToBigArray(smlArray, bigArray, statusNotInSml, statusNotInBig, options) {
Function WAssert
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function WAssert(trueishCondition, message, arg1, arg2, argEtc) {
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
'init': function(element, valueAccessor, ignored1, ignored2, bindingContext) {
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
'init': function(element, valueAccessor, allBindings, viewModel, bindingContext) {
Function value
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
enumerable: false, configurable: true, value: function(timeout, thisArg, arg1, arg2, arg3) {
Function renderTemplate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ko.renderTemplate = function (template, dataOrBindingContext, options, targetNodeOrNodeArray, renderMode) {
Function update
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
'update': function(element, valueAccessor, allBindings, viewModel, bindingContext) {
Function mapNodeAndRefreshWhenChanged
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function mapNodeAndRefreshWhenChanged(containerNode, mapping, valueToMap, callbackAfterAddingNodes, index) {
Function executeTemplate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function executeTemplate(targetNodeOrNodeArray, renderMode, template, bindingContext, options) {
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
'init': function(element, valueAccessor, allBindings, viewModel, bindingContext) {
Function 21
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
},{"./transport":21,"./transports":22,"component-emitter":17,"debug":9,"engine.io-parser":29,"indexof":44,"parsejson":38,"parseqs":39,"parseuri":40}],21:[function(require,module,exports){
/**
* Module dependencies.
*/
- 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"