Showing 5,781 of 10,536 total issues

File offlinemetercarbon.py has 572 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import base64
from core.utilities import get_translation
import os
import re
import uuid
Severity: Major
Found in myems-api/excelexporters/offlinemetercarbon.py - About 1 day to fix

    File offlinemetercost.py has 572 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import base64
    from core.utilities import get_translation
    import os
    import re
    import uuid
    Severity: Major
    Found in myems-api/excelexporters/offlinemetercost.py - About 1 day to fix

      File virtualmetercarbon.py has 572 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import base64
      from core.utilities import get_translation
      import os
      import re
      import uuid
      Severity: Major
      Found in myems-api/excelexporters/virtualmetercarbon.py - About 1 day to fix

        File virtualmetercost.py has 572 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import base64
        from core.utilities import get_translation
        import os
        import re
        import uuid
        Severity: Major
        Found in myems-api/excelexporters/virtualmetercost.py - About 1 day to fix

          File virtualmeterplan.py has 571 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import base64
          from core.utilities import get_translation
          import os
          import re
          import uuid
          Severity: Major
          Found in myems-api/excelexporters/virtualmeterplan.py - About 1 day to fix

            File offlinemetersaving.py has 571 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import base64
            from core.utilities import get_translation
            import os
            import re
            import uuid
            Severity: Major
            Found in myems-api/excelexporters/offlinemetersaving.py - About 1 day to fix

              File virtualmetersaving.py has 571 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import base64
              from core.utilities import get_translation
              import os
              import re
              import uuid
              Severity: Major
              Found in myems-api/excelexporters/virtualmetersaving.py - About 1 day to fix

                File offlinemeterplan.py has 571 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import base64
                from core.utilities import get_translation
                import os
                import re
                import uuid
                Severity: Major
                Found in myems-api/excelexporters/offlinemeterplan.py - About 1 day to fix

                  File metercarbon.py has 570 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import base64
                  from core.utilities import get_translation
                  import os
                  import re
                  import uuid
                  Severity: Major
                  Found in myems-api/excelexporters/metercarbon.py - About 1 day to fix

                    File metercost.py has 570 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import base64
                    from core.utilities import get_translation
                    import os
                    import re
                    import uuid
                    Severity: Major
                    Found in myems-api/excelexporters/metercost.py - About 1 day to fix

                      File virtualmeterenergy.py has 569 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import base64
                      from core.utilities import get_translation
                      import os
                      import re
                      import uuid
                      Severity: Major
                      Found in myems-api/excelexporters/virtualmeterenergy.py - About 1 day to fix

                        File equipmentoutput.py has 569 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import base64
                        from core.utilities import get_translation
                        import os
                        import re
                        import uuid
                        Severity: Major
                        Found in myems-api/excelexporters/equipmentoutput.py - About 1 day to fix

                          File offlinemeterenergy.py has 569 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import base64
                          from core.utilities import get_translation
                          import os
                          import re
                          import uuid
                          Severity: Major
                          Found in myems-api/excelexporters/offlinemeterenergy.py - About 1 day to fix

                            Function $get has 237 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    this.$get = ["$log", "$rootElement", "$rootScope", "$cacheFactory", "$q", function ($log, $rootElement, $rootScope, $cacheFactory, $q) {
                                        var instanceInjector,
                                            filesCache = $cacheFactory('ocLazyLoad');
                            
                                        if (!debug) {
                            Severity: Major
                            Found in myems-admin/js/plugins/oclazyload/ocLazyLoad.js - About 1 day to fix

                              File metercomparison.py has 561 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import base64
                              from core.utilities import get_translation
                              import os
                              import re
                              import uuid
                              Severity: Major
                              Found in myems-api/excelexporters/metercomparison.py - About 1 day to fix

                                Function main has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
                                Open

                                def main():
                                    """main"""
                                    # create logger
                                    logger = logging.getLogger('myems-aggregation')
                                    # specifies the lowest-severity log message a logger will handle,
                                Severity: Minor
                                Found in myems-aggregation/main.py - About 1 day 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

                                Consider simplifying this complex logical expression.
                                Open

                                                if (u) {
                                                  var l = a && (a.shiftKey || a.ctrlKey || a.metaKey) ? !0 : !1;
                                                  u = !0;
                                                  "multi-extended" === b.options.selectionMode &&
                                                    (u = !b.isObjInSelList(h) || !l || D || (a && a.shiftKey));
                                Severity: Critical
                                Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 1 day to fix

                                  File combinedequipmentcarbon.py has 555 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import re
                                  from datetime import datetime, timedelta, timezone
                                  from decimal import Decimal
                                  import gettext
                                  import falcon
                                  Severity: Major
                                  Found in myems-api/reports/combinedequipmentcarbon.py - About 1 day to fix

                                    File advancedreport.py has 555 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

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

                                      File clockpicker.js has 554 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      /*!
                                       * ClockPicker v0.0.7 (http://weareoutman.github.io/clockpicker/)
                                       * Copyright 2014 Wang Shenwei.
                                       * Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)
                                       */
                                      Severity: Major
                                      Found in myems-admin/js/plugins/clockpicker/clockpicker.js - About 1 day to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language