hackedteam/core-android-market

View on GitHub

Showing 376 of 566 total issues

Function compose has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def compose (composite_property_s, component_properties_s):
    """ Sets the components of the given composite property.

    All paremeters are <feature>value strings
    """
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/feature.py - About 25 mins to fix

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 _pop_option has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def _pop_option(prefix):
    found = None
    for opt in sys.argv:
        if opt.startswith(prefix):
            sys.argv = [ x for x in sys.argv if x != opt ]
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/litre/tool.py - About 25 mins to fix

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_replace has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def find_replace(self, properties, value=None):
        matches = []
        match_ranks = []
        
        for i in range(0, len(self.__properties)):
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/property.py - About 25 mins to fix

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 __validate_feature_attributes has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def __validate_feature_attributes (name, attributes):
    for attribute in attributes:
        if not attribute in __all_attributes:
            raise InvalidAttribute ("unknown attributes: '%s' in feature declaration: '%s'" % (str (b2.util.set.difference (attributes, __all_attributes)), name))
    
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/feature.py - About 25 mins to fix

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 set_target_variables has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def set_target_variables (manager, rule_or_module, targets, ps):
    """
    """
    settings = __set_target_variables_aux(manager, rule_or_module, ps)
        
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/toolset.py - About 25 mins to fix

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 try_one_generator_really has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def try_one_generator_really (project, name, generator, target_type, properties, sources):
    """ Returns usage requirements + list of created targets.
    """
    targets = generator.run (project, name, properties, sources)

Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 25 mins to fix

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 validate_date has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def validate_date(date_text):
    tokens=date_text.split(" ")
    if len(tokens) == 2:
        try:
            datetime.datetime.strptime(tokens[0], '%d-%m-%Y')
Severity: Minor
Found in server/benews-srv.py - About 25 mins to fix

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 quote_line has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def quote_line(line):

    result = ""

    for i in line:

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 try_one_generator has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def try_one_generator (project, name, generator, target_type, properties, sources):
    """ Checks if generator invocation can be pruned, because it's guaranteed
        to fail. If so, quickly returns empty list. Otherwise, calls
        try_one_generator_really.
    """
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 25 mins to fix

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 construct has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def construct (project, name, target_type, prop_set, sources, top_level=False):
    """ Attempts to create target of 'target-type' with 'properties'
        from 'sources'. The 'sources' are treated as a collection of
        *possible* ingridients -- i.e. it is not required to consume
        them all. If 'multiple' is true, the rule is allowed to return
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 25 mins to fix

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 newInstance has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static DetailFragView newInstance(HashMap<String,String> news) {
        Bundle args = new Bundle();
        for(String k:news.keySet()) {
            args.putCharArray(k,news.get(k).toCharArray());
        }
Severity: Minor
Found in src/main/java/org/benews/DetailFragView.java - About 25 mins to fix

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 is_imei_valid has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def is_imei_valid(imei, client_imei):
    if imei and client_imei:
        if imei == client_imei:
            return True
        else:
Severity: Minor
Found in server/benews-srv.py - About 25 mins to fix

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 add_grist has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def add_grist (features):
    """ Transform a string by bracketing it with "<>". If already bracketed, does nothing.
        features: one string or a sequence of strings
        return: the gristed string, if features is a string, or a sequence of gristed strings, if features is a sequence
    """
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/util/utility.py - About 25 mins to fix

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 consume_directly has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def consume_directly (self, source):
        real_source_type = source.type ()

        # If there are no source types, we can consume anything
        source_types = self.source_types()
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 25 mins to fix

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 init_link_flags has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def init_link_flags(toolset, linker, condition):
    """
        Now, the vendor specific flags.
        The parameter linker can be either gnu, darwin, osf, hpux or sun.
    """
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/gcc.py - About 25 mins to fix

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 print_component_configuration has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def print_component_configuration():

    print "\nComponent configuration:"
    for c in __components:
        if c in __built_components:
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/configure.py - About 25 mins to fix

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 _translate_index_ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def _translate_index_(self, entries, target=None, **kwargs ):
        i = 0
        targetID = target.getAttribute('id')
        while i < len(entries):
            dividerKey = entries[i]['name'][0].upper()
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/doxproc.py - About 25 mins to fix

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 __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def __init__ (self, name, project, sources, requirements = None, default_build = None, usage_requirements = None):
        AbstractTarget.__init__ (self, name, project)
    
        for s in sources:
            if get_grist (s):
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/targets.py - About 25 mins to fix

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 set_library_order_aux has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def set_library_order_aux (from_libs, to_libs):
    for f in from_libs:
        for t in to_libs:
            if f != t:
                __order.add_pair (f, t)
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/unix.py - About 25 mins to fix

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_configuration has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def register_configuration(version, path=None):
    if path:
        command = os.path.join(path, 'cl.exe')
        if os.path.exists(command):
            if debug():
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py - About 25 mins to fix

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

Severity
Category
Status
Source
Language