hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function link_shared_lib has 12 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def link_shared_lib(self, objects, output_libname, output_dir=None,
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/ccompiler.py - About 1 hr to fix

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

        def __init__(self,
    Severity: Major
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/argparse.py - About 1 hr to fix

      Function testfile has 12 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def testfile(filename, module_relative=True, name=None, package=None,
      Severity: Major
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/doctest.py - About 1 hr to fix

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

        Severity: Major
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/tarfile.py - About 1 hr to fix

          Function dump has 12 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def dump(obj, fp, skipkeys=False, ensure_ascii=True, check_circular=True,
          Severity: Major
          Found in vector-uefi/fd/efi/StdLib/lib/python.27/json/__init__.py - About 1 hr to fix

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

                def __init__(self,
            Severity: Major
            Found in vector-uefi/fd/efi/StdLib/lib/python.27/cookielib.py - About 1 hr to fix

              Function link_shared_object has 12 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def link_shared_object(self, objects, output_filename, output_dir=None,
              Severity: Major
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/ccompiler.py - About 1 hr to fix

                Function link_shared_lib has 12 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def link_shared_lib(self, objects, output_libname, output_dir=None,
                Severity: Major
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/ccompiler.py - About 1 hr to fix

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

                      def __init__(self,
                  Severity: Major
                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/argparse.py - About 1 hr to fix

                    Function CreateAsBuiltInf has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def CreateAsBuiltInf(self):
                            if self.IsAsBuiltInfCreated:
                                return
                                
                            # Skip the following code for EDK I inf
                    Severity: Minor
                    Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 1 hr to fix

                      Method Encode has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                              public void Encode(SevenZip.Compression.RangeCoder.Encoder rangeEncoder, int symbol, int posState) throws IOException
                              {
                                  if (symbol < Base.kNumLowLenSymbols)
                                  {
                                      rangeEncoder.Encode(_choice, 0, 0);
                      Severity: Minor
                      Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZMA/Encoder.java - 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 ParseSwitch has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                              boolean ParseSwitch(String s)
                              {
                                  if (s.startsWith("d"))
                                  {
                                      DictionarySize = 1 << Integer.parseInt(s.substring(1));
                      Severity: Minor
                      Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - 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 InsertConditionalStatement has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def InsertConditionalStatement(self, Filename, FileID, BelongsToItem, IfDefList, EndLine, ArchList):
                              (Value1, Value2, Value3, Model, StartColumn, EndColumn, Enabled) = ('', '', '', -1, -1, -1, 0)
                              if IfDefList == []:
                                  ErrorMsg = 'Not suited conditional statement in file %s' % Filename
                                  EdkLogger.error("DSC File Parser", PARSER_ERROR, ErrorMsg, Filename, RaiseError=EdkLogger.IsRaiseError)
                      Severity: Minor
                      Found in BaseTools/Source/Python/Common/DscClassObject.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 __GetStringData has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def __GetStringData(self):
                              if self.__Token.startswith("\"") or self.__Token.startswith("L\""):
                                  self.__UndoToken()
                                  self.__SkipToToken("\"")
                                  currentLineNumber = self.CurrentLineNumber
                      Severity: Minor
                      Found in BaseTools/Source/Python/Common/FdfParserLite.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 __GetTokenStatements has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def __GetTokenStatements(self, Obj):
                              if not self.__IsKeyword( "BaseAddress"):
                                  raise Warning("BaseAddress missing At Line ", self.FileName, self.CurrentLineNumber)
                                 
                              if not self.__IsToken( "="):
                      Severity: Minor
                      Found in BaseTools/Source/Python/Common/FdfParserLite.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 __GetReferencedFdFvTupleFromSection has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def __GetReferencedFdFvTupleFromSection(self, FfsFile, FdList = [], FvList = []):
                              
                              SectionStack = []
                              SectionStack.extend(FfsFile.SectionList)
                              while SectionStack != []:
                      Severity: Minor
                      Found in BaseTools/Source/Python/Common/FdfParserLite.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 GenBuildOptions has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def GenBuildOptions(self, ContainerFile):
                              EdkLogger.debug(2, "Generate %s ..." % TAB_BUILD_OPTIONS)
                              BuildOptions = {}
                              #
                              # Get all BuildOptions
                      Severity: Minor
                      Found in BaseTools/Source/Python/Common/InfClassObject.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 UpdateLibraryClassOfModule has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def UpdateLibraryClassOfModule(self, InfFileName, LibraryClass, Arch, InstanceFilePath):
                              #
                              # Update the library instance itself to add this libraryclass name
                              #
                              LibraryModule = self.InfDatabase[InstanceFilePath].Module
                      Severity: Minor
                      Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.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 Add has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def Add(self, Vpd, Offset):
                              if (Vpd == None):
                                  EdkLogger.error("VpdInfoFile", BuildToolError.ATTRIBUTE_UNKNOWN_ERROR, "Invalid VPD PCD entry.")
                              
                              if not (Offset >= 0 or Offset == "*"):
                      Severity: Minor
                      Found in BaseTools/Source/Python/Common/VpdInfoFile.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 _GetOperator has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def _GetOperator(self):
                              self.__SkipWS()
                              LegalOpLst = ['&&', '||', '!=', '==', '>=', '<='] + self.NonLetterOpLst
                      
                              self._Token = ''
                      Severity: Minor
                      Found in BaseTools/Source/Python/Common/Expression.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

                      Severity
                      Category
                      Status
                      Source
                      Language