Showing 5,781 of 10,536 total issues
File meter.controller.js
has 430 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
app.controller('MeterController', function($scope,
$rootScope,
$window,
Function editEnergyStorageContainerBattery
has 158 lines of code (exceeds 25 allowed). Consider refactoring. Open
$scope.editEnergyStorageContainerBattery = function(energystoragecontainerbattery) {
var modalInstance = $uibModal.open({
templateUrl: 'views/settings/energystoragecontainer/energystoragecontainerbattery.model.html',
controller: 'ModalEditEnergyStorageContainerBatteryCtrl',
windowClass: "animated fadeIn",
File metercarbon.py
has 429 lines of code (exceeds 250 allowed). Consider refactoring. Open
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
File metercost.py
has 429 lines of code (exceeds 250 allowed). Consider refactoring. Open
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
Function link
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function (scope, element, attrs, ngModel) {
var format = attrs.format || dateTimeConfig.format,
parentForm = element.inheritedData('$formController'),
views = $parse(attrs.views)(scope) || dateTimeConfig.views.concat(),
view = attrs.view || views[0],
Function addEnergyStorageContainerBattery
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
$scope.addEnergyStorageContainerBattery = function() {
var modalInstance = $uibModal.open({
templateUrl: 'views/settings/energystoragecontainer/energystoragecontainerbattery.model.html',
controller: 'ModalAddEnergyStorageContainerBatteryCtrl',
Function ExifRestore
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
function () {
function ExifRestore() {
_classCallCheck(this, ExifRestore);
}
- Read upRead up
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 lists
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
lists: (function( ) {
// Use a closure to hide a few variables.
var any_list = "[*+-]|\\d+\\.",
bullet_list = /[*+-]/,
number_list = /\d+\./,
Function ExifRestore
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
function () {
function ExifRestore() {
_classCallCheck(this, ExifRestore);
}
File virtualmeterplan.py
has 425 lines of code (exceeds 250 allowed). Consider refactoring. Open
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
File offlinemetersaving.py
has 425 lines of code (exceeds 250 allowed). Consider refactoring. Open
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
File virtualmetersaving.py
has 425 lines of code (exceeds 250 allowed). Consider refactoring. Open
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
File offlinemeterplan.py
has 425 lines of code (exceeds 250 allowed). Consider refactoring. Open
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
File EnterProduction.js
has 424 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { Fragment, useEffect, useState } from 'react';
import {
Breadcrumb,
BreadcrumbItem,
Button,
File gateway.py
has 424 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
Function generate_excel
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def generate_excel(report,
name,
reporting_start_datetime_local,
reporting_end_datetime_local,
period_type,
- Read upRead up
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 generate_excel
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def generate_excel(report,
name,
reporting_start_datetime_local,
reporting_end_datetime_local,
period_type,
- Read upRead up
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 on_post
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def on_post(req, resp):
"""Handles POST requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
- Read upRead up
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 meterenergy.py
has 416 lines of code (exceeds 250 allowed). Consider refactoring. Open
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
Function Xa
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
Xa = function(b, c, d) {
var g =
'<li iui-class="{{data[' +
b +
'].style.general}}" data-index="{{data[' +