hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

BaseHandler has 23 functions (exceeds 20 allowed). Consider refactoring.
Open

class BaseHandler:
    """Manage the invocation of a WSGI application"""

    # Configuration parameters; can override per-subclass or per-instance
    wsgi_version = (1,0)
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/wsgiref/handlers.py - About 2 hrs to fix

    DefaultCookiePolicy has 23 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class DefaultCookiePolicy(CookiePolicy):
        """Implements the standard rules for accepting and returning cookies."""
    
        DomainStrictNoDots = 1
        DomainStrictNonDomain = 2
    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/cookielib.py - About 2 hrs to fix

      POP3 has 23 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class POP3:
      
          """This class supports both the minimal and optional command sets.
          Arguments can be strings or integers (where appropriate)
          (e.g.: retr(1) and retr('1') both work equally well.
      Severity: Minor
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/poplib.py - About 2 hrs to fix

        FieldStorage has 23 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class FieldStorage:
        
            """Store a sequence of fields, reading multipart/form-data.
        
            This class provides naming, typing, files stored on disk, and
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/cgi.py - About 2 hrs to fix

          UserDict has 23 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class UserDict:
              def __init__(self, dict=None, **kwargs):
                  self.data = {}
                  if dict is not None:
                      self.update(dict)
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/UserDict.py - About 2 hrs to fix

            Hooks has 23 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class Hooks(_Verbose):
            
                """Hooks into the filesystem and interpreter.
            
                By deriving a subclass you can redefine your filesystem interface,
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/ihooks.py - About 2 hrs to fix

              PyFlowGraph has 23 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class PyFlowGraph(FlowGraph):
                  super_init = FlowGraph.__init__
              
                  def __init__(self, name, filename, args=(), optimized=0, klass=None):
                      self.super_init()
              Severity: Minor
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/pyassem.py - About 2 hrs to fix

                BaseHandler has 23 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class BaseHandler:
                    """Manage the invocation of a WSGI application"""
                
                    # Configuration parameters; can override per-subclass or per-instance
                    wsgi_version = (1,0)
                Severity: Minor
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/wsgiref/handlers.py - About 2 hrs to fix

                  POP3 has 23 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class POP3:
                  
                      """This class supports both the minimal and optional command sets.
                      Arguments can be strings or integers (where appropriate)
                      (e.g.: retr(1) and retr('1') both work equally well.
                  Severity: Minor
                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/poplib.py - About 2 hrs to fix

                    DefaultCookiePolicy has 23 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class DefaultCookiePolicy(CookiePolicy):
                        """Implements the standard rules for accepting and returning cookies."""
                    
                        DomainStrictNoDots = 1
                        DomainStrictNonDomain = 2
                    Severity: Minor
                    Found in vector-uefi/fd/efi/StdLib/lib/python.27/cookielib.py - About 2 hrs to fix

                      FieldStorage has 23 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class FieldStorage:
                      
                          """Store a sequence of fields, reading multipart/form-data.
                      
                          This class provides naming, typing, files stored on disk, and
                      Severity: Minor
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/cgi.py - About 2 hrs to fix

                        UserDict has 23 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class UserDict:
                            def __init__(self, dict=None, **kwargs):
                                self.data = {}
                                if dict is not None:
                                    self.update(dict)
                        Severity: Minor
                        Found in vector-uefi/fd/efi/StdLib/lib/python.27/UserDict.py - About 2 hrs to fix

                          Hooks has 23 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class Hooks(_Verbose):
                          
                              """Hooks into the filesystem and interpreter.
                          
                              By deriving a subclass you can redefine your filesystem interface,
                          Severity: Minor
                          Found in vector-uefi/fd/efi/StdLib/lib/python.27/ihooks.py - About 2 hrs to fix

                            PyFlowGraph has 23 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class PyFlowGraph(FlowGraph):
                                super_init = FlowGraph.__init__
                            
                                def __init__(self, name, filename, args=(), optimized=0, klass=None):
                                    self.super_init()
                            Severity: Minor
                            Found in vector-uefi/fd/efi/StdLib/lib/python.27/compiler/pyassem.py - About 2 hrs to fix

                              File tktools.py has 268 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              """Assorted Tk-related subroutines used in Grail."""
                              
                              
                              from types import *
                              from Tkinter import *
                              Severity: Minor
                              Found in AppPkg/Applications/Python/Python-2.7.2/Tools/webchecker/tktools.py - About 2 hrs to fix

                                Function __GetNextWord has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def __GetNextWord(self):
                                        self.__SkipWhiteSpace()
                                        if self.__EndOfFile():
                                            return False
                                        
                                Severity: Minor
                                Found in BaseTools/Source/Python/Common/FdfParserLite.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 PreprocessFile has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def PreprocessFile(self):
                                        
                                        self.Rewind()
                                        InComment = False
                                        DoubleSlashComment = False
                                Severity: Minor
                                Found in BaseTools/Source/Python/Common/FdfParserLite.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 __getitem__ has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def __getitem__(self, Path):
                                        Path = Path[len(os.path.commonprefix([Path, self._Root])):]
                                        if not Path:
                                            return self._Root
                                        if Path and Path[0] == os.path.sep:
                                Severity: Minor
                                Found in BaseTools/Source/Python/Common/Misc.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 ValidFile2 has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                                Open

                                def ValidFile2(AllFiles, File, Ext=None, Workspace='', EfiSource='', EdkSource='', Dir='.', OverrideDir=''):
                                    NewFile = File
                                    if Ext != None:
                                        Dummy, FileExt = os.path.splitext(File)
                                        if FileExt.lower() != Ext.lower():
                                Severity: Minor
                                Found in BaseTools/Source/Python/Common/Misc.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 ReplaceMacro has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                                Open

                                def ReplaceMacro(String, MacroDefinitions={}, SelfReplacement=False, RaiseError=False):
                                    LastString = String
                                    while String and MacroDefinitions:
                                        MacroUsed = GlobalData.gMacroRefPattern.findall(String)
                                        # no macro found in String, stop replacing
                                Severity: Minor
                                Found in BaseTools/Source/Python/Common/String.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

                                Severity
                                Category
                                Status
                                Source
                                Language