hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

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

    def __init__(self, Filename = None, Database = None, SourceFileList = None, SourceOverridePath = None, Edk_Source = None, Efi_Source = None):
Severity: Minor
Found in BaseTools/Source/Python/Eot/InfParserLite.py - About 45 mins to fix

    Function PrintFragments has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def PrintFragments(self):
            
            print '################# ' + self.FileName + '#####################'
            
            print '/****************************************/'
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/CodeFragmentCollector.py - About 45 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

    Avoid deeply nested control flow statements.
    Open

                            if CurrentSection != ItemList[0]:
                                EdkLogger.error("Parser", PARSER_ERROR, "Different section names '%s' and '%s' are found in one section definition, this is not allowed." % (CurrentSection, ItemList[0]), File=Filename, Line=LineNo)
                        ItemList.append('')
    Severity: Major
    Found in BaseTools/Source/Python/Eot/InfParserLite.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if NextLine[0] == TAB_SECTION_START and NextLine[-1] == TAB_SECTION_END:
                                  self._CurrentLine = NmakeLine + Line[0:-1]
                                  NmakeLine = ''
                              else:
                                  NmakeLine = NmakeLine + ' ' + Line[0:-1]
      Severity: Major
      Found in BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py - About 45 mins to fix

        Function ParserSource has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            def ParserSource(self, CurrentSection, SectionItemList, ArchList, ThirdList):
                for Index in range(0, len(ArchList)):
                    Arch = ArchList[Index]
                    Third = ThirdList[Index]
                    if Arch == '':
        Severity: Minor
        Found in BaseTools/Source/Python/Eot/InfParserLite.py - About 45 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 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(self, ModifierStr, DeclStr, Begin, End, LBPos, NamePos):
        Severity: Minor
        Found in BaseTools/Source/Python/Eot/CodeFragment.py - About 45 mins to fix

          Function StoreFunctionCalling has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def StoreFunctionCalling(self, StartLine, StartOffset, EndLine, EndOffset, FuncName, ParamList):
          Severity: Minor
          Found in BaseTools/Source/Python/Eot/CParser.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    for CompressSection in CompressSections.Sections:
                                        if CompressSection.Type == 0x1B:
                                            CouldBeLoaded, DepexString, FileDepex = self.ParseDepex(CompressSection._SubImages[4], 'Ppi')
                                            break
                                        if CompressSection.Type == 0x02:
            Severity: Major
            Found in BaseTools/Source/Python/Eot/FvImage.py - About 45 mins to fix

              Function StoreVariableDeclaration has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def StoreVariableDeclaration(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText):
              Severity: Minor
              Found in BaseTools/Source/Python/Eot/CParser.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        while len(Section) > Start:
                                            Guid = GuidStruct.unpack_from(Section[Start : Start + 16])
                                            GuidString = gGuidStringFormat % Guid
                                            Start = Start + 16
                                            if GuidString in self.UnDispatchedFfsDict:
                Severity: Major
                Found in BaseTools/Source/Python/Eot/FvImage.py - About 45 mins to fix

                  Function StoreTypedefDefinition has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def StoreTypedefDefinition(self, StartLine, StartOffset, EndLine, EndOffset, FromText, ToText):
                  Severity: Minor
                  Found in BaseTools/Source/Python/Eot/CParser.py - About 45 mins to fix

                    Function LoadCallbackProtocol has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def LoadCallbackProtocol(self):
                            IsLoad = True
                            for Protocol in self.ProtocolList:
                                for Callback in self.ProtocolList[Protocol][1]:
                                    if Callback[0] not in self.OrderedFfsDict.keys():
                    Severity: Minor
                    Found in BaseTools/Source/Python/Eot/FvImage.py - About 45 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

                    Avoid deeply nested control flow statements.
                    Open

                                            while len(Section) > Start:
                                                Guid = GuidStruct.unpack_from(Section[Start : Start + 16])
                                                GuidString = gGuidStringFormat % Guid
                                                Start = Start + 16
                                                if GuidString in self.UnDispatchedFfsDict:
                    Severity: Major
                    Found in BaseTools/Source/Python/Eot/FvImage.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              for CompressSection in CompressSections.Sections:
                                                  if CompressSection.Type == 0x13:
                                                      IsFoundDepex = True
                                                      CouldBeLoaded, DepexString, FileDepex = self.ParseDepex(CompressSection._SubImages[4], 'Protocol')
                                                      break
                      Severity: Major
                      Found in BaseTools/Source/Python/Eot/FvImage.py - About 45 mins to fix

                        Function storage_class_specifier has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def storage_class_specifier(self, ):
                        
                                storage_class_specifier_StartIndex = self.input.index()
                                try:
                                    try:
                        Severity: Minor
                        Found in BaseTools/Source/Python/Eot/CParser.py - About 45 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

                        Avoid deeply nested control flow statements.
                        Open

                                                        if (self.synpred67()) :
                                                            alt31 = 1
                        
                        Severity: Major
                        Found in BaseTools/Source/Python/Eot/CParser.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                          if (self.synpred67()) :
                                                              alt31 = 1
                          
                          Severity: Major
                          Found in BaseTools/Source/Python/Eot/CParser.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                            if (self.synpred67()) :
                                                                alt31 = 1
                            
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/CParser.py - About 45 mins to fix

                              Function synpred82_fragment has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def synpred82_fragment(self, ):
                                      # C.g:326:27: ( ',' ( 'OPTIONAL' )? parameter_declaration )
                                      # C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration
                                      self.match(self.input, 27, self.FOLLOW_27_in_synpred82974)
                                      if self.failed:
                              Severity: Minor
                              Found in BaseTools/Source/Python/Eot/CParser.py - About 45 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

                              Avoid deeply nested control flow statements.
                              Open

                                                              if (self.synpred67()) :
                                                                  alt31 = 1
                              
                              Severity: Major
                              Found in BaseTools/Source/Python/Eot/CParser.py - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language