Showing 5,781 of 10,536 total issues
Function deps
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ($ocLazyLoad) {
return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'toaster']).then(
function () {
return $ocLazyLoad.load([{
files: ['js/plugins/footable/footable.all.min.js', 'css/plugins/footable/footable.core.css']
Function icheck
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function icheck($timeout) {
return {
restrict: 'A',
require: 'ngModel',
link: function($scope, element, $attrs, ngModel) {
Function Login
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Login = () => {
return (
<AuthCardLayout
leftSideContent={
<Fragment>
Function deps
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ($ocLazyLoad) {
return $ocLazyLoad.load(['ui.select', 'toaster', 'integralui']).then(
function () {
return $ocLazyLoad.load([{
files: [
Function ImageLightbox
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ImageLightbox = () => {
const images = [img1, img2, img3, img4];
return (
<Fragment>
Function batchDelete
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const batchDelete = () => {
let rows = table.current.selectionContext.selected;
if (rows.length <= 0) {
toast.error(t('Select Row'));
return;
Function NavbarStandard
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const NavbarStandard = () => {
const [navbarCollapsed, setNavbarCollapsed] = useState(true);
useEffect(() => {
window.addEventListener('scroll', handleNavbarTransparency);
Function batchRead
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const batchRead = () => {
let rows = table.current.selectionContext.selected;
if (rows.length <= 0) {
toast.error(t('Select Row'));
return;
Function on_get
has 28 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_put
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def on_put(req, resp, id_):
"""Handles PUT requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
Function on_post
has 28 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')
Function on_put
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def on_put(req, resp, id_):
"""Handles PUT requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
Function chart
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
angles.chart = function (type) {
return {
restrict: "A",
scope: {
data: "=",
- 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 render
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
jvm.Legend.prototype.render = function(){
var ticks = this.series.scale.getTicks(),
i,
inner = jvm.$('<div/>').addClass('jvectormap-legend-inner'),
tick,
- 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 applyAttr
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
jvm.SVGImageElement.prototype.applyAttr = function(attr, value){
var that = this;
if (attr == 'image') {
jvm.whenImageLoaded(value).then(function(img){
- 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 UserForm
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const UserForm = () => {
const { isRTL } = useContext(AppContext);
const { user, setUser, step, setStep } = useContext(AuthWizardContext);
const { register, handleSubmit, errors, watch } = useForm();
- 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 Message
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const Message = ({ message, senderUserId, status, time, isGroup }) => {
const { users } = useContext(ChatContext);
const user = users.find(({ id }) => id === senderUserId);
const name = user?.name.split(' ')[0];
const isLeft = senderUserId !== 3;
- 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 SentForgotPasswordEmailMessageForm
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const SentForgotPasswordEmailMessageForm = ({ setRedirect, setRedirectUrl, hasLabel, layout, t }) => {
// State
const [email, setEmail] = useState(getItemFromStore('email', ''));
const [code, setCode] = useState('');
const [isdisabled, setIsDisabled] = useState(false);
- 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 ProductList
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const ProductList = ({
id,
files,
title,
category,
- 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 SentRegisterEmailMessageForm
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const SentRegisterEmailMessageForm = ({ setRedirect, setRedirectUrl, hasLabel, layout, t }) => {
// State
const [email, setEmail] = useState('');
const [code, setCode] = useState('');
const [isdisabled, setIsDisabled] = useState(false);
- 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"