Showing 203 of 446 total issues
File rest_test.rb
has 926 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'net/http'
require 'json'
require 'benchmark'
require 'open-uri'
require 'pp'
File build.py
has 876 lines of code (exceeds 250 allowed). Consider refactoring. Open
import os
import shutil
from time import sleep
import time
import socket
Function dispatch_kind
has a Cognitive Complexity of 83 (exceeds 5 allowed). Consider refactoring. Open
def dispatch_kind(vm_name, kind, args, r_id=None, tries=0):
# PREPARE FILES
global status, test_id
- 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 master.py
has 629 lines of code (exceeds 250 allowed). Consider refactoring. Open
import argparse
import os
import time
import random
import os.path
File oldMaster.py
has 604 lines of code (exceeds 250 allowed). Consider refactoring. Open
import argparse
import os
import time
import random
import os.path
Function main
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
def main(argv):
devices = adb.get_attached_devices()
print """
!!! Test AntiVirus !!!
- 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 dispatch
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
def dispatch(self, procedure, pool=0 ):
global received
exit = False
command.context = {}
- 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 summary
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
def summary():
report = Report()
report.vm = {}
hostname = helper.get_hostname()
- 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 adbclient.py
has 450 lines of code (exceeds 250 allowed). Consider refactoring. Open
'''
Copyright (C) 2012-2013 Diego Torres Milano
Created on Dec 1, 2012
Licensed under the Apache License, Version 2.0 (the "License");
Function check
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
def check():
ret = True
called = set()
system = []
try:
- 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 check_upgraded
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
def check_upgraded(self, instance_id, level, fast = True):
logging.debug("check_upgraded")
if fast:
logging.debug("- Upgrade, Wait for 5 minutes: %s" % time.ctime())
- 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 execute
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def execute(vm, protocol, args):
""" server side """
from AVMaster import vm_manager
#logging.debug(" CS Execute")
- 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 rcs_client.py
has 377 lines of code (exceeds 250 allowed). Consider refactoring. Open
import urllib2
from urllib2 import HTTPError
import cookielib
import json
import traceback
Rcs_client
has 38 functions (exceeds 20 allowed). Consider refactoring. Open
class Rcs_client:
myid = "0"
def __init__(self, host, user="avtest", passwd="avtest"):
self.host = host
AdbClient
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
class AdbClient:
def __init__(self, serialno=None, hostname=HOSTNAME, port=PORT, settransport=True, reconnect=True):
self.serialno = serialno
self.hostname = hostname
Function check_static
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def check_static(files, report = None):
global report_send
if report:
report_send = report
- 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 dispatch_status
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def dispatch_status(vm, kind, server, test_id, r_id, res, status, message):
# print "DBG dispatch status %d (start)" % status
test_dir = "C:\\Users\\avtest\\Desktop\\AVTEST"
global log
- 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 rcs_client.py
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
import urllib2
from urllib2 import HTTPError
import cookielib
import json
import pprint
Function dispatch_kind
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def dispatch_kind(vm_name, kind, args, r_id=None, res=None, tries=0, status=0):
#global status, test_id
global test_id #, res
if res is None or status == 0:
res = "%s, %s, ERROR GENERAL" % (vm_name, kind)
- 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
VMachine
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class VMachine:
def __init__(self, name):
self.name = name
self.config = None