Showing 5,475 of 9,971 total issues

Function Dropzone has a Cognitive Complexity of 845 (exceeds 5 allowed). Consider refactoring.
Open

function (_Emitter) {
  _inherits(Dropzone, _Emitter);

  _createClass(Dropzone, null, [{
    key: "initClass",
Severity: Minor
Found in myems-admin/js/plugins/dropzone/dropzone.js - About 2 wks 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

File angular.integralui.treeview.min.js has 5810 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
  filename: angular.integralui.treeview.min.js
  version : 3.3.445
  Copyright � 2014-2018 Lidor Systems. All rights reserved.

Severity: Major
Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 2 wks to fix

    Function qrcode has a Cognitive Complexity of 795 (exceeds 5 allowed). Consider refactoring.
    Open

    var qrcode = function() {
    
      //---------------------------------------------------------------------
      // qrcode
      //---------------------------------------------------------------------
    Severity: Minor
    Found in myems-admin/js/angular/qrcode.js - About 2 wks 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

    File angular-ui-router.js has 5643 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * State-based routing for AngularJS 1.x
     * NOTICE: This monolithic bundle also bundles the @uirouter/core code.
     *         This causes it to be incompatible with plugins that depend on @uirouter/core.
     *         We recommend switching to the ui-router-core.js and ui-router-angularjs.js bundles instead.
    Severity: Major
    Found in myems-admin/js/ui-router/angular-ui-router.js - About 2 wks to fix

      File fullcalendar.js has 5375 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*!
       * FullCalendar v2.1.1
       * Docs & License: http://arshaw.com/fullcalendar/
       * (c) 2013 Adam Shaw
       */
      Severity: Major
      Found in myems-admin/js/plugins/fullcalendar/fullcalendar.js - About 2 wks to fix

        Function link has 2968 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                link: function(k, m, U, a, b) {
                  var w = this,
                    H = m.children().eq(0),
                    C = m.children().eq(1),
                    I = m.children().eq(2),
        Severity: Major
        Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 2 wks to fix

          File microgrid.py has 4893 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import uuid
          from datetime import datetime, timedelta
          import falcon
          import mysql.connector
          import simplejson as json
          Severity: Major
          Found in myems-api/core/microgrid.py - About 2 wks to fix

            Function worker has a Cognitive Complexity of 665 (exceeds 5 allowed). Consider refactoring.
            Open

            def worker(space):
                ####################################################################################################################
                # Step 1: get all input meters associated with the space
                ####################################################################################################################
                print("Step 1: get all input meters associated with the space " + str(space['name']))
            Severity: Minor
            Found in myems-aggregation/space_energy_input_item.py - About 1 wk 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 worker has a Cognitive Complexity of 665 (exceeds 5 allowed). Consider refactoring.
            Open

            def worker(space):
                ####################################################################################################################
                # Step 1: get all input meters associated with the space
                ####################################################################################################################
                print("Step 1: get all input meters associated with the space " + str(space['name']))
            Severity: Minor
            Found in myems-aggregation/space_energy_input_category.py - About 1 wk 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

            File fullcalendar.min.js has 4312 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*!
             * FullCalendar v1.6.4
             * Docs & License: http://arshaw.com/fullcalendar/
             * (c) 2013 Adam Shaw
             */
            Severity: Major
            Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 wk to fix

              File space.py has 4283 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import uuid
              from datetime import datetime, timedelta
              import falcon
              import mysql.connector
              import simplejson as json
              Severity: Major
              Found in myems-api/core/space.py - About 1 wk to fix

                Function Dropzone has 2071 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function (_Emitter) {
                  _inherits(Dropzone, _Emitter);
                
                  _createClass(Dropzone, null, [{
                    key: "initClass",
                Severity: Major
                Found in myems-admin/js/plugins/dropzone/dropzone.js - About 1 wk to fix

                  Function Plot has 1987 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function Plot(placeholder, data_, options_, plugins) {
                          // data is on the form:
                          //   [ series1, series2 ... ]
                          // where series is either just the data as [ [x1, y1], [x2, y2], ... ]
                          // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
                  Severity: Major
                  Found in myems-admin/js/plugins/flot/jquery.flot.js - About 1 wk to fix

                    File combinedequipment.py has 2948 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import uuid
                    from datetime import datetime, timedelta
                    import falcon
                    import mysql.connector
                    import simplejson as json
                    Severity: Major
                    Found in myems-api/core/combinedequipment.py - About 1 wk to fix

                      Function qrcode has 1570 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var qrcode = function() {
                      
                        //---------------------------------------------------------------------
                        // qrcode
                        //---------------------------------------------------------------------
                      Severity: Major
                      Found in myems-admin/js/angular/qrcode.js - About 1 wk to fix

                        File energystoragecontainer.py has 2749 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import uuid
                        import falcon
                        import mysql.connector
                        import simplejson as json
                        from core.useractivity import user_logger, admin_control, access_control
                        Severity: Major
                        Found in myems-api/core/energystoragecontainer.py - About 1 wk to fix

                          File dropzone.js has 2726 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          "use strict";
                          
                          function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
                          
                          function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
                          Severity: Major
                          Found in myems-admin/js/plugins/dropzone/dropzone.js - About 1 wk to fix

                            File equipment.py has 2680 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import uuid
                            from datetime import datetime, timedelta
                            import falcon
                            import mysql.connector
                            import simplejson as json
                            Severity: Major
                            Found in myems-api/core/equipment.py - About 1 wk to fix

                              File tenant.py has 2611 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import uuid
                              from datetime import datetime, timedelta, timezone
                              import falcon
                              import mysql.connector
                              import simplejson as json
                              Severity: Major
                              Found in myems-api/core/tenant.py - About 1 wk to fix

                                File shopfloor.py has 2510 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                import uuid
                                from datetime import datetime, timedelta
                                import falcon
                                import mysql.connector
                                import simplejson as json
                                Severity: Major
                                Found in myems-api/core/shopfloor.py - About 1 wk to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language