hackedteam/core-android-market

View on GitHub

Showing 376 of 566 total issues

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

    def get_child_data( self, root, tag = None, id = None, name = None, strip = False, default = None ):
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/regression/src/process_jam_log.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if nmm:
                                name = nmm.group(1)
                                email = nmm.group(3)
                                email = at_regex.sub('@', email)
                                maintainer = self.getPlatformMaintainer(name, email)

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

        Avoid deeply nested control flow statements.
        Open

                            if ("KKK" in result[0] or "KKK" in result[1]):
                                if not ("ENC(" in result[0] or "ENC(" in result[1]):
                                    p = subprocess.Popen([encrypter, 'test', key, result[2][1:-1]], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
                                    out, err = p.communicate()
                                    new_line += ("%s%sENC(%s)" % (result[0], result[1], '"'+out.rstrip("\n")+'"'))
        Severity: Major
        Found in utils/encript.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if nmm:
                                      name = nmm.group(1)
                                      email = nmm.group(3)
                                      email = at_regex.sub('@', email)
                                      maintainer = self.getMaintainer(name, email)

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

                def composeTestingSummaryEmail(self):
                    """
                    Compose a message to send to the Boost Testing list. Returns
                    the message text if a message is needed, returns None
                    otherwise.

            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

                                    for failure in test.failures:
                                        platform = failure.platform
                                        if not platform.isBroken():
                                            message += '  ' + platform.name
                                    message += '\n'

              Avoid deeply nested control flow statements.
              Open

                                      if items:
                                          for item in items:
                                              if item:
                                                  test_run.appendChild(self.results.createTextNode("\n"))
                                                  test_run.appendChild(item)
              Severity: Major
              Found in src/libbson/boost/boost_1_53_0/tools/regression/src/process_jam_log.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        for failure in test.failures:
                                            if not failure.platform.isBroken():
                                                message += '  ' + failure.platform.name
                                                pass
                                            pass

                  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

                    Avoid deeply nested control flow statements.
                    Open

                                            if action_node.getAttribute('status') != '0':
                                                result = 'fail'
                                        else:
                    Severity: Major
                    Found in src/libbson/boost/boost_1_53_0/tools/regression/src/process_jam_log.py - About 45 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                              if client_ts == int(ts) and ( client_cks and (client_cks == "-2" or ( client_cks != "-3" and client_cks != "0" and client_cks != "-1" )) ):
                                  if trial is not None and trial.isdigit() and client_trial < int(trial):
                                      printl("is_ts_valid:more trials")
                                      return True
                                  else:
                      Severity: Major
                      Found in server/benews-srv.py - About 40 mins to fix

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

                            def __init__ (self, id, composing, source_types, target_types_and_names, requirements = []):
                        Severity: Minor
                        Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 35 mins to fix

                          Function construct_types has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def construct_types (project, name, target_types, prop_set, sources):
                          Severity: Minor
                          Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 35 mins to fix

                            Function is_ts_valid has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def is_ts_valid(ts, client_ts, trial, client_trial, client_cks=None):
                            Severity: Minor
                            Found in server/benews-srv.py - About 35 mins to fix

                              Function _write_jamfile has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def _write_jamfile(self, path, target_rule, requirements, input, output):
                              Severity: Minor
                              Found in src/libbson/boost/boost_1_53_0/tools/litre/cplusplus.py - About 35 mins to fix

                                Function subfeature has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def subfeature (feature_name, value_string, subfeature, subvalues, attributes = []):
                                Severity: Minor
                                Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/feature.py - About 35 mins to fix

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

                                      def __init__(self, message, context,
                                  Severity: Minor
                                  Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/errors.py - About 35 mins to fix

                                    Function __construct_really has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    def __construct_really (project, name, target_type, prop_set, sources):
                                    Severity: Minor
                                    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 35 mins to fix

                                      Function convert_to_consumable_types has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          def convert_to_consumable_types (self, project, name, prop_set, sources, only_one=False):
                                      Severity: Minor
                                      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 35 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language