Showing 203 of 446 total issues
Function main
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def main():
global logdir, status, test_id
# PARSING
- 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 main
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def main():
global logdir, status, test_id
# PARSING
- 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_scout
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def execute_scout(self):
""" build and execute the """
factory_id, ident, exe = self.execute_pull()
new_exe = "build\\scout.exe"
- 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 ez_setup.py
has 312 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!python
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
AgentBuild
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class AgentBuild:
def __init__(self, backend, frontend=None, platform='windows', kind='silent',
ftype='desktop', blacklist=[], soldierlist=[], param=None,
puppet="puppet", asset_dir="AVAgent/assets", factory=None):
self.kind = kind
Function normalize
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def normalize(data):
""" a command cane be unserialized in many ways:
- command instance
- dict: { command: payload }
- tuple/array: (cmd, success, payload) or (cmd, payload)
- 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 get_status
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def get_status(vm):
from AVMaster import vm_manager
# [19/12/13 11:09:23] Seppia: pid=1432, owner=WIN7-NOAV\avtest, cmd=vmtoolsd.exe
# pid=1776, owner=NT AUTHORITY\SYSTEM, cmd=vmtoolsd.exe
# pid=712, owner=NT AUTHORITY\SYSTEM, cmd=TrustedInstaller.exe
- 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 read
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def read(self, blocking=False, timeout=0):
""" reads a message from the underlining channel. This method can be blocking or it could timeout in a while
"""
ret = None
time_start = time.time()
- 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
Rcs_client
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class Rcs_client:
myid = "0";
def __init__(self, host, user, passwd):
VMRun
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class VMRun:
def __init__(self, config_file):
self.config = ConfigParser()
self.config.read(config_file)
Function _build_mail_body
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def _build_mail_body(self, url_dir):
hresults = []
hcolumns = ['name']
- 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_elite_fast
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def execute_elite_fast(self, instance_id = None, fast = True):
if not instance_id:
with connection() as c:
instance_id, target_id = get_instance(c)
- 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 build.py
has 285 lines of code (exceeds 250 allowed). Consider refactoring. Open
import os
import re
import time
import socket
import urllib2
VMRun
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class VMRun:
def __init__(self, config_file):
self.config = ConfigParser()
self.config.read(config_file)
Function execute
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def execute(vm, protocol, args):
""" server side """
from AVMaster import vm_manager
logging.debug(" CS PUSH: %s" % str(args))
- 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 test_device
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def test_device(device_id, dev, results):
# uninstall device
adb.uninstall(service, dev)
- 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-core.rb
has 263 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'net/http'
require 'json'
require 'open-uri'
require 'pp'
require 'cgi'
Function execute
has a Cognitive Complexity of 17 (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
Function parse_results
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def parse_results(filename):
success = []
errors = []
failed = []
- 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 adb.py
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/python
import sys
import subprocess
import json