Showing 5,781 of 10,536 total issues

Consider simplifying this complex logical expression.
Open

              if (
                !a.getTemplateUrl() &&
                a.longestItem &&
                0 < a.currentList.length
              ) {
Severity: Critical
Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

        if (meter_list is None or len(meter_list) == 0) and \
                (virtual_meter_list is None or len(virtual_meter_list) == 0) and \
                (offline_meter_list is None or len(offline_meter_list) == 0) and \
                (equipment_list is None or len(equipment_list) == 0):
            print("This is an empty combined equipment ")
    Severity: Critical
    Found in myems-aggregation/combined_equipment_energy_output_category.py - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

          if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
                  (energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
                  (energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0) and \
                  (energy_equipment_hourly is None or len(energy_equipment_hourly) == 0):
              # There isn't any energy data
      Severity: Critical
      Found in myems-aggregation/combined_equipment_energy_output_category.py - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

            if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
                    (energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
                    (energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0) and \
                    (energy_equipment_hourly is None or len(energy_equipment_hourly) == 0):
                # There isn't any energy data
        Severity: Critical
        Found in myems-aggregation/combined_equipment_energy_input_category.py - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

              if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
                      (energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
                      (energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0) and \
                      (energy_equipment_hourly is None or len(energy_equipment_hourly) == 0):
                  # There isn't any energy data
          Severity: Critical
          Found in myems-aggregation/shopfloor_energy_input_item.py - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

                if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
                        (energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
                        (energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0) and \
                        (energy_equipment_hourly is None or len(energy_equipment_hourly) == 0):
                    # There isn't any energy data
            Severity: Critical
            Found in myems-aggregation/shopfloor_energy_input_category.py - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                  if (meter_list is None or len(meter_list) == 0) and \
                          (virtual_meter_list is None or len(virtual_meter_list) == 0) and \
                          (offline_meter_list is None or len(offline_meter_list) == 0) and \
                          (equipment_list is None or len(equipment_list) == 0):
                      print("This is an empty shopfloor ")
              Severity: Critical
              Found in myems-aggregation/shopfloor_energy_input_item.py - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                    if (meter_list is None or len(meter_list) == 0) and \
                            (virtual_meter_list is None or len(virtual_meter_list) == 0) and \
                            (offline_meter_list is None or len(offline_meter_list) == 0) and \
                            (equipment_list is None or len(equipment_list) == 0):
                        print("This is an empty combined equipment ")
                Severity: Critical
                Found in myems-aggregation/combined_equipment_energy_input_category.py - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                      if (meter_list is None or len(meter_list) == 0) and \
                              (virtual_meter_list is None or len(virtual_meter_list) == 0) and \
                              (offline_meter_list is None or len(offline_meter_list) == 0) and \
                              (equipment_list is None or len(equipment_list) == 0):
                          print("This is an empty shopfloor ")
                  Severity: Critical
                  Found in myems-aggregation/shopfloor_energy_input_category.py - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                        if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
                                (energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
                                (energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0) and \
                                (energy_equipment_hourly is None or len(energy_equipment_hourly) == 0):
                            # There isn't any energy data
                    Severity: Critical
                    Found in myems-aggregation/combined_equipment_energy_input_item.py - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                          if (meter_list is None or len(meter_list) == 0) and \
                                  (virtual_meter_list is None or len(virtual_meter_list) == 0) and \
                                  (offline_meter_list is None or len(offline_meter_list) == 0) and \
                                  (equipment_list is None or len(equipment_list) == 0):
                              print("This is an empty combined equipment ")
                      Severity: Critical
                      Found in myems-aggregation/combined_equipment_energy_input_item.py - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                                if 'host' not in server.keys() \
                                        or 'port' not in server.keys() \
                                        or server['host'] is None \
                                        or server['port'] is None \
                                        or len(server['host']) == 0 \
                        Severity: Critical
                        Found in myems-modbus-tcp/main.py - About 1 hr to fix

                          Function sync has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  ViewService.prototype.sync = function () {
                                      var _this = this;
                                      var uiViewsByFqn = this._uiViews.map(function (uiv) { return [uiv.fqn, uiv]; }).reduce(applyPairs, {});
                                      // Return a weighted depth value for a uiView.
                                      // The depth is the nesting depth of ui-views (based on FQN; times 10,000)
                          Severity: Minor
                          Found in myems-admin/js/ui-router/angular-ui-router.js - About 1 hr to fix

                            Function getInertBodyElement has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              var getInertBodyElement /* function(html: string): HTMLBodyElement */ = (function(window, document) {
                                if (isDOMParserAvailable()) {
                                  return getInertBodyElement_DOMParser;
                                }
                            
                            
                            Severity: Minor
                            Found in myems-admin/js/angular/angular-sanitize.js - About 1 hr to fix

                              Function updateTotalUploadProgress has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  value: function updateTotalUploadProgress() {
                                    var totalUploadProgress;
                                    var totalBytesSent = 0;
                                    var totalBytes = 0;
                                    var activeFiles = this.getActiveFiles();
                              Severity: Minor
                              Found in myems-admin/js/plugins/dropzone/dropzone.js - About 1 hr to fix

                                Function showPreview has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  , showPreview: function() {
                                      var options = this.$options,
                                          container = this.$textarea,
                                          afterContainer = container.next(),
                                          replacementContainer = $('<div/>',{'class':'md-preview','data-provider':'markdown-preview'}),
                                Severity: Minor
                                Found in myems-admin/js/plugins/bootstrap-markdown/bootstrap-markdown.js - About 1 hr to fix

                                  Function updateEvent has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          function updateEvent(event) { // update an existing event
                                              var i, len = cache.length, e,
                                                  defaultEventEnd = getView().defaultEventEnd, // getView???
                                                  startDelta = event.start - event._start,
                                                  endDelta = event.end ?
                                  Severity: Minor
                                  Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                    Function getExistingFallback has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        value: function getExistingFallback() {
                                          var getFallback = function getFallback(elements) {
                                            var _iteratorNormalCompletion12 = true;
                                            var _didIteratorError12 = false;
                                            var _iteratorError12 = undefined;
                                    Severity: Minor
                                    Found in myems-admin/js/plugins/dropzone/dropzone.js - About 1 hr to fix

                                      Function distributeHeight has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function distributeHeight(els, availableHeight, shouldRedistribute) {
                                      
                                          // *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions,
                                          // and it is better to be shorter than taller, to avoid creating unnecessary scrollbars.
                                      
                                      
                                      Severity: Minor
                                      Found in myems-admin/js/plugins/fullcalendar/fullcalendar.js - About 1 hr to fix

                                        Function getSkinCss has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            function getSkinCss(event, opt) {
                                                var source = event.source || {};
                                                var eventColor = event.color;
                                                var sourceColor = source.color;
                                                var optionColor = opt('eventColor');
                                        Severity: Minor
                                        Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language