Showing 481 of 922 total issues
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"
Further reading
Function onCardShow
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
onCardShow: function (card) {
var parent = card.ownerCt;
var items = parent.items;
- 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 callAction
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
callAction: function (record, action, method, parameters, callback, reload)
Function initComponent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
initComponent: function () {
this.cardTitle = this.title;
this.title = (this.showTitle ? '<span style="' + this.titleStyle + '" class="' + this.titleCls + '" >' + this.title + '</span>' : '');
- 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 onOKClick
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
onOKClick: function ()
{
if (this.form.getForm().isValid()) {
var qty = this.quantityField.getValue();
- 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 getColumnMenu
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
getColumnMenu: function (headerContainer)
{
var menuItems = [],
i = 0,
item,
- 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"