hackedteam/core-android-market

View on GitHub

Showing 376 of 566 total issues

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

    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

      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

        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 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 cpu_flags has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def cpu_flags(toolset, variable, architecture, instruction_set, values, default=None):
          Severity: Minor
          Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/gcc.py - About 45 mins to fix

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

            def create_typed_metatarget(name, type, sources, requirements, default_build, usage_requirements):
            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 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 __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 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

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

                  def install(name, package_name=None, requirements=[], binaries=[], libraries=[], headers=[]):
                  Severity: Minor
                  Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/package.py - About 45 mins to fix

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

                    def create_metatarget(klass, name, sources, requirements=[], default_build=[], usage_requirements=[]):
                    Severity: Minor
                    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/targets.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

                        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

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

                          def merge_xmls_task( source_dir, processed_dir, merged_dir, expected_results_file, failures_markup_file, tag ):    

                            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 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

                                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

                                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

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          if node.nodeType == xml.dom.Node.ELEMENT_NODE:
                                                              if node.firstChild:
                                                                  log_data = xml.sax.saxutils.escape(node.firstChild.data)
                                                              else:
                                                                  log_data = ''
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language