Showing 376 of 566 total issues
Method Form_Load
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void Form_Load(object sender, EventArgs e)
{ // Load distribution & parameters names, and default values.
try
{
// Create and show splash screen:
Function make_result_pages
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_result_pages(
Function __init__
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(self,args=None):
opt = optparse.OptionParser(
usage="%prog [options] input")
opt.add_option( '--output',
help="output file" )
Method properties_tab_Deselecting
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void properties_tab_Deselecting(object sender, TabControlCancelEventArgs e)
{
try
{
if (e.TabPageIndex == 0)
Method QuantileTab_Enter
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void QuantileTab_Enter(object sender, EventArgs e)
{ // Evaluate critical values (quantiles) for pre-chosen risk level.
// and then, optionally, for other user-provided risk levels.
try
{
Function load_module
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def load_module(self, name, extra_path=None):
"""Load a Python module that should be useable from Jamfiles.
There are generally two types of modules Jamfiles might want to
use:
- 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 report
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def report(self):
print "error:", self.args[0]
if self.original_exception_:
print format(str(self.original_exception_), " ")
print
- 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 order
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def order (self, objects):
""" Given a list of objects, reorder them so that the constains specified
by 'add_pair' are satisfied.
The algorithm was adopted from an awk script by Nikita Youshchenko
- 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 path_order
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def path_order (x, y):
""" Helper for as_path, below. Orders properties with the implicit ones
first, and within the two sections in alphabetical order of feature
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 glob_tree
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def glob_tree(self, wildcards, excludes=None):
bad = 0
for p in wildcards:
if os.path.dirname(p):
bad = 1
- 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 update
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def update( self ):
def filter_xml( src, dest ):
class xmlgen( xml.sax.saxutils.XMLGenerator ):
def __init__( self, writer ):
- 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 find_tool
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def find_tool(name, additional_paths = [], path_last = False):
""" Attempts to find tool (binary) named 'name' in PATH and in
'additional-paths'. If found in path, returns 'name'. If
found in additional paths, returns full name. If the tool
is found in several directories, returns the first path found.
- 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 run
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def run (self, project, name, prop_set, sources):
sources.extend(prop_set.get('<library>'))
# Add <library-path> properties for all searched libraries
- 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 register_actual_name
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def register_actual_name (self, actual_name, virtual_target):
if self.actual_.has_key (actual_name):
cs1 = self.actual_ [actual_name].creating_subvariant ()
cs2 = virtual_target.creating_subvariant ()
cmt1 = cs1.main_target ()
- 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 generated_targets
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def generated_targets (self, sources, prop_set, project, name):
# sources to pass to inherited rule
sources2 = []
# sources which are libraries
- 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 diff
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def diff( source_dir_content, destination_dir_content ):
utils.log( "Finding updated files" )
result = ( [], [] ) # ( changed_files, obsolete_files )
for source_file in source_dir_content:
found = find_by_name( destination_dir_content, source_file.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
Method getList
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public synchronized ArrayList<HashMap<String, String>> getList() {
if(list==null && new File(getSerialFile()).exists()) {
try {
FileInputStream fis = new FileInputStream(getSerialFile());
ObjectInputStream is = new ObjectInputStream(fis);
Function __init__
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__ (self, properties = []):
raw_properties = []
for p in properties:
Function build
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def build(
Function split
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def split (properties):
""" Given a property-set of the form
v1/v2/...vN-1/<fN>vN/<fN+1>vN+1/...<fM>vM
Returns
- 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"