Showing 5,781 of 10,536 total issues
File customers.js
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {v4 as uuid} from 'uuid';
import team2 from '../../assets/img/team/2.jpg';
import team3 from '../../assets/img/team/3.jpg';
import team4 from '../../assets/img/team/4.jpg';
import team13 from '../../assets/img/team/13.jpg';
File acquisition.py
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import json
import math
import telnetlib3
import asyncio
import time
Function on_put
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
Open
def on_put(req, resp, id_):
"""Handles PUT 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 28 (exceeds 5 allowed). Consider refactoring. Open
Open
def on_post(req, resp):
"""Handles POST requests"""
admin_control(req)
try:
- 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 convert_tree_to_html
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function convert_tree_to_html( tree, references, options ) {
var i;
options = options || {};
// shallow clone
Function Orders
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Orders = () => {
let table = createRef();
// State
const [isSelected, setIsSelected] = useState(false);
const handleNextPage = ({ page, onPageChange }) => () => {
Function on_get
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 _uploadData
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function _uploadData(files, dataBlocks) {
var _this16 = this;
var xhr = new XMLHttpRequest(); // Put the xhr object in the file objects to be able to reference it later.
Function drawPie
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawPie() {
var startAngle = Math.PI * options.series.pie.startAngle;
var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
Function getOption
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getOption = (month, isDark) => {
const grays = getGrays(isDark);
return {
tooltip: {
trigger: 'axis',
Function getOption
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getOption = (month, isDark) => {
const grays = getGrays(isDark);
return {
tooltip: {
trigger: 'axis',
Function getOption
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getOption = (month, isDark) => {
const grays = getGrays(isDark);
return {
tooltip: {
trigger: 'axis',
Function getOption
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getOption = (month, isDark) => {
const grays = getGrays(isDark);
return {
tooltip: {
trigger: 'axis',
Function Customers
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Customers = () => {
let table = createRef();
// State
const [isSelected, setIsSelected] = useState(false);
const handleNextPage = ({ page, onPageChange }) => () => {
Function on_get
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
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)