hackedteam/core-android-market

View on GitHub

Showing 376 of 566 total issues

Function get_absolute_tool_path has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def get_absolute_tool_path(command):
    """
        Given an invocation command,
        return the absolute path to the command. This works even if commnad
        has not path element and is present in PATH.
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/common.py - About 35 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 extra_usage_requirements has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def extra_usage_requirements (self, created_targets, prop_set):
        
        result = property_set.empty ()
        extra = []
                        
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/builtin.py - About 35 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 main_target_sources has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def main_target_sources (self, sources, main_target_name, no_renaming=0):
        """Return the list of sources to use, if main target rule is invoked
        with 'sources'. If there are any objects in 'sources', they are treated
        as main target instances, and the name of such targets are adjusted to
        be '<name_of_this_target>__<name_of_source_target>'. Such renaming
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/targets.py - About 35 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 _translateChildren has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def _translateChildren( self, parent, **kwargs ):
        target = kwargs['target']
        for n in parent.childNodes:
            child = self._translateNode(n,target=target)
            if child:
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/doxproc.py - About 35 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 _createNode has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def _createNode( self, tag, **kwargs ):
        result = self.boostbook.createElement(tag)
        for k in kwargs.keys():
            if kwargs[k] != '':
                if k == 'id':
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/doxproc.py - About 35 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 builds has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def builds(metatarget_reference, project, ps, what):
    # Attempt to build a metatarget named by 'metatarget-reference'
    # in context of 'project' with properties 'ps'.
    # Returns non-empty value if build is OK.

Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/configure.py - About 35 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 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def set_library_order (manager, sources, prop_set, result):
    used_libraries = []
    deps = prop_set.dependency ()

    sources.extend(d.value() for d in deps)
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/unix.py - About 35 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 grist has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def grist (self):
        """Helper to 'actual_name', above. Compute unique prefix used to distinguish
            this target from other targets with the same name which create different
            file.
        """
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/virtual_target.py - About 35 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 composeEmail has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def composeEmail(self, report):
        """
        Composes an e-mail to this platform maintainer if one or more of
        the platforms s/he maintains has a large number of failures.
        Returns the e-mail text if a message needs to be sent, or None

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

    def get_tarball( self, *args ):
        if not args or args == []:
            args = [ 'download', 'unpack' ]

        tarball_path = None
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/regression/src/regression.py - About 35 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 command_get_tools has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def command_get_tools(self):
        #~ Get Boost.Build v2...
        self.log( 'Getting Boost.Build v2...' )
        if self.user and self.user != '':
            os.chdir( os.path.dirname(self.tools_bb_root) )
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/regression/src/regression.py - About 35 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 copy_comments has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def copy_comments( results_xml, comment_file ):
    results_xml.startElement( 'comment', {} )

    if os.path.exists( comment_file ):
        utils.log( 'Reading comments file "%s"...' % comment_file )

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

Avoid too many return statements within this function.
Open

    return True
Severity: Major
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/feature.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return 0
    Severity: Major
    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/property.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return True
      Severity: Major
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/feature.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return 1
        Severity: Major
        Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/property.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return best
          Severity: Major
          Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/targets.py - About 30 mins to fix

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

            def refine_from_user_input(parent_requirements, specification, jamfile_module,
                                       location):
                """Refines requirements with requirements provided by the user.
                Specially handles "-<property>value" syntax in specification
                 to remove given requirements.
            Severity: Minor
            Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/property_set.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

            Severity
            Category
            Status
            Source
            Language