Showing 5,781 of 10,536 total issues
File angular-message-format.js
has 697 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 $get
has 317 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($$jqLite, $rootScope, $injector, $$AnimateRunner, $$Map, $$rAFScheduler, $$animateCache) {
var animationQueue = [];
var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
Function on_get
has a Cognitive Complexity of 79 (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)
- 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 79 (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)
- 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 79 (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)
- 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 energystoragecontainerpowerconversionsystem.controller.js
has 690 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
app.controller('EnergyStorageContainerPowerconversionsystemController', function(
$scope,
$rootScope,
File spaceefficiency.py
has 688 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 spaceenergycategory.py
has 677 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 combinedequipmentstatistics.py
has 676 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
File ItemDashboard.js
has 673 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { Fragment, useEffect, useState, useContext } from 'react';
import CountUp from 'react-countup';
import {
Button,
ButtonGroup,
Function EventManager
has 303 lines of code (exceeds 25 allowed). Consider refactoring. Open
function EventManager(options, _sources) {
var t = this;
// exports
File rule.py
has 671 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
File combinedequipmentenergyitem.py
has 667 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
File webmessage.py
has 667 lines of code (exceeds 250 allowed). Consider refactoring. Open
import re
from datetime import datetime, timedelta, timezone
import falcon
import mysql.connector
import simplejson as json
File combinedequipmentenergycategory.py
has 666 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 on_get
has a Cognitive Complexity of 75 (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)
- 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 $SanitizeProvider
has 294 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $SanitizeProvider() {
var hasBeenInstantiated = false;
var svgEnabled = false;
this.$get = ['$$sanitizeUri', function($$sanitizeUri) {
File spaceoutput.py
has 654 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
Function slimScroll
has 290 lines of code (exceeds 25 allowed). Consider refactoring. Open
slimScroll: function(options) {
var defaults = {
// width in pixels of the visible scroll area
File shopfloorsaving.py
has 648 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