Showing 5,781 of 10,536 total issues
File TenantBill.js
has 607 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Fragment, useEffect, useState, useContext } from 'react';
import PropTypes from 'prop-types';
import {
Breadcrumb,
BreadcrumbItem,
Function link
has 264 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function (scope, element, attrs, ngModel) {
function prepareViews() {
scope.views = datePickerConfig.views.concat();
scope.view = attrs.view || datePickerConfig.view;
Function View
has 263 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function View(calendar) {
var t = this;
// exports
t.calendar = calendar;
Function $get
has 259 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.$get = ['$http', '$log', '$q', '$timeout', function($http, $log, $q, $timeout) {
var noop = angular.noop,
forEach = angular.forEach,
extend = angular.extend,
Function setOptions
has 258 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setOptions: function(options, callback) {
this.startDate = moment().startOf('day');
this.endDate = moment().endOf('day');
this.timeZone = moment().utcOffset();
File shopfloorstatistics.py
has 592 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
File sensor.py
has 592 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import uuid
from datetime import datetime, timedelta
import falcon
import mysql.connector
import simplejson as json
File spaceefficiency.py
has 590 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
File combinedequipmentstatistics.py
has 589 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
File spacestatistics.py
has 588 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
File tenantstatistics.py
has 588 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
File storestatistics.py
has 588 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
File metersaving.py
has 584 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
File meterplan.py
has 584 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
File jquery.knob.js
has 582 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!jQuery Knob*/
/**
* Downward compatible, touchable dial
*
* Version: 1.2.8
Function on_get
has a Cognitive Complexity of 63 (exceeds 5 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)
- 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 link
has 247 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function(b, f, m, a, t) {
var g = this,
e = f.children().eq(0),
h = f.children().eq(1);
b.$on("$destroy", function(a) {
File command.py
has 577 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import uuid
from datetime import datetime, timedelta
import falcon
import mysql.connector
import simplejson as json
File Forms.js
has 575 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Fragment } from 'react';
import { Button, Card, CardBody, Col, Row } from 'reactstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import FalconCardHeader from '../common/FalconCardHeader';
import FalconEditor from '../common/FalconEditor';
File combinedequipmentload.py
has 573 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector