Showing 5,781 of 10,536 total issues
Function loadData
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
const loadData = table => {
table.current.selectionContext.selected = [];
onSelect();
let isResponseOK = false;
fetch(
Function worker
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
def worker(space):
####################################################################################################################
# Step 1: get all input meters associated with the space
####################################################################################################################
print("Step 1: get all input meters associated with the space " + str(space['name']))
Function worker
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
def worker(space):
####################################################################################################################
# Step 1: get all input meters associated with the space
####################################################################################################################
print("Step 1: get all input meters associated with the space " + str(space['name']))
Function on_get
has 63 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_post
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
def on_post(req, resp, id_):
"""Handles POST requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
Function on_post
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
def on_post(req, resp):
"""Handles POST requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
File emailserver.py
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
import re
import falcon
import mysql.connector
import simplejson as json
Function cancelUpload
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
value: function cancelUpload(file) {
if (file.status === Dropzone.UPLOADING) {
var groupedFiles = this._getFilesWithXhr(file.xhr);
var _iteratorNormalCompletion19 = true;
Function changeWatcher
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.changeWatcher = function(arraySource, tokenFn) {
var self;
var getTokens = function() {
var array = angular.isFunction(arraySource) ? arraySource() : arraySource;
var result = [], token, el;
File EchartMap.js
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { Fragment } from 'react';
import { Button, Card, CardBody } from 'reactstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import ReactEchartsCore from 'echarts-for-react/lib/core';
import * as echarts from 'echarts/lib/echarts';
Function Echarts
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Echarts = () => {
const { isDark } = useContext(AppContext);
return (
<Fragment>
Function ruleInAngularExpression
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
MessageFormatParser.prototype.ruleInAngularExpression = function ruleInAngularExpression() {
var match = this.searchRe(INTERESTING_OPERATORS_RE);
var position;
if (match == null) {
if (this.angularOperatorStack.length === 0) {
Function allocateAxisBoxFirstPhase
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function allocateAxisBoxFirstPhase(axis) {
// find the bounding box of the axis by looking at label
// widths/heights and ticks, make room by diminishing the
// plotOffset; this first phase only looks at one
// dimension per axis, the other dimension depends on the
Function Map
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
jvm.Map = function(params) {
var map = this,
e;
this.params = jvm.$.extend(true, {}, jvm.Map.defaultParams, params);
- 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 arrayReducer
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
export const arrayReducer = (state, action) => {
const { type, id, payload, sortBy, order, isAddToStart, isUpdatedStart } = action;
switch (type) {
case 'ADD':
if (!payload) {
- 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 job
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def job(logger, ):
################################################################################################################
# Step 1: Verify Gateway Token
################################################################################################################
cnx_system_db = None
- 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 18 (exceeds 5 allowed). Consider refactoring. Open
def on_get(req, resp, id_, gid):
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_ENERGY_STORAGE_CONTAINER_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_get
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def on_get(req, resp, id_, lid):
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_ENERGY_STORAGE_CONTAINER_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_get
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def on_get(req, resp, id_, bid):
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_ENERGY_STORAGE_CONTAINER_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_get
has a Cognitive Complexity of 18 (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"