Showing 5,781 of 10,536 total issues
Function link
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function($scope, element, attrs, modelCtrl) {
var clear, customOpts, el, locale, opts, _formatted, _init, _picker, _setEndDate, _setStartDate, _validateMax, _validateMin;
el = $(element);
customOpts = $scope.opts;
opts = angular.extend({}, dateRangePickerConfig, customOpts);
Function drawSeriesLines
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
function drawSeriesLines(series) {
function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
var points = datapoints.points,
ps = datapoints.pointsize,
prevx = null, prevy = null;
File energystoragepowerstationreportingenergy.py
has 478 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 drawGrid
has 186 lines of code (exceeds 25 allowed). Consider refactoring. Open
function drawGrid() {
var i, axes, bw, bc;
ctx.save();
ctx.translate(plotOffset.left, plotOffset.top);
File combined_equipment_energy_input_item.py
has 472 lines of code (exceeds 250 allowed). Consider refactoring. Open
import random
import time
from datetime import datetime, timedelta
from decimal import Decimal
from multiprocessing import Pool
File bootstrap-colorpicker-module.js
has 470 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
angular.module('colorpicker.module', [])
.factory('Helper', function () {
return {
File equipmentincome.py
has 470 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 combined_equipment_energy_output_category.py
has 469 lines of code (exceeds 250 allowed). Consider refactoring. Open
import random
import time
from datetime import datetime, timedelta
from decimal import Decimal
from multiprocessing import Pool
File shopfloor_energy_input_item.py
has 469 lines of code (exceeds 250 allowed). Consider refactoring. Open
import random
import time
from datetime import datetime, timedelta
from decimal import Decimal
from multiprocessing import Pool
File combined_equipment_energy_input_category.py
has 469 lines of code (exceeds 250 allowed). Consider refactoring. Open
import random
import time
from datetime import datetime, timedelta
from decimal import Decimal
from multiprocessing import Pool
Function on_get
has a Cognitive Complexity of 47 (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_put
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
def on_put(req, resp, id_, bid):
"""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_get
has a Cognitive Complexity of 47 (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_get
has a Cognitive Complexity of 47 (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 resourceFactory
has 181 lines of code (exceeds 25 allowed). Consider refactoring. Open
function resourceFactory(url, paramDefaults, actions, options) {
var route = new Route(url, options);
actions = extend({}, provider.defaults.actions, actions);
Function Calendar
has 181 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Calendar = () => {
const calendarRef = useRef();
const [calendarApi, setCalendarApi] = useState({});
const [title, setTitle] = useState('');
const [currentFilter, setCurrentFilter] = useState('Month View');
File directives.js
has 468 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* INSPINIA - Responsive Admin Theme
*
* Main directives.js file
* Define directives for used plugin
Function justifiedGallery
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.justifiedGallery = function(options){
//TODO fare impostazione 'rel' che sostituisce tutti i link con il rel specificato
var settings = $.extend( {
File shopfloor_energy_input_category.py
has 466 lines of code (exceeds 250 allowed). Consider refactoring. Open
import random
import time
from datetime import datetime, timedelta
from decimal import Decimal
from multiprocessing import Pool
Function link
has 179 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function (scope, element, attrs) {
// We keep some chart-specific variables here as a closure
// instead of storing them on 'scope'.
// prevSeriesOptions is maintained by processSeries