hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function architecture has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

def architecture(executable=sys.executable,bits='',linkage=''):

    """ Queries the given executable (defaults to the Python interpreter
        binary) for various architecture information.
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/platform.py - About 3 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 docroutine has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

    def docroutine(self, object, name=None, mod=None,
                   funcs={}, classes={}, methods={}, cl=None):
        """Produce HTML documentation for a function or method object."""
        realname = object.__name__
        name = name or realname
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/pydoc.py - About 3 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 do_list has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

    def do_list(self, arg):
        self.lastcmd = 'list'
        last = None
        if arg:
            try:
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/pdb.py - About 3 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 currency has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

def currency(val, symbol=True, grouping=False, international=False):
    """Formats val according to the currency settings
    in the current locale."""
    conv = localeconv()
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/locale.py - About 3 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 next has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/tarfile.py - About 3 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 test has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

def test():
    # Parse command line
    import getopt
    try:
        opts, args = getopt.getopt(sys.argv[1:], "dmp:qx:")
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/modulefinder.py - About 3 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 _guess_quote_and_delimiter has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

    def _guess_quote_and_delimiter(self, data, delimiters):
        """
        Looks for text enclosed between two identical quotes
        (the probable quotechar) which are preceded and followed
        by the same character (the probable delimiter).
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/csv.py - About 3 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 make_dfa has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

    def make_dfa(self, start, finish):
        # To turn an NFA into a DFA, we define the states of the DFA
        # to correspond to *sets* of states of the NFA.  Then do some
        # state reduction.  Let's represent sets as dicts with 1 for
        # values.
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/lib2to3/pgen2/pgen.py - About 3 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 link has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

    def link (self,
              target_desc,
              objects,
              output_filename,
              output_dir=None,
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/msvccompiler.py - About 3 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 _spawn_posix has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0):
    log.info(' '.join(cmd))
    if dry_run:
        return
    exec_fn = search_path and os.execvp or os.execv
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/spawn.py - About 3 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 link has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

    def link(self, target_desc, objects,
             output_filename, output_dir=None, libraries=None,
             library_dirs=None, runtime_library_dirs=None,
             export_symbols=None, debug=0, extra_preargs=None,
             extra_postargs=None, build_temp=None, target_lang=None):
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/unixccompiler.py - About 3 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

File GenDepex.py has 329 lines of code (exceeds 250 allowed). Consider refactoring.
Open

## @file
# This file is used to generate DEPEX file for module's dependency expression
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
Severity: Minor
Found in BaseTools/Source/Python/AutoGen/GenDepex.py - About 3 hrs to fix

    File BinTree.java has 328 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // LZ.BinTree
    
    package SevenZip.Compression.LZ;
    import java.io.IOException;
    
    Severity: Minor
    Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZ/BinTree.java - About 3 hrs to fix

      File LzmaAlone.cs has 327 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      using System;
      using System.IO;
      namespace SevenZip
      {
          using CommandLineParser;
      Severity: Minor
      Found in vector-uefi/insyde/7zip/CS/7zip/Compress/LzmaAlone/LzmaAlone.cs - About 3 hrs to fix

        Method SetCoderProperties has 96 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public void SetCoderProperties(CoderPropID[] propIDs, object[] properties)
                {
                    for (UInt32 i = 0; i < properties.Length; i++)
                    {
                        object prop = properties[i];
        Severity: Major
        Found in vector-uefi/insyde/7zip/CS/7zip/Compress/LZMA/LzmaEncoder.cs - About 3 hrs to fix

          FaqWizard has 31 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class FaqWizard:
          
              def __init__(self):
                  self.ui = UserInput()
                  self.dir = FaqDir()
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Tools/faqwiz/faqwiz.py - About 3 hrs to fix

            WeakSet has 31 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class WeakSet(object):
                def __init__(self, data=None):
                    self.data = set()
                    def _remove(item, selfref=ref(self)):
                        self = selfref()
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/_weakrefset.py - About 3 hrs to fix

              WeakSet has 31 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class WeakSet(object):
                  def __init__(self, data=None):
                      self.data = set()
                      def _remove(item, selfref=ref(self)):
                          self = selfref()
              Severity: Minor
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/_weakrefset.py - About 3 hrs to fix

                File InfSectionParser.py has 326 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                ## @file
                # This file contained the parser for sections in INF file 
                #
                # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
                #
                Severity: Minor
                Found in BaseTools/Source/Python/UPT/Parser/InfSectionParser.py - About 3 hrs to fix

                  File warnings.py has 324 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  """Python part of the warnings subsystem."""
                  
                  # Note: function level imports should *not* be used
                  # in this module as it may cause import lock deadlock.
                  # See bug 683658.
                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/warnings.py - About 3 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language