Showing 5,781 of 10,536 total issues

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

def generate_excel(report,
                   name,
                   base_period_start_datetime_local,
                   base_period_end_datetime_local,
                   reporting_start_datetime_local,
Severity: Major
Found in myems-api/excelexporters/storeenergyitem.py - About 2 hrs to fix

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

    def generate_excel(report,
                       name,
                       base_period_start_datetime_local,
                       base_period_end_datetime_local,
                       reporting_start_datetime_local,
    Severity: Major
    Found in myems-api/excelexporters/tenantload.py - About 2 hrs to fix

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

      def generate_excel(report,
                         name,
                         base_period_start_datetime_local,
                         base_period_end_datetime_local,
                         reporting_start_datetime_local,
      Severity: Major
      Found in myems-api/excelexporters/spaceefficiency.py - About 2 hrs to fix

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

        def generate_excel(report,
                           name,
                           base_period_start_datetime_local,
                           base_period_end_datetime_local,
                           reporting_start_datetime_local,
        Severity: Major
        Found in myems-api/excelexporters/shopfloorenergyitem.py - About 2 hrs to fix

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

          def generate_excel(report, space_name, reporting_start_datetime_local, reporting_end_datetime_local, language):
          
              trans = get_translation(language)
              trans.install()
              _ = trans.gettext
          Severity: Major
          Found in myems-api/excelexporters/tenantbatch.py - About 2 hrs to fix

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

            def generate_excel(report,
                               name,
                               base_period_start_datetime_local,
                               base_period_end_datetime_local,
                               reporting_start_datetime_local,
            Severity: Major
            Found in myems-api/excelexporters/tenantenergyitem.py - About 2 hrs to fix

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

              def generate_excel(report,
                                 name,
                                 base_period_start_datetime_local,
                                 base_period_end_datetime_local,
                                 reporting_start_datetime_local,
              Severity: Major
              Found in myems-api/excelexporters/spaceload.py - About 2 hrs to fix

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

                def generate_excel(report,
                                   name,
                                   base_period_start_datetime_local,
                                   base_period_end_datetime_local,
                                   reporting_start_datetime_local,
                Severity: Major
                Found in myems-api/excelexporters/equipmentefficiency.py - About 2 hrs to fix

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

                  def generate_excel(report,
                                     name,
                                     base_period_start_datetime_local,
                                     base_period_end_datetime_local,
                                     reporting_start_datetime_local,
                  Severity: Major
                  Found in myems-api/excelexporters/equipmentenergyitem.py - About 2 hrs to fix

                    Function on_post has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def on_post(req, resp):
                            """Handles POST requests"""
                            admin_control(req)
                            try:
                                raw_json = req.stream.read().decode('utf-8')
                    Severity: Major
                    Found in myems-api/core/microgrid.py - About 2 hrs to fix

                      File MultiTrendChart.js has 253 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import React, { useState, useContext, useEffect, useRef } from 'react';
                      import { Row, Col, Card, CardBody, CustomInput } from 'reactstrap';
                      import { rgbaColor, themeColors, isIterableArray } from '../../../helpers/utils';
                      import {
                        Chart as ChartJS,
                      Severity: Minor
                      Found in myems-web/src/components/MyEMS/common/MultiTrendChart.js - About 2 hrs to fix

                        Function Ng1LocationServices has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            var Ng1LocationServices = /** @class */ (function () {
                                function Ng1LocationServices($locationProvider) {
                                    // .onChange() registry
                                    this._urlListeners = [];
                                    this.$locationProvider = $locationProvider;
                        Severity: Major
                        Found in myems-admin/js/ui-router/angular-ui-router.js - About 2 hrs to fix

                          Function $LogProvider has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          angular.mock.$LogProvider = function() {
                            var debug = true;
                          
                            function concat(array1, array2, index) {
                              return array1.concat(Array.prototype.slice.call(array2, index));
                          Severity: Major
                          Found in myems-admin/js/angular/angular-mocks.js - About 2 hrs to fix

                            Function setupHiddenFileInput has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    var setupHiddenFileInput = function setupHiddenFileInput() {
                                      if (_this3.hiddenFileInput) {
                                        _this3.hiddenFileInput.parentNode.removeChild(_this3.hiddenFileInput);
                                      }
                            
                            
                            Severity: Major
                            Found in myems-admin/js/plugins/dropzone/dropzone.js - About 2 hrs to fix

                              Function fillInSeriesOptions has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      function fillInSeriesOptions() {
                              
                                          var neededColors = series.length, maxIndex = -1, i;
                              
                                          // Subtract the number of series that already have fixed colors or
                              Severity: Major
                              Found in myems-admin/js/plugins/flot/jquery.flot.js - About 2 hrs to fix

                                Function getCurrentItemStyle has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      this.getCurrentItemStyle = function(a, c) {
                                        var d = b.options.controlStyle.item;
                                        if (a)
                                          switch (a.style) {
                                            case "initial":
                                Severity: Major
                                Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 2 hrs to fix

                                  Function Rb has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                              Rb = function(b) {
                                                b &&
                                                  (b.bind("touchstart", function(b) {
                                                    var c = a.getItemFromChildElem(this);
                                                    c &&
                                  Severity: Major
                                  Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 2 hrs to fix

                                    Function CustomerSummary has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const CustomerSummary = () => {
                                      const { loading, data: customer } = useFakeFetch(rawCustomer);
                                      const { name, email, createdAt } = customer;
                                    
                                      return (
                                    Severity: Major
                                    Found in myems-web/src/components/page/CustomerDetails.js - About 2 hrs to fix

                                      Function deps has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                                      function ($ocLazyLoad) {
                                                                          return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'daterangepicker', 'toaster', ]).then(
                                                                              function () {
                                                                                  return $ocLazyLoad.load([{
                                                                                      serie: true,
                                      Severity: Major
                                      Found in myems-admin/app/config.router.js - About 2 hrs to fix

                                        Function deps has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                                        function ($ocLazyLoad) {
                                                                            return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'daterangepicker', 'toaster']).then(
                                                                                function () {
                                                                                    return $ocLazyLoad.load([{
                                                                                        serie: true,
                                        Severity: Major
                                        Found in myems-admin/app/config.router.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language