Showing 5,781 of 10,536 total issues
File svg.py
has 378 lines of code (exceeds 250 allowed). Consider refactoring. Open
import uuid
from datetime import datetime, timedelta
import falcon
import mysql.connector
import simplejson as json
File notification.py
has 378 lines of code (exceeds 250 allowed). Consider refactoring. Open
from datetime import datetime, timedelta, timezone
import falcon
import mysql.connector
import simplejson as json
import config
File energystoragecontainergrid.controller.js
has 377 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
app.controller('EnergyStorageContainerGridController', function(
$scope,
$rootScope,
Function gifImage
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
var gifImage = function(width, height) {
var _width = width;
var _height = height;
var _data = new Array(width * height);
Function _updateFilesUploadProgress
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
value: function _updateFilesUploadProgress(files, xhr, e) {
var progress;
if (typeof e !== 'undefined') {
progress = 100 * e.loaded / e.total;
Function Sidepanel
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Sidepanel = () => {
const { toggleModal } = useContext(AppContext);
return (
<Fragment>
<PageHeader
File angular-sanitize.js
has 376 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @license AngularJS v1.8.3
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
Function on_get
has 125 lines of code (exceeds 25 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)
File timezones.js
has 374 lines of code (exceeds 250 allowed). Consider refactoring. Open
export default [
{
offset: 'GMT-12:00',
name: 'Etc/GMT-12'
},
Function $ViewDirective
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $ViewDirective($view, $animate, $uiViewScroll, $interpolate, $q) {
function getRenderer() {
return {
enter: function (element, target, cb) {
if (ng.version.minor > 2) {
Function on_get
has 124 lines of code (exceeds 25 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)
Function on_get
has 124 lines of code (exceeds 25 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)
File metersubmetersbalance.py
has 373 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
Function SettingsAccount
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
const SettingsAccount = () => {
// State
const [viewProfile, setViewProfile] = useState('view-everyone');
const [tagSetting, setTagSetting] = useState('tag-off');
const [showFollowers, setShowFollowers] = useState(true);
Function on_get
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
def on_get(req, resp, id_):
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)
- 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_put
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
def on_put(req, resp):
"""Handles PUT requests"""
access_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
Function on_get
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
def on_get(req, resp, id_):
"""Handles GET requests"""
access_control(req)
if not id_.isdigit() or int(id_) <= 0:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
- 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_delete
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
def on_delete(req, resp, id_):
access_control(req)
if not id_.isdigit() or int(id_) <= 0:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_WEB_MESSAGE_ID')
- 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 33 (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
Function on_post
has a Cognitive Complexity of 33 (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"