Showing 5,781 of 10,536 total issues

Function addMicrogridBattery has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      $scope.addMicrogridBattery = function() {

          var modalInstance = $uibModal.open({
              templateUrl: 'views/settings/microgrid/microgridbattery.model.html',
              controller: 'ModalAddMicrogridBatteryCtrl',

    Function editMicrogridHeatpump has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          $scope.editMicrogridHeatpump = function(microgridheatpump) {
              var modalInstance = $uibModal.open({
                  templateUrl: 'views/settings/microgrid/microgridheatpump.model.html',
                  controller: 'ModalEditMicrogridHeatpumpCtrl',
                windowClass: "animated fadeIn",

      Function on_get has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def on_get(req, resp):
              if 'API-KEY' not in req.headers or \
                      not isinstance(req.headers['API-KEY'], str) or \
                      len(str.strip(req.headers['API-KEY'])) == 0:
                  access_control(req)
      Severity: Minor
      Found in myems-api/reports/offlinemeterbatch.py - About 1 hr to fix

        Function generate_excel has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        def generate_excel(report,
                           name,
                           reporting_start_datetime_local,
                           reporting_end_datetime_local,
                           period_type,
        Severity: Minor
        Found in myems-api/excelexporters/tenantbill.py - About 1 hr to fix

          Function on_put has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def on_put(req, resp, id_):
                  """Handles PUT requests"""
                  admin_control(req)
          
                  if not id_.isdigit() or int(id_) <= 0:
          Severity: Minor
          Found in myems-api/core/wechatmessage.py - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

              "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
            Severity: Critical
            Found in myems-admin/js/angular/i18n/angular-locale_sr-cyrl-rs.js - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
              Severity: Critical
              Found in myems-admin/js/angular/i18n/angular-locale_sr-latn-ba.js - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                  "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                Severity: Critical
                Found in myems-admin/js/angular/i18n/angular-locale_bs-latn.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                    "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                  Severity: Critical
                  Found in myems-admin/js/angular/i18n/angular-locale_hr.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                      "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                    Severity: Critical
                    Found in myems-admin/js/angular/i18n/angular-locale_sr-cyrl-ba.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                        "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                      Severity: Critical
                      Found in myems-admin/js/angular/i18n/angular-locale_hr-hr.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                          "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                        Severity: Critical
                        Found in myems-admin/js/angular/i18n/angular-locale_bs.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                            "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                          Severity: Critical
                          Found in myems-admin/js/angular/i18n/angular-locale_sr-cyrl-me.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                              "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                            Severity: Critical
                            Found in myems-admin/js/angular/i18n/angular-locale_bs-cyrl-ba.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

                                "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                              Severity: Critical
                              Found in myems-admin/js/angular/i18n/angular-locale_sr-cyrl-xk.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                  "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                                Severity: Critical
                                Found in myems-admin/js/angular/i18n/angular-locale_bs-cyrl.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                    "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                                  Severity: Critical
                                  Found in myems-admin/js/angular/i18n/angular-locale_bs-latn-ba.js - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                      "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                                    Severity: Critical
                                    Found in myems-admin/js/angular/i18n/angular-locale_sr.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                        "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                                      Severity: Critical
                                      Found in myems-admin/js/angular/i18n/angular-locale_hr-ba.js - About 1 hr to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                          "pluralCat": function(n, opt_precision) {  if (n % 10 == 1 && n % 100 != 11 && n % 100 != 71 && n % 100 != 91) {    return PLURAL_CATEGORY.ONE;  }  if (n % 10 == 2 && n % 100 != 12 && n % 100 != 72 && n % 100 != 92) {    return PLURAL_CATEGORY.TWO;  }  if ((n % 10 >= 3 && n % 10 <= 4 || n % 10 == 9) && (n % 100 < 10 || n % 100 > 19) && (n % 100 < 70 || n % 100 > 79) && (n % 100 < 90 || n % 100 > 99)) {    return PLURAL_CATEGORY.FEW;  }  if (n != 0 && n % 1000000 == 0) {    return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
                                        Severity: Critical
                                        Found in myems-admin/js/angular/i18n/angular-locale_br-fr.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language