Showing 126 of 199 total issues
File problem.py
has 718 lines of code (exceeds 250 allowed). Consider refactoring. Open
import asyncio
import functools
import io
import os.path
import zipfile
Function default
has 203 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function (env = {}) {
function eslintLoader() {
return {
loader: 'eslint-loader',
options: {
File builtin.py
has 498 lines of code (exceeds 250 allowed). Consider refactoring. Open
import collections
import datetime
import functools
import itertools
File contest.py
has 491 lines of code (exceeds 250 allowed). Consider refactoring. Open
import asyncio
import collections
import datetime
import functools
import itertools
Function buildBodyData
has 179 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildBodyData() {
const now = moment();
const days = [];
{
// back fill
File base.py
has 424 lines of code (exceeds 250 allowed). Consider refactoring. Open
import accept
import asyncio
import calendar
import functools
import hmac
File homework.py
has 394 lines of code (exceeds 250 allowed). Consider refactoring. Open
import asyncio
import collections
import datetime
import io
import pytz
Function page
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
const page = new NamedPage('domain_manage_user', () => {
const addUserSelector = UserSelectAutoComplete.getOrConstruct($('.dialog__body--add-user [name="user"]'));
const addUserDialog = new ActionDialog({
$body: $('.dialog__body--add-user > div'),
onDispatch(action) {
File document.py
has 373 lines of code (exceeds 250 allowed). Consider refactoring. Open
import itertools
from bson import objectid
from pymongo import ReturnDocument
from vj4 import db
Function page
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
const page = new NamedPage('domain_manage_user', () => {
const addUserSelector = UserSelectAutoComplete.getOrConstruct($('.dialog__body--add-user [name="user"]'));
const addUserDialog = new ActionDialog({
$body: $('.dialog__body--add-user > div'),
onDispatch(action) {
- 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
File contest.py
has 345 lines of code (exceeds 250 allowed). Consider refactoring. Open
import asyncio
import calendar
import datetime
import io
import pytz
File index.js
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
import _ from 'lodash';
import moment from 'moment';
import tpl from 'vj/utils/tpl';
export default class Calendar {
Function invoke_by_args
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def invoke_by_args():
import argparse
import asyncio
import coloredlogs
import inspect
- 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
File discussion.py
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
import asyncio
import functools
from bson import objectid
from vj4 import app
Function main
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def main():
if not options.syslog:
coloredlogs.install(level=logging.DEBUG if options.debug else logging.INFO,
fmt='[%(levelname).1s %(asctime)s %(module)s:%(lineno)d] %(message)s',
datefmt='%y%m%d %H:%M:%S')
- 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
File domain.py
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
import asyncio
import collections
import datetime
import functools
Function layout
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
.map(banners => {
const dayBitmap = _
.fill(new Array(7), 1)
.map(() => []);
banners.forEach(banner => {
Function reducer
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function reducer(state = {}, action) {
switch (action.type) {
case 'DIALOGUES_LOAD_DIALOGUES_FULFILLED': {
const { messages, udict } = action.payload;
return _.keyBy(
Function buildCategoryFilter
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildCategoryFilter() {
const $container = $('[data-widget-cf-container]');
if (!$container) {
return;
}
Function constructor
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(options = {}) {
super({
autoDownloadFontAwesome: false,
spellChecker: false,
forceSync: true,