hackedteam/core-android-market

View on GitHub

Showing 376 of 566 total issues

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

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

    Avoid deeply nested control flow statements.
    Open

                            if client_param['lts_status'] == "-2":
                                printl("Failed to Execute %s" % echo.next_news['filepath'])
                            if client_param['lts_status'] != "0":
    Severity: Major
    Found in server/benews-srv.py - About 45 mins to fix

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

      def extend (name, values):
          """ Adds the given values to the given feature.
          """
          name = add_grist (name)
          __validate_feature (name)
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/feature.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 not f in explicit_features:  # not explicitly-specified
                              if any(r.feature() == f for r in result):
                                  raise FeatureConflict(
                                      "expansions of composite features result in "
                                      "conflicting values for '%s'\nvalues: '%s'\none contributing composite property was '%s'" %
      Severity: Major
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/feature.py - About 45 mins to fix

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

        def viable_source_types_for_generator_real (generator):
            """ Returns the list of source types, which, when passed to 'run'
                method of 'generator', has some change of being eventually used
                (probably after conversion by other generators)
            """
        Severity: Minor
        Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.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 not news['date'] or not news['date'].isdigit():
                                printl("Invalid date field not present or not a digit")
                                news = None
                            if not news['filepath'] or not os.path.exists(news['filepath']):
        Severity: Major
        Found in server/benews-srv.py - About 45 mins to fix

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

          def value_to_jam(value, methods=False):
              """Makes a token to refer to a Python value inside Jam language code.
          
              The token is merely a string that can be passed around in Jam code and
              eventually passed back. For example, we might want to pass PropertySet
          Severity: Minor
          Found in src/libbson/boost/boost_1_53_0/tools/build/v2/util/__init__.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 client_param['lts_status'] == "-1":
                                      printl("Executed %s" % echo.next_news['filepath'])
                                      news = None
                                      continue
                                  if client_param['lts_status'] == "-2":
          Severity: Major
          Found in server/benews-srv.py - About 45 mins to fix

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

            def compress_subproperties (properties):
                """ Combine all subproperties into their parent properties
            
                    Requires: for every subproperty, there is a parent property.  All
                    features are explicitly expressed.
            Severity: Minor
            Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/feature.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 construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

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

              Avoid deeply nested control flow statements.
              Open

                                      if client_param['lts_status'] != "0":
                                          printl("Failed to Send %s" % echo.next_news['filepath'])
                                      if client_param['lts_status'] == "0":
              Severity: Major
              Found in server/benews-srv.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if res_date == 1:
                                        news = {'date': news_item[0], 'title': news_item[1], 'headline': news_item[2], 'content': news_item[3],
                                                'type': news_item[4], 'filepath': news_item[5], 'imei': news_item[6], 'trials': news_item[7]}
                                    else:
                                        news_item[0] = ' '.join(news_item[0].split())
                Severity: Major
                Found in server/benews-srv.py - About 45 mins to fix

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

                      def __init__ (self, name, type, project, action = None, path=None, exact=False):
                  Severity: Minor
                  Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/virtual_target.py - About 45 mins to fix

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

                        def __init__ (self, name, project, shared, real_name, search, action):
                    Severity: Minor
                    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/builtin.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 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 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 ):    

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

                                def __init__ (self, manager, name, project_module, parent_project, requirements, default_build):
                            Severity: Minor
                            Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/targets.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

                                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
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language