hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function storbinary has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def storbinary(self, cmd, fp, blocksize=8192, callback=None, rest=None):
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/ftplib.py - About 35 mins to fix

    Function ftpcp has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def ftpcp(source, sourcename, target, targetname = '', type = 'I'):
    Severity: Minor
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/ftplib.py - About 35 mins to fix

      Method Code has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              public void Code(System.IO.Stream inStream, System.IO.Stream outStream,
                  Int64 inSize, Int64 outSize, ICodeProgress progress)
      Severity: Minor
      Found in vector-uefi/insyde/7zip/CS/7zip/Compress/LZMA/LzmaEncoder.cs - About 35 mins to fix

        Method Code has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                public void Code(System.IO.Stream inStream, System.IO.Stream outStream,
                    Int64 inSize, Int64 outSize, ICodeProgress progress)
        Severity: Minor
        Found in vector-uefi/insyde/7zip/CS/7zip/Compress/LZMA/LzmaDecoder.cs - About 35 mins to fix

          Function Patch has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def Patch(self, dropperfile, scoutfile, scoutname, soldiername, elitename):
          Severity: Minor
          Found in vector-uefi/uefi.py - About 35 mins to fix

            Method PrintResults has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                        UInt32 dictionarySize,
                        UInt64 elapsedTime,
                        UInt64 size,
                        bool decompressMode, UInt64 secondSize)
            Severity: Minor
            Found in vector-uefi/insyde/7zip/CS/7zip/Compress/LzmaAlone/LzmaBench.cs - About 35 mins to fix

              Method ReverseEncode has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      public static void ReverseEncode(BitEncoder[] Models, UInt32 startIndex,
                          Encoder rangeEncoder, int NumBitLevels, UInt32 symbol)
              Severity: Minor
              Found in vector-uefi/insyde/7zip/CS/7zip/Compress/RangeCoder/RangeCoderBitTree.cs - About 35 mins to fix

                Method Code has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        void Code(System.IO.Stream inStream, System.IO.Stream outStream,
                            Int64 inSize, Int64 outSize, ICodeProgress progress);
                Severity: Minor
                Found in vector-uefi/insyde/7zip/CS/7zip/ICoder.cs - About 35 mins to fix

                  Function MakeTheTestSuite has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def MakeTheTestSuite(localItems):
                      tests = []
                      for name, item in localItems.iteritems():
                          if isinstance(item, types.TypeType):
                              if issubclass(item, unittest.TestCase):
                  Severity: Minor
                  Found in BaseTools/Tests/TestTools.py - About 35 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 _PackUnicode has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _PackUnicode(self, UnicodeString, Size):
                          if (Size < 0):        
                              EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID, "Invalid parameter Size %s of PCD %s!(File: %s Line: %s)" %\
                                               (self.PcdBinSize, self.PcdCName, self.FileName, self.Lineno))
                          if (len(UnicodeString) < 3):
                  Severity: Minor
                  Found in BaseTools/Source/Python/BPDG/GenVpd.py - About 35 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

                  Method Create has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      void Create()
                      {
                          if (_matchFinder == null)
                          {
                              SevenZip.Compression.LZ.BinTree bt = new SevenZip.Compression.LZ.BinTree();
                  Severity: Minor
                  Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZMA/Encoder.java - About 35 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 ExpandMacros has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def ExpandMacros(self, Value):
                          EnvReference = gEnvRefPattern.findall(Value)
                          for Ref in EnvReference:
                              if Ref not in self.MacroDictionary:
                                  Value = Value.replace(Ref, "")
                  Severity: Minor
                  Found in BaseTools/Source/Python/Common/ToolDefClassObject.py - About 35 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

                  Method Init has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      void Init()
                      {
                          BaseInit();
                          _rangeEncoder.Init();
                  
                  Severity: Minor
                  Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZMA/Encoder.java - About 35 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

                  Method Create has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public boolean Create(int historySize, int keepAddBufferBefore,
                              int matchMaxLen, int keepAddBufferAfter)
                      {
                          if (historySize > kMaxValForNormalize - 256)
                              return false;
                  Severity: Minor
                  Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZ/BinTree.java - About 35 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 _PackBooleanValue has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _PackBooleanValue(self, ValueString):
                          if ValueString.upper() == "TRUE" or ValueString in ["1", "0x1", "0x01"]:
                              try:    
                                  self.PcdValue =  pack(_FORMAT_CHAR[1], 1)
                              except:
                  Severity: Minor
                  Found in BaseTools/Source/Python/BPDG/GenVpd.py - About 35 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

                  Method SetPrices has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public void SetPrices(int posState, int numSymbols, int[] prices, int st)
                          {
                              int a0 = SevenZip.Compression.RangeCoder.Encoder.GetPrice0(_choice[0]);
                              int a1 = SevenZip.Compression.RangeCoder.Encoder.GetPrice1(_choice[0]);
                              int b0 = a1 + SevenZip.Compression.RangeCoder.Encoder.GetPrice0(_choice[1]);
                  Severity: Minor
                  Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZMA/Encoder.java - About 35 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 __HexDigit has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def __HexDigit(self, TempChar):
                          if (TempChar >= 'a' and TempChar <= 'f') or (TempChar >= 'A' and TempChar <= 'F') \
                                  or (TempChar >= '0' and TempChar <= '9'):
                                      return True
                          else:
                  Severity: Minor
                  Found in BaseTools/Source/Python/Common/FdfParserLite.py - About 35 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 RemoveBlockComment has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def RemoveBlockComment(Lines):
                      IsFindBlockComment = False
                      IsFindBlockCode = False
                      ReservedLine = ''
                      NewLines = []
                  Severity: Minor
                  Found in BaseTools/Source/Python/Common/String.py - About 35 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 ParseFile has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def ParseFile(self):
                  
                          try:
                              self.__StringToList()
                              self.PreprocessFile()
                  Severity: Minor
                  Found in BaseTools/Source/Python/Common/FdfParserLite.py - About 35 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 CleanString2 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def CleanString2(Line, CommentCharacter=DataType.TAB_COMMENT_SPLIT, AllowCppStyleComment=False):
                      #
                      # remove whitespace
                      #
                      Line = Line.strip();
                  Severity: Minor
                  Found in BaseTools/Source/Python/Common/String.py - About 35 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

                  Severity
                  Category
                  Status
                  Source
                  Language