Showing 5,781 of 10,536 total issues

Function SlickCarousel has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const SlickCarousel = () => {
  return (
    <Fragment>
      <PageHeader
        title="Slick Carousel"
Severity: Minor
Found in myems-web/src/components/plugins/SlickCarousel.js - About 1 hr to fix

    Function Events has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const Events = () => {
      const { loading, data: events } = useFakeFetch(rawEvents);
    
      return (
        <Card>
    Severity: Minor
    Found in myems-web/src/components/page/Events.js - About 1 hr to fix

      Function getOption has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        let getOption = () => {
          return {
            tooltip: {
              trigger: 'axis',
              axisPointer: {
      Severity: Minor
      Found in myems-web/src/components/MyEMS/common/SectionLineChart.js - About 1 hr to fix

        Function worker has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        def worker(combined_equipment):
            ####################################################################################################################
            # Step 1: get all output meters associated with the combined equipment
            ####################################################################################################################
            print("Step 1: get all output meters associated with the combined equipment " + str(combined_equipment['name']))
        Severity: Minor
        Found in myems-aggregation/combined_equipment_energy_output_category.py - About 1 hr to fix

          Function EcommerceWidgets has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const EcommerceWidgets = () => {
            const { products, shoppingCart, appliedPromo } = useContext(ProductContext);
          
            const calculatedShippingCost = parseFloat(
              shoppingCart
          Severity: Minor
          Found in myems-web/src/components/widgets/EcommerceWidgets.js - About 1 hr to fix

            Function ModalLabelContent has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const ModalLabelContent = () => {
              return (
                <>
                  {labels.slice(0, 3).map(label => {
                    return (
            Severity: Minor
            Found in myems-web/src/components/kanban/ModalLabelContent.js - About 1 hr to fix

              Function worker has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              def worker(shopfloor):
                  ####################################################################################################################
                  # Step 1: get all input meters associated with the shopfloor
                  ####################################################################################################################
                  print("Step 1: get all input meters associated with the shopfloor " + str(shopfloor['name']))
              Severity: Minor
              Found in myems-aggregation/shopfloor_energy_input_category.py - About 1 hr to fix

                Function worker has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                def worker(shopfloor):
                    ####################################################################################################################
                    # Step 1: get all input meters associated with the shopfloor
                    ####################################################################################################################
                    print("Step 1: get all input meters associated with the shopfloor " + str(shopfloor['name']))
                Severity: Minor
                Found in myems-aggregation/shopfloor_energy_input_item.py - About 1 hr to fix

                  Function worker has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  def worker(combined_equipment):
                      ####################################################################################################################
                      # Step 1: get all input meters associated with the combined equipment
                      ####################################################################################################################
                      print("Step 1: get all input meters associated with the combined equipment " + str(combined_equipment['name']))
                  Severity: Minor
                  Found in myems-aggregation/combined_equipment_energy_input_category.py - About 1 hr to fix

                    Function worker has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    def worker(combined_equipment):
                        ####################################################################################################################
                        # Step 1: get all input meters associated with the combined equipment
                        ####################################################################################################################
                        print("Step 1: get all input meters associated with the combined equipment " + str(combined_equipment['name']))
                    Severity: Minor
                    Found in myems-aggregation/combined_equipment_energy_input_item.py - About 1 hr to fix

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

                      def generate_excel(report,
                                         name,
                                         reporting_start_datetime_local,
                                         reporting_end_datetime_local,
                                         language):

                        Function on_post has 37 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: Minor
                        Found in myems-api/core/energystoragecontainer.py - About 1 hr to fix

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

                              def on_put(req, resp, id_):
                                  """Handles PUT requests"""
                                  admin_control(req)
                                  try:
                                      raw_json = req.stream.read().decode('utf-8')
                          Severity: Minor
                          Found in myems-api/core/offlinemeter.py - About 1 hr to fix

                            Function on_put has 37 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/emailmessage.py - About 1 hr to fix

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

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

                                Function on_post has 37 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: Minor
                                Found in myems-api/core/virtualmeter.py - About 1 hr to fix

                                  Function on_post has 37 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: Minor
                                  Found in myems-api/core/virtualmeter.py - About 1 hr to fix

                                    Function createData has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        var createData = function(typeNumber, errorCorrectionLevel, dataList) {
                                    
                                          var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectionLevel);
                                    
                                          var buffer = qrBitBuffer();
                                    Severity: Minor
                                    Found in myems-admin/js/angular/qrcode.js - About 1 hr to fix

                                      Function PushStateLocationService has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          var PushStateLocationService = /** @class */ (function (_super) {
                                              __extends$2(PushStateLocationService, _super);
                                              function PushStateLocationService(router) {
                                                  var _this = _super.call(this, router, true) || this;
                                                  _this._config = router.urlService.config;
                                      Severity: Minor
                                      Found in myems-admin/js/ui-router/angular-ui-router.js - About 1 hr to fix

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

                                                    link: function (scope, elem, attrs) {
                                        
                                                        scope.knob = scope.$eval(attrs.knobData);
                                        
                                                        var renderKnob = function(){
                                        Severity: Minor
                                        Found in myems-admin/js/plugins/jsKnob/angular-knob.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language