hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function parse_config_h has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

def parse_config_h(fp, vars=None):
    """Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/sysconfig.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 _GenModuleHeader has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def _GenModuleHeader(self):
        Logger.Debug(2, "Generate ModuleHeader ...")
        #
        # Get all defines information form InfParser Object
        #
Severity: Minor
Found in BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py - About 1 hr to fix

    Function __init__ has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def __init__(self):
            # Version and Copyright
            self.VersionNumber = ("0.01" + " " + gBUILD_VERSION)
            self.Version = "%prog Version " + self.VersionNumber
            self.Copyright = "Copyright (c) 2009 - 2010, Intel Corporation  All rights reserved."
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/Ecc.py - About 1 hr to fix

      Function run has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        Function initialize_options has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def initialize_options (self):
                self.bdist_base = None
                self.rpm_base = None
                self.dist_dir = None
                self.python = None

          Function run has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            Function initialize_options has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def initialize_options (self):
                    self.bdist_base = None
                    self.rpm_base = None
                    self.dist_dir = None
                    self.python = None

              Function __GetComponentStatement has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def __GetComponentStatement(self, VtfObj):
                      
                      if not self.__IsKeyword("COMP_NAME"):
                          return False
                      
              Severity: Minor
              Found in BaseTools/Source/Python/Common/FdfParserLite.py - About 1 hr to fix

                Function __GetComponentStatement has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def __GetComponentStatement(self, VtfObj):
                
                        if not self.__IsKeyword("COMP_NAME"):
                            return False
                
                Severity: Minor
                Found in BaseTools/Source/Python/GenFds/FdfParser.py - About 1 hr to fix

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

                      def Insert(self, Model, Value1, Value2, Value3, Scope1='COMMON', Scope2='COMMON',
                  Severity: Major
                  Found in BaseTools/Source/Python/Workspace/MetaFileTable.py - About 1 hr to fix

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

                        def Insert(self, Model, Value1, Value2, Value3, Scope1='COMMON', Scope2='COMMON',
                    Severity: Major
                    Found in BaseTools/Source/Python/Workspace/MetaFileTable.py - About 1 hr to fix

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

                          def Insert(self, Model, Value1, Value2, Value3, Arch, BelongsToItem, BelongsToFile, StartLine, StartColumn, EndLine, EndColumn, Enabled):
                      Severity: Major
                      Found in BaseTools/Source/Python/Table/TableDsc.py - About 1 hr to fix

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

                            def __init__(self, ID = -1, CName = '', TokenSpaceGuidCName = '', Token = '', DatumType = '', Model = MODEL_UNKNOWN, \
                        Severity: Major
                        Found in BaseTools/Source/Python/CommonDataClass/DataClass.py - About 1 hr to fix

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

                              def __init__(self, ID = -1, Modifier = '', Type = '', Name = '', Value = '', Model = MODEL_UNKNOWN, \
                          Severity: Major
                          Found in BaseTools/Source/Python/CommonDataClass/DataClass.py - About 1 hr to fix

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

                            def make_text_box(parent, width=0, height=0, hbar=0, vbar=1,
                            Severity: Major
                            Found in AppPkg/Applications/Python/Python-2.7.2/Tools/webchecker/tktools.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 AppPkg/Applications/Python/Python-2.7.2/Lib/doctest.py - About 1 hr to fix

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

                                Severity: Major
                                Found in AppPkg/Applications/Python/Python-2.7.2/Lib/tarfile.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/cookielib.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 AppPkg/Applications/Python/Python-2.7.2/Lib/json/__init__.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 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/ccompiler.py - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language