hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function make_archive has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
Severity: Major
Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/archive_util.py - About 1 hr to fix

    Function copy_file has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0,
    Severity: Major
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/file_util.py - About 1 hr to fix

      Function copy_tree has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def copy_tree(src, dst, preserve_mode=1, preserve_times=1,
      Severity: Major
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/dir_util.py - About 1 hr to fix

        Function compile has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

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

          Function byte_compile has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def byte_compile (py_files,
          Severity: Major
          Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/util.py - About 1 hr to fix

            Function compile has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

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

              Function compile has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

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

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

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

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

                      def __init__(self, decorators, name, argnames, defaults, flags, doc, code, lineno=None):
                  Severity: Major
                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/compiler/ast.py - About 1 hr to fix

                    Function _make_tarball has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
                    Severity: Major
                    Found in vector-uefi/fd/efi/StdLib/lib/python.27/shutil.py - About 1 hr to fix

                      Method GetPrice has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                                  public int GetPrice(boolean matchMode, byte matchByte, byte symbol)
                                  {
                                      int price = 0;
                                      int context = 1;
                                      int i = 7;
                      Severity: Minor
                      Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZMA/Encoder.java - 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 main has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def main():
                          global Options, Args
                          
                          # Initialize log system
                          EdkLogger.Initialize()          
                      Severity: Minor
                      Found in BaseTools/Source/Python/BPDG/BPDG.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 __GetEncapsulationSec has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def __GetEncapsulationSec(self, FfsFileObj):        
                              
                              OldPos = self.GetFileBufferPos()
                              if not self.__IsKeyword( "SECTION"):
                                  if len(FfsFileObj.SectionList) == 0:
                      Severity: Minor
                      Found in BaseTools/Source/Python/Common/FdfParserLite.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 RemoveDirectory has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def RemoveDirectory(Directory, Recursively=False):
                          if Directory == None or Directory.strip() == "" or not os.path.exists(Directory):
                              return
                          if Recursively:
                              CurrentDirectory = os.getcwd()
                      Severity: Minor
                      Found in BaseTools/Source/Python/Common/Misc.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 _GenBuildOptions has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def _GenBuildOptions(self):
                              Logger.Debug(2, "Generate %s ..." % DT.TAB_BUILD_OPTIONS)
                              #
                              # Get all BuildOptions
                              #
                      Severity: Minor
                      Found in BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.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 __init__ has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def __init__(self):
                              self.StartTime = time.time()
                              self.PrintRunTime = False
                              self.PrintRunStatus = False
                              self.RunStatus = ''
                      Severity: Minor
                      Found in BaseTools/Source/Python/Common/EdkIIWorkspace.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 GenDepexes has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

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

                          def Close(self):
                              if self.PrintRunTime:
                                  Seconds = int(time.time() - self.StartTime)
                                  if Seconds < 60:
                                      print 'Run Time: %d seconds' % (Seconds)
                      Severity: Minor
                      Found in BaseTools/Source/Python/Common/EdkIIWorkspace.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 _GenUserExtensions has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def _GenUserExtensions(self):
                              #
                              # UserExtensions
                              #
                              UserExtensionObj = self.Parser.InfUserExtensionSection.UserExtension
                      Severity: Minor
                      Found in BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.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 warn has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def warn(ToolName, Message, File=None, Line=None, ExtraData=None):
                          if _InfoLogger.level > WARN:
                              return
                      
                          # if no tool name given, use caller's source file name as tool name
                      Severity: Minor
                      Found in BaseTools/Source/Python/Common/EdkLogger.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

                      Severity
                      Category
                      Status
                      Source
                      Language