hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function what has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

def what(file, h=None):
    if h is None:
        if isinstance(file, basestring):
            f = open(file, 'rb')
            h = f.read(32)
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/imghdr.py - About 55 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 retrlines has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    def retrlines(self, cmd, callback = None):
        """Retrieve data in line mode.  A new port is created for you.

        Args:
          cmd: A RETR, LIST, NLST, or MLSD command.
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/ftplib.py - About 55 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 parse257 has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

def parse257(resp):
    '''Parse the '257' response for a MKD or PWD request.
    This is a response to a MKD or PWD request: a directory name.
    Returns the directoryname in the 257 reply.'''
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/ftplib.py - About 55 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 InsertSectionItemsIntoDatabase has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def InsertSectionItemsIntoDatabase(self, FileID, Filename, CurrentSection, SectionItemList, ArchList, ThirdList, IfDefList):
Severity: Major
Found in BaseTools/Source/Python/Common/DscClassObject.py - About 50 mins to fix

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

    def ValidFile3(AllFiles, File, Workspace='', EfiSource='', EdkSource='', Dir='.', OverrideDir=''):
    Severity: Major
    Found in BaseTools/Source/Python/Common/Misc.py - About 50 mins to fix

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

      def error(ToolName, ErrorCode, Message=None, File=None, Line=None, ExtraData=None, RaiseError=IsRaiseError):
      Severity: Major
      Found in BaseTools/Source/Python/Common/EdkLogger.py - About 50 mins to fix

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

        def GenBinaryData(BinaryData, BinaryObj, BinariesDict, AsBuildIns, BinaryFileObjectList, SupArchList, BinaryModule):
        Severity: Major
        Found in BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py - About 50 mins to fix

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

          def Error(ToolName, ErrorCode, Message=None, File=None, Line=None, \
          Severity: Major
          Found in BaseTools/Source/Python/UPT/Logger/Log.py - About 50 mins to fix

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

                def ObjectFactory(self, ItemType, TSCName, CName, DValue, FFE, Usage, Str):
            Severity: Major
            Found in BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py - About 50 mins to fix

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

              def GetPackageList(DistPkg, Dep, WorkspaceDir, Options, ContentZipFile, ModuleList, PackageList):
              Severity: Major
              Found in BaseTools/Source/Python/UPT/InstallPkg.py - About 50 mins to fix

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

                def ParseDefine(LineValue, StartLine, Table, FileID, SectionName, \
                Severity: Major
                Found in BaseTools/Source/Python/UPT/Library/Parsing.py - About 50 mins to fix

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

                      def AddToBuffer(self, Buffer, BaseAddress, BlockSizeList, ErasePolarity, ImageBinDict, vtfDict = None, MacroDict = {}):
                  Severity: Major
                  Found in BaseTools/Source/Python/GenFds/Region.py - About 50 mins to fix

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

                        def GenerateFfs(Output, Input, Type, Guid, Fixed=False, CheckSum=False, Align=None,
                    Severity: Major
                    Found in BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py - About 50 mins to fix

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

                          def GenerateOptionRom(Output, EfiInput, BinaryInput, Compress=False, ClassCode=None,
                      Severity: Major
                      Found in BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py - About 50 mins to fix

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

                            def AddToBuffer (self, Buffer, BaseAddress=None, BlockSize= None, BlockNum=None, ErasePloarity='1', VtfDict=None, MacroDict = {}) :
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/Fv.py - About 50 mins to fix

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

                              def __new__(Class, Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs):
                          Severity: Major
                          Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 50 mins to fix

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

                                def AddStringToList(self, Name, Language, Value, Token = None, Referenced = False, UseOtherLangDef = '', Index = -1):
                            Severity: Major
                            Found in BaseTools/Source/Python/AutoGen/UniClassObject.py - About 50 mins to fix

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

                                  def docother(self, object, name=None, mod=None, parent=None, maxlen=None, doc=None):
                              Severity: Major
                              Found in AppPkg/Applications/Python/PyMod-2.7.2/Lib/pydoc.py - About 50 mins to fix

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

                                    def __init__(self, dir, name, topname, title, next, prev, up):
                                Severity: Major
                                Found in AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/texi2html.py - About 50 mins to fix

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

                                      def __init__(self, name, prefix = None,
                                  Severity: Major
                                  Found in AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenModule.py - About 50 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language