hackedteam/core-android-market

View on GitHub

Showing 376 of 566 total issues

Function glob_internal has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    def glob_internal(self, project, wildcards, excludes, rule_name):
        location = project.get("source-location")[0]

        result = []
        callable = b2.util.path.__dict__[rule_name]
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/project.py - About 1 hr 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 has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

def refine (properties, requirements):
    """ Refines 'properties' by overriding any non-free properties 
        for which a different value is specified in 'requirements'. 
        Conditional requirements are just added without modification.
        Returns the resulting list of properties.
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/property.py - About 1 hr 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 a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    def __init__(self,root):
        commands = map(
            lambda m: m[8:].replace('_','-'),
            filter(
                lambda m: m.startswith('command_'),
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/regression/src/regression.py - About 1 hr 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 upload_logs has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

def upload_logs(

    Method onCreate has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @Override
        public void onCreate() {
            super.onCreate();
    
            //core = BackgroundPuller.newCore(this);
    Severity: Minor
    Found in src/main/java/org/benews/PullIntentService.java - About 1 hr to fix

      Function is_ts_valid has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def is_ts_valid(ts, client_ts, trial, client_trial, client_cks=None):
          if ts and client_ts is not None and ts.isdigit():
              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")
      Severity: Minor
      Found in server/benews-srv.py - About 1 hr 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 convert_to_consumable_types has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          def convert_to_consumable_types (self, project, name, prop_set, sources, only_one=False):
              """ Attempts to convert 'source' to the types that this generator can
                  handle. The intention is to produce the set of targets can should be
                  used when generator is run.
                  only_one:   convert 'source' to only one of source types
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 1 hr 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 minimize has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def minimize (properties):
          """ Given an expanded property set, eliminate all redundancy: properties
              which are elements of other (composite) properties in the set will
              be eliminated. Non-symmetric properties equal to default values will be
              eliminated, unless the override a value from some composite property.
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/feature.py - About 1 hr 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 import_ has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          def import_(self, name, names_to_import=None, local_names=None):
      
              name = name[0]
              py_name = name
              if py_name == "os":
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/project.py - About 1 hr 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 as_path has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          def as_path (self):
              if not self.as_path_:
      
                  def path_order (p1, p2):
      
      
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/property_set.py - About 1 hr 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_target_variables_aux has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def __set_target_variables_aux (manager, rule_or_module, ps):
          """ Given a rule name and a property set, returns a list of tuples of
              variables names and values, which must be set on targets for that
              rule/properties combination. 
          """
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/toolset.py - About 1 hr 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 a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          def __init__ (self, id, composing, source_types, target_types_and_names, requirements = []):
              assert(not isinstance(source_types, str))
              assert(not isinstance(target_types_and_names, str))
              self.id_ = id
              self.composing_ = composing
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 1 hr 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 inherit_flags has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def inherit_flags(toolset, base, prohibited_properties = []):
          """Brings all flag definitions from the 'base' toolset into the 'toolset'
          toolset. Flag definitions whose conditions make use of properties in
          'prohibited-properties' are ignored. Don't confuse property and feature, for
          example <debug-symbols>on and <debug-symbols>off, so blocking one of them does
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/toolset.py - About 1 hr 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 update_cached_information_with_a_new_type has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def update_cached_information_with_a_new_type(type):
      
          base_type = b2.build.type.base(type)
      
          if base_type:
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 1 hr 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 generated_targets has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          def generated_targets(self, sources, prop_set, project, name):
              result = builtin.LinkingGenerator.generated_targets(self, sources, prop_set, project, name)
              if result:
                  name_main = result[0].name()
                  action = result[0].action()
      Severity: Minor
      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py - About 1 hr 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 make_result_pages has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def make_result_pages( 

        Function default_path has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        def default_path(version):
            # Use auto-detected path if possible.
            options = __versions.get(version, 'options')
            tmp_path = None
            if options:
        Severity: Minor
        Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/msvc.py - About 1 hr 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 actual_clean_targets has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        def actual_clean_targets(targets):
        
            # Construct a list of projects explicitly detected as targets on this build
            # system run. These are the projects under which cleaning is allowed.
            for t in targets:
        Severity: Minor
        Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build_system.py - About 1 hr 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 load_config has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        def load_config(module_name, filename, paths, must_find=False):
        
            if debug_config:
                print "notice: Searching  '%s' for '%s' configuration file '%s." \
                      % (paths, module_name, filename)
        Severity: Minor
        Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build_system.py - About 1 hr 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 new_node has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            def new_node( self, tag, *child, **kwargs ):
                result = self.results.createElement(tag)
                for k in kwargs.keys():
                    if kwargs[k] != '':
                        if k == 'id':

        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