Showing 922 of 922 total issues
Function createMenu
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
createMenu: function (target, menuPath, root) {
var item = menuPath.shift(), newItem;
if (item === undefined) {
newItem = {text: target.title, iconCls: target.iconCls, target: target};
- 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 crypt_raw
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
bCrypt.prototype.crypt_raw = function(password, salt, log_rounds, cdata, callback, progress) {
Function handler
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
handler: function (view, rowIndex, colIndex, item, e, record)
Function getFilterDescription
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
getFilterDescription: function () {
var config = this.getInitialConfig(),
i, subfilterData = [];
if (config.property !== null && config.value !== null && config.operator !== null) {
- 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
Avoid deeply nested control flow statements. Open
for (k = 0; k < this.part.distributors().count(); k++)
{
if (partDistributor.isPartiallyEqualTo(
this.part.distributors().getAt(k),
["sku", "packagingUnit", "currency", "distributor.name"]
Avoid deeply nested control flow statements. Open
if (configuration.copyFromField === "") {
this.appendError(node, i18n(
"The field is configured to copy a value from the source file, but no source file field was configured"));
}
Avoid deeply nested control flow statements. Open
if (this.excludeModels[j] === fields[i].reference.cls.getName()) {
skipSubModel = true;
}
Function onAddMatchField
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
onAddMatchField: function ()
{
var excludeFields = [];
for (var j = 0; j < this.store.getCount(); j++) {
- 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
Avoid deeply nested control flow statements. Open
if (found !== null)
{
found.set("price", this.data.sellers[i].offers[o].prices[p].price);
} else
{
Avoid deeply nested control flow statements. Open
if (visitedModels[j] === fields[i].reference.cls.getName()) {
skipSubModel = true;
}
Function handler
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
handler: function (view, rowIndex, colIndex, item, e, record)
Function createMenu
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
createMenu: function (target, menuPath, root) {
var item = menuPath.shift();
var newItem;
if (item === undefined) {
- 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 getRenderersForEntity
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
getRenderersForEntity: function (targetEntity)
{
var renderers = Ext.ClassManager.getNamesByExpression(this.aliasPrefix + "*");
var finalRenderers = [], renderer;
- 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 onCheckStateChange
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
onCheckStateChange: function (check, rowIndex, checked, record)
{
var grid = check.up("grid");
if (checked)
- 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 initComponent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
initComponent: function ()
{
this.store = Ext.create("Ext.data.Store", {
model: 'PartKeepr.PartBundle.Entity.PartDistributor',
proxy: {
- 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 foreignModelDrop
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
"foreignModelDrop": function (records, target)
{
for (var i in records) {
switch (Ext.getClassName(records[i])) {
case "PartKeepr.FootprintBundle.Entity.Footprint":
- 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
Avoid deeply nested control flow statements. Open
if (!this.partManager.getSelectedCategory().isRoot()) {
return {
id: 'categoryFilter',
property: 'category',
operator: 'IN',
Function renderCell
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
renderCell: function (column, record, recordIndex, rowIndex, columnIndex, out) {
Function onNextClick
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
onNextClick: function (btn) {
if (this.currentCard == this.cardCount - 1) {
this.onFinish();
} else {
// this.cardPanel.getLayout().setActiveItem(this.currentCard + 1);
- 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 getSystemPreference
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
getSystemPreference: function (key, defaultValue)
{
if (this.systemPreferenceStore === undefined) {
return defaultValue;
}
- 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"