hackedteam/core-android-market

View on GitHub

Showing 376 of 566 total issues

Function collect_targets has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    def collect_targets(self, targets):
        
        s = [t.creating_subvariant() for t in targets]
        s = unique(s)
        
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/stage.py - About 45 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

Avoid deeply nested control flow statements.
Open

                    if global_setup:
                        setup_cpu = global_setup
                        # If needed we can easily add using configuration flags
                        # here for overriding which options get passed to the
                        # global setup command for which target platform:
Severity: Major
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py - About 45 mins to fix

    Function run_fail has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def run_fail(sources, args, input_files, requirements, target_name=None, default_build=[]):
    Severity: Minor
    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/testing.py - About 45 mins to fix

      Function create_subvariant has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def create_subvariant (self, root_targets, all_targets,
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/targets.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if match:
                                p0 = match[1]
                                break
                        if p0:
        Severity: Major
        Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/common.py - About 45 mins to fix

          Function _rewriteIDs has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def _rewriteIDs( self, node ):
                  if node.nodeName in ('link'):
                      if (self.idmap.has_key(node.getAttribute('linkend'))):
                          #~ A link, and we have someplace to repoint it at.
                          node.setAttribute('linkend',self.idmap[node.getAttribute('linkend')])
          Severity: Minor
          Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/doxproc.py - About 45 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

          Avoid deeply nested control flow statements.
          Open

                                  if n.getAttribute('kind') in ('class','struct'):
                                      classes.append(entry)
                                  entries.append(entry)
          Severity: Major
          Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/doxproc.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    for m in n.childNodes:
                                        if m.nodeName == 'member':
                                            cpp = self._cppName(self._getChildData('name',root=m))
                                            entry = {
                                                'name' : cpp['name'],
            Severity: Major
            Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/doxproc.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      for t in result:
                                          t.always()
              
              
              Severity: Major
              Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/targets.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        with _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\{}{}'.format(x, globals()[versionVarName])) as reg_key:
                                            vc_path = _winreg.QueryValueEx(reg_key, "ProductDir")[0]
                                    except:
                Severity: Major
                Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py - About 45 mins to fix

                  Function run has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def run(sources, args, input_files, requirements, target_name=None, default_build=[]):
                  Severity: Minor
                  Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/testing.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if p:
                                            assert(len(p) == 1)
                                            result += join_tag(ungrist(f), p)
                                else:
                    Severity: Major
                    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/common.py - About 45 mins to fix

                      Function process_boostbook_build_log has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def process_boostbook_build_log( path, timestamp ):
                          f = open( path + '.xml', 'w' )
                          g = xml.sax.saxutils.XMLGenerator( f )
                          lines = open( path ).read().splitlines()
                          output_lines = []

                      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 deeply nested control flow statements.
                      Open

                                              if p1 == p2:
                                                  result = t
                              
                      Severity: Major
                      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/virtual_target.py - About 45 mins to fix

                        Function cast has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def cast(name, type, sources, requirements, default_build, usage_requirements):
                        Severity: Minor
                        Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/cast.py - About 45 mins to fix

                          Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

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

                            Function run has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def run(self, project, name, prop_set, sources):
                            
                                    # The lib generator is composing, and can be only invoked with
                                    # explicit name. This check is present in generator.run (and so in
                                    # builtin.LinkingGenerator), but duplicate it here to avoid doing
                            Severity: Minor
                            Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/builtin.py - About 45 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

                            Avoid deeply nested control flow statements.
                            Open

                                                    if self.include_type(ty, included_types):
                                                        result.append(r)
                                                else:
                            Severity: Major
                            Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/stage.py - About 45 mins to fix

                              Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def __init__ (self, main_target, prop_set, sources, build_properties, sources_usage_requirements, created_targets):
                              Severity: Minor
                              Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/virtual_target.py - About 45 mins to fix

                                Function upload_to_ftp has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def upload_to_ftp(results_path, test_name, ftp_url, user, psw, debug_level):
                                Severity: Minor
                                Found in src/libbson/boost/boost_1_53_0/tools/regression/src/smoke.py - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language