Showing 5,781 of 10,536 total issues
Function Header
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Header(calendar, options) {
var t = this;
// exports
t.render = render;
Function SpinnersExample
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SpinnersExample = () => {
const { setNavbarStyle } = useContext(AppContext);
return (
<Fragment>
<PageHeader
Function processData
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function processData() {
var topSentry = Number.POSITIVE_INFINITY,
bottomSentry = Number.NEGATIVE_INFINITY,
fakeInfinity = Number.MAX_VALUE,
i, j, k, m, length,
Function link
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function(scope, element, attrs) {
var domElement = element[0],
$canvas = element.find('canvas'),
canvas = $canvas[0],
context = canvas2D ? canvas.getContext('2d') : null,
File moment-timezone.js
has 443 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
//! moment-timezone.js
//! version : 0.5.0
//! author : Tim Wood
//! license : MIT
//! github.com/moment/moment-timezone
Function init
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function init(plot) {
plot.hooks.processOptions.push(function (plot, options) {
$.each(plot.getAxes(), function(axisName, axis) {
var opts = axis.options;
Function renderCalendar
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderCalendar: function (calendar, selected, minDate, maxDate, side) {
var html = '<div class="calendar-date">';
html += '<table class="table-condensed">';
html += '<thead>';
Function on_get
has 164 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)
File highcharts-ng.js
has 439 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
if (typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports){
module.exports = 'highcharts-ng';
}
(function () {
Function init
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function init() {
var _this3 = this;
// In case it isn't set already
if (this.element.tagName === "form") {
File angular-route.js
has 435 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @license AngularJS v1.8.3
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
Function ProductAdd
has 161 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ProductAdd = () => {
const { products, productsDispatch } = useContext(ProductContext);
const [title, setTitle] = useState('');
const [category, setCategory] = useState('Camera');
const [files, setFiles] = useState([]);
Function on_get
has 161 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_get(req, resp):
# todo: change this procedure from space to store
if 'API-KEY' not in req.headers or \
not isinstance(req.headers['API-KEY'], str) or \
len(str.strip(req.headers['API-KEY'])) == 0:
Function on_get
has 161 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_get(req, resp):
# todo: change this procedure from space to shopfloor
if 'API-KEY' not in req.headers or \
not isinstance(req.headers['API-KEY'], str) or \
len(str.strip(req.headers['API-KEY'])) == 0:
Function on_get
has 161 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 161 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_get(req, resp):
# todo: change this procedure from space to tenant
if 'API-KEY' not in req.headers or \
not isinstance(req.headers['API-KEY'], str) or \
len(str.strip(req.headers['API-KEY'])) == 0:
Function MicrogridListItem
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
Open
const MicrogridListItem = ({
id,
uuid,
files,
name,
- 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 42 (exceeds 5 allowed). Consider refactoring. Open
Open
def on_get(req, resp):
"""Handles GET requests"""
access_control(req)
# Verify User Session
token = req.headers.get('TOKEN')
- 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 160 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)
File wechatmessage.py
has 431 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import re
from datetime import datetime, timedelta, timezone
import falcon
import mysql.connector
import simplejson as json