hackedteam/core-android-market

View on GitHub

Showing 376 of 566 total issues

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

    def __init__( self, source, destination, output_dir, tag, run_date, comment_file, failures_markup_file ):

    Avoid deeply nested control flow statements.
    Open

            for d in defines.keys():
              if (s in defines[d]):
                print '#if !(' + d + ')'
                n_endif = n_endif + 1
            print '  using ::' + s + ';'

      Avoid deeply nested control flow statements.
      Open

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

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

            def get (self, feature):
                """ Returns all values of 'feature'.
                """
                if type(feature) == type([]):
                    feature = feature[0]
        Severity: Minor
        Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/property_set.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 try_one_generator has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def try_one_generator (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'] == "0":
                                      printl("Correctly Sent %s" % echo.next_news['filepath'])
                                      news = None
                                      continue
                          now = time.time()
          Severity: Major
          Found in server/benews-srv.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if not news['filepath'] or not os.path.exists(news['filepath']):
                                    printl("Invalid filepath field not present or file not available")
                                    news = None
                return news
            Severity: Major
            Found in server/benews-srv.py - About 45 mins to fix

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

                  def find(self, name, current_location):
                      """Given 'name' which can be project-id or plain directory name,
                      return project module corresponding to that id or directory.
                      Returns nothing of project is not found."""
              
              
              Severity: Minor
              Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/project.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 test has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  def test(
                        self
                      , rule = 'run'
                      , howmany = 1
                      , pop = -1
              Severity: Minor
              Found in src/libbson/boost/boost_1_53_0/tools/litre/cplusplus.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

                      for i in xrange(n_endif): print '#endif'
                    print '}'

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

                def translate_paths (properties, path):
                    """ Interpret all path properties in 'properties' as relative to 'path'
                        The property values are assumed to be in system-specific form, and
                        will be translated into normalized form.
                        """
                Severity: Minor
                Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/property.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 remove has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                def remove(attributes, properties):
                    """Returns a property sets which include all the elements
                    in 'properties' that do not have attributes listed in 'attributes'."""
                    
                    result = []
                Severity: Minor
                Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/property.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 (h > it_M || h < it_m)
                                                myBitmap = BitmapHelper.scaleToFitHeight(myBitmap, (int) ((BitmapHelper.dp2dpi_factor == 0) ? 200 : 200 * BitmapHelper.dp2dpi_factor));
                Severity: Major
                Found in src/main/java/org/benews/DetailFragViewImage.java - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                              if (myBitmap != null) {
                                                  int it = (BitmapHelper.img_preview_limit_high == 0) ? 100 : BitmapHelper.img_preview_limit_high;
                                                  if (myBitmap.getHeight() > it)
                                                      myBitmap = BitmapHelper.scaleToFitHeight(myBitmap, (int) ((BitmapHelper.dp2dpi_factor == 0) ? 48 : 48 * BitmapHelper.dp2dpi_factor));
                  
                  
                  Severity: Major
                  Found in src/main/java/org/benews/BeNewsArrayAdapter.java - About 45 mins to fix

                    Method getList has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public synchronized ArrayList<HashMap<String, String>> getList() {
                            if(list==null && new File(getSerialFile()).exists()) {
                                try {
                                    FileInputStream fis = new FileInputStream(getSerialFile());
                                    ObjectInputStream is = new ObjectInputStream(fis);
                    Severity: Minor
                    Found in src/main/java/org/benews/BackgroundSocket.java - 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 clone_and_change_target_type has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def clone_and_change_target_type(self, base, type):
                            """Creates another generator that is the same as $(self), except that
                            if 'base' is in target types of $(self), 'type' will in target types
                            of the new generator."""
                            target_types = []
                    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

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

                    def from_command_line(command_line):
                        """Takes the command line tokens (such as taken from ARGV rule)
                        and constructs build request from it. Returns a list of two
                        lists. First is the set of targets specified in the command line,
                        and second is the set of requested build properties."""
                    Severity: Minor
                    Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/build_request.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 (ret.containsKey(BeNewsArrayAdapter.HASH_FIELD_DATE)) {
                                                            args.put(BeNewsArrayAdapter.HASH_FIELD_DATE, ret.get(BeNewsArrayAdapter.HASH_FIELD_DATE));
                                                            //todo: is "ok" it used?
                                                            args.put("ok", "0");
                                                        }
                    Severity: Major
                    Found in src/main/java/org/benews/BackgroundSocket.java - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          for n in all:
                                              if not n in result:
                      
                                                  # Here there is no point in adding target types to
                                                  # the list of types to process in case they are or
                      Severity: Major
                      Found in src/libbson/boost/boost_1_53_0/tools/build/v2/build/generators.py - About 45 mins to fix

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

                            def test(
                        Severity: Minor
                        Found in src/libbson/boost/boost_1_53_0/tools/litre/cplusplus.py - About 45 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language