partkeepr/PartKeepr

View on GitHub

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++) {

      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) {

            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;
            
            

            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)

            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: {

            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":

            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);
                Severity: Minor
                Found in src/PartKeepr/FrontendBundle/Resources/public/js/Ext.ux.Wizard.js - About 45 mins to fix

                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;
                        }
                Severity: Minor
                Found in src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js - About 45 mins to fix

                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;
                
                
                Severity: Minor
                Found in src/PartKeepr/FrontendBundle/Resources/public/js/Ext.ux.Wizard.js - About 45 mins to fix

                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)
                Severity: Minor
                Found in src/PartKeepr/FrontendBundle/Resources/public/js/Data/HydraProxy.js - About 45 mins to fix

                  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>' : '');
                  
                  
                  Severity: Minor
                  Found in src/PartKeepr/FrontendBundle/Resources/public/js/Ext.ux.Wizard.Card.js - About 45 mins to fix

                  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();
                  
                  

                  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,

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language