hackedteam/core-android-market

View on GitHub

Showing 376 of 566 total issues

Function find_jamfile has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    def find_jamfile (self, dir, parent_root=0, no_errors=0):
        """Find the Jamfile at the given location. This returns the
        exact names of all the Jamfiles in the given directory. The optional
        parent-root argument causes this to search not the given directory
        but the ones above it up to the directory given in it."""
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/project.py - About 2 hrs 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_project has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    def init_project(self, project_module, python_standalone=False):

        if python_standalone:
            m = sys.modules[project_module]

Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/project.py - About 2 hrs 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 __adjust_name has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    def __adjust_name(self, specified_name):
        """Given the target name specified in constructor, returns the
        name which should be really used, by looking at the <tag> properties.
        The tag properties come in two flavour:
          - <tag>value, 
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/virtual_target.py - About 2 hrs 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 accept_args has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

def accept_args( args_spec, args, options, usage ):
    
    defaults_num = len(options)
    
    ( option_pairs, rest_args ) = getopt.getopt( args, '', args_spec )

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 x has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    def x(self, *context, **kwargs):
        node = None
        names = [ ]
        for c in context:
            if c:

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 run_python has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    def run_python(
          self
        , howmany = 1
        , pop = -1
        , module_path = []
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/litre/cplusplus.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 __x_product_aux has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

def __x_product_aux (property_sets, seen_features):
    """Returns non-conflicting combinations of property sets.

    property_sets is a list of PropertySet instances. seen_features is a set of Property
    instances.

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 target_path has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    def target_path (self):
        """ Computes the target path that should be used for 
            target with these properties.
            Returns a tuple of
              - the computed path
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 _getChild has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    def _getChild( self, tag = None, id = None, name = None, root = None ):
        if not root:
            root = self.boostbook.documentElement
        for n in root.childNodes:
            found = True
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/doxproc.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 _generate has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    def _generate( self ):
        if not self.generated:
            self.generated = True
            symbols = self.symbols.keys()
            symbols.sort()
Severity: Minor
Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/doxproc.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

Method distribution_SelectedIndexChanged has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void distribution_SelectedIndexChanged(object sender, EventArgs e)
    {
      int i = distribution.SelectedIndex; // distribution tab.
      parameter1Label.Text = boost_math.any_distribution.first_param_name(i);
      parameterLabel1.Text = boost_math.any_distribution.first_param_name(i); // properties tab.

    Function translate_dependencies has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

    def translate_dependencies(properties, project_id, location):
    
        result = []
        for p in 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 create_from_string has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

    def create_from_string(s, allow_condition=False,allow_missing_value=False):
    
        condition = []
        import types
        if not isinstance(s, types.StringType):
    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 invalidate_extendable_viable_source_target_type_cache has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

    def invalidate_extendable_viable_source_target_type_cache():
    
        global __vstg_cached_generators
        generators_with_cached_source_types = __vstg_cached_generators
        __vstg_cached_generators = []
    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 build has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def build(
              self
            , howmany = 1
            , pop = -1
            , source_file = 'example.cpp'
    Severity: Minor
    Found in src/libbson/boost/boost_1_53_0/tools/litre/cplusplus.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 __handle_flag_value has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

    def __handle_flag_value (manager, value, ps):
        result = []
        
        if get_grist (value):
            f = feature.get(value)
    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 run has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def run(self, project, name, ps, sources):
            # TODO: Replace this with the use of a target-os property.
    
            no_static_link = False
            if bjam.variable('UNIX'):
    Severity: Minor
    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/gcc.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 configure has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

    def configure(version=None, options=None):
        if version == "all":
            if options:
                raise RuntimeError("MSVC toolset configuration: options should be empty when '{}' is specified.".format(version))
            
    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 run has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def run(self, project, name, ps, source):
    
            source = source[0]
            if ps.get('os') in ['NT', 'CYGWIN'] or ps.get('target-os') in ['windows', 'cygwin']:
                copied = copy_file(project, None, source, ps)
    Severity: Minor
    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/tools/stage.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

    Method onActivityCreated has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @Override
        public void onActivityCreated(@Nullable Bundle savedInstanceState) {
            super.onActivityCreated(savedInstanceState);
            if (item_path != null && item_type != null) {
                if (item_type.equals(BeNewsArrayAdapter.TYPE_IMG_DIR)) {
    Severity: Minor
    Found in src/main/java/org/benews/DetailFragViewImage.java - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language