Showing 5,781 of 10,536 total issues

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

def main(logger):

    while True:
        # the outermost while loop
        ################################################################################################################
Severity: Minor
Found in myems-aggregation/energy_storage_container_billing_charge.py - About 2 days 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

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

def main(logger):

    while True:
        # the outermost while loop
        ################################################################################################################
Severity: Minor
Found in myems-aggregation/energy_storage_power_station_billing_charge.py - About 2 days 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

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

def main(logger):

    while True:
        # the outermost while loop
        ################################################################################################################
Severity: Minor
Found in myems-aggregation/microgrid_carbon_discharge.py - About 2 days 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

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

def main(logger):

    while True:
        # the outermost while loop
        ################################################################################################################
Severity: Minor
Found in myems-aggregation/microgrid_billing_discharge.py - About 2 days 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

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

def main(logger):

    while True:
        # the outermost while loop
        ################################################################################################################
Severity: Minor
Found in myems-aggregation/energy_storage_container_carbon_charge.py - About 2 days 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

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

def main(logger):

    while True:
        # the outermost while loop
        ################################################################################################################
Severity: Minor
Found in myems-aggregation/energy_storage_container_billing_discharge.py - About 2 days 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

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

def main(logger):

    while True:
        # the outermost while loop
        ################################################################################################################
Severity: Minor
Found in myems-aggregation/energy_storage_power_station_carbon_discharge.py - About 2 days 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

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

def main(logger):

    while True:
        # the outermost while loop
        ################################################################################################################
Severity: Minor
Found in myems-aggregation/energy_storage_container_carbon_discharge.py - About 2 days 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

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

def main(logger):

    while True:
        # the outermost while loop
        ################################################################################################################
Severity: Minor
Found in myems-aggregation/energy_storage_power_station_carbon_charge.py - About 2 days 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

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

def main(logger):

    while True:
        # the outermost while loop
        ################################################################################################################
Severity: Minor
Found in myems-aggregation/microgrid_carbon_charge.py - About 2 days 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

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

def main(logger):

    while True:
        # the outermost while loop
        ################################################################################################################
Severity: Minor
Found in myems-aggregation/energy_storage_power_station_billing_discharge.py - About 2 days 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

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

def main(logger):

    while True:
        # the outermost while loop
        ################################################################################################################
Severity: Minor
Found in myems-aggregation/microgrid_billing_charge.py - About 2 days 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

File emailAddresses.js has 1003 lines of code (exceeds 250 allowed). Consider refactoring.
Open

const result = [
  'rande@live.com',
  'jshirley@comcast.net',
  'sartak@hotmail.com',
  'cgarcia@comcast.net',
Severity: Major
Found in myems-web/src/data/email/emailAddresses.js - About 2 days to fix

    File markdown.js has 999 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // Released under MIT license
    // Copyright (c) 2009-2010 Dominic Baggott
    // Copyright (c) 2009-2010 Ash Berlin
    // Copyright (c) 2011 Christoph Dorn <christoph@christophdorn.com> (http://www.christophdorn.com)
    
    
    Severity: Major
    Found in myems-admin/js/plugins/bootstrap-markdown/markdown.js - About 2 days to fix

      File bootstrap-markdown.js has 988 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* ===================================================
       * bootstrap-markdown.js v2.9.0
       * http://github.com/toopay/bootstrap-markdown
       * ===================================================
       * Copyright 2013-2015 Taufan Aditya
      Severity: Major
      Found in myems-admin/js/plugins/bootstrap-markdown/bootstrap-markdown.js - About 2 days to fix

        File ocLazyLoad.js has 987 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * oclazyload - Load modules on demand (lazy load) with angularJS
         * @version v1.0.10
         * @link https://github.com/ocombe/ocLazyLoad
         * @license MIT
        Severity: Major
        Found in myems-admin/js/plugins/oclazyload/ocLazyLoad.js - About 2 days to fix

          File angular-datepicker.js has 984 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          (function (global, factory) {'use strict';var fnc;fnc = (typeof exports === 'object' && typeof module !== 'undefined') ? module.exports = factory(require('angular'), require('moment')) :(typeof define === 'function' && define.amd) ? define(['angular', 'moment'], factory) :factory(global.angular, global.moment);}(this, function (angular, moment) {
          //(function (global, factory) {
          //  'use strict';
          //  var fnc;
          //  fnc = (typeof exports === 'object' && typeof module !== 'undefined') ? module.exports = factory(require('angular'), require('moment')) :
          Severity: Major
          Found in myems-admin/js/plugins/datapicker/angular-datepicker.js - About 2 days to fix

            Function $$AnimateQueueProvider has 479 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animateProvider) {
              var PRE_DIGEST_STATE = 1;
              var RUNNING_STATE = 2;
              var ONE_SPACE = ' ';
            
            
            Severity: Major
            Found in myems-admin/js/angular/angular-animate.js - About 2 days to fix

              Function on_get has a Cognitive Complexity of 118 (exceeds 5 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/energystoragepowerstationreportingparameters.py - About 2 days 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

              Function statistics_hourly_data_by_period has a Cognitive Complexity of 118 (exceeds 5 allowed). Consider refactoring.
              Open

              def statistics_hourly_data_by_period(rows_hourly, start_datetime_utc, end_datetime_utc, period_type):
                  # todo: validate parameters
                  if start_datetime_utc is None or \
                          end_datetime_utc is None or \
                          start_datetime_utc >= end_datetime_utc or \
              Severity: Minor
              Found in myems-api/core/utilities.py - About 2 days 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

              Severity
              Category
              Status
              Source
              Language