hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Consider simplifying this complex logical expression.
Open

            if (Line.startswith(DT.TAB_COMMENT_SPLIT) and CurrentSection == DT.MODEL_META_DATA_FILE_HEADER) and\
                BinaryHeaderCommentStart and not Line.startswith(DT.TAB_SPECIAL_COMMENT) and not\
                BinaryHeaderCommentEnd and NextLine != '':
                SectionLines.append((Line, LineNo))
                continue
Severity: Major
Found in BaseTools/Source/Python/UPT/Parser/InfParser.py - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

                if (Line.startswith(DT.TAB_COMMENT_SPLIT) and CurrentSection == DT.MODEL_META_DATA_FILE_HEADER) and\
                    HeaderCommentStart and not Line.startswith(DT.TAB_SPECIAL_COMMENT) and not\
                    HeaderCommentEnd and NextLine != '':
                    SectionLines.append((Line, LineNo))
                    continue
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Parser/InfParser.py - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

          if (TempChar >= 'a' and TempChar <= 'f') or \
          (TempChar >= 'A' and TempChar <= 'F') \
                  or (TempChar >= '0' and TempChar <= '9'):
              return True
          else:
      Severity: Major
      Found in BaseTools/Source/Python/UPT/Library/ParserValidate.py - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                    if self._Defs and 'PCI_DEVICE_ID' in self._Defs and 'PCI_VENDOR_ID' in self._Defs \
                       and 'PCI_CLASS_CODE' in self._Defs:
                        self._BuildType = 'UEFI_OPTIONROM'
                    elif self._Defs and 'UEFI_HII_RESOURCE_SECTION' in self._Defs \
                       and self._Defs['UEFI_HII_RESOURCE_SECTION'] == 'TRUE':
        Severity: Major
        Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                      if not S.startswith("[FD.") and not S.startswith("[FV.") and not S.startswith("[CAPSULE.") \
                          and not S.startswith("[VTF.") and not S.startswith("[RULE.") and not S.startswith("[OPTIONROM."):
                          raise Warning("Unknown section or section appear sequence error (The correct sequence should be [DEFINES], [FD.], [FV.], [Capsule.], [VTF.], [Rule.], [OptionRom.])", self.FileName, self.CurrentLineNumber)
                      self.__UndoToken()
          Severity: Major
          Found in BaseTools/Source/Python/GenFds/FdfParser.py - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                    if (TempChar >= 'a' and TempChar <= 'f') or (TempChar >= 'A' and TempChar <= 'F') \
                            or (TempChar >= '0' and TempChar <= '9'):
                                return True
                    else:
                        return False
            Severity: Major
            Found in BaseTools/Source/Python/GenFds/FdfParser.py - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                          if not (IsInf or IsFile or IsFv or IsFd or IsAnyFile or IsAfile):
                              break
              
                  ## __GetFvStatement() method
                  #
              Severity: Major
              Found in BaseTools/Source/Python/GenFds/FdfParser.py - About 40 mins to fix

                Consider simplifying this complex logical expression.
                Open

                            if Line.find(u'#string ') >= 0 and Line.find(u'#language ') < 0 and \
                                SecondLine.find(u'#string ') < 0 and SecondLine.find(u'#language ') >= 0 and \
                                ThirdLine.find(u'#string ') < 0 and ThirdLine.find(u'#language ') < 0:
                                Name = Line[Line.find(u'#string ') + len(u'#string ') : ].strip(' ')
                                Language = SecondLine[SecondLine.find(u'#language ') + len(u'#language ') : ].strip(' ')
                Severity: Major
                Found in BaseTools/Source/Python/AutoGen/UniClassObject.py - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                          if DotIndex == -1 and ArrowIndex == -1:
                              break
                          elif DotIndex == -1 and ArrowIndex != -1:
                              SearchBegin = VarEnd + ArrowIndex
                          elif ArrowIndex == -1 and DotIndex != -1:
                  Severity: Major
                  Found in BaseTools/Source/Python/Ecc/c.py - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                                            if LA53 == 65:
                                                LA53_33 = self.input.LA(3)
                    
                                                if (self.synpred94()) :
                                                    alt53 = 1
                    Severity: Major
                    Found in BaseTools/Source/Python/Ecc/CParser.py - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                                      if ((IDENTIFIER <= LA56_0 <= FLOATING_POINT_LITERAL) or LA56_0 == 62 or LA56_0 == 66 or (68 <= LA56_0 <= 69) or (72 <= LA56_0 <= 74) or (77 <= LA56_0 <= 79)) :
                                          alt56 = 1
                                      elif (LA56_0 == 43) :
                                          alt56 = 2
                                      else:
                      Severity: Major
                      Found in BaseTools/Source/Python/Ecc/CParser.py - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                                    if LA31 == 65:
                                                        LA31_51 = self.input.LA(3)
                        
                                                        if (self.synpred67()) :
                                                            alt31 = 1
                        Severity: Major
                        Found in BaseTools/Source/Python/Ecc/CParser.py - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                                                      if LA33 == 65:
                                                          LA33_51 = self.input.LA(3)
                          
                                                          if (self.synpred70()) :
                                                              alt33 = 1
                          Severity: Major
                          Found in BaseTools/Source/Python/Ecc/CParser.py - About 40 mins to fix

                            Consider simplifying this complex logical expression.
                            Open

                                                    if LA50 == 65:
                                                        LA50_33 = self.input.LA(3)
                            
                                                        if (self.synpred91()) :
                                                            alt50 = 1
                            Severity: Major
                            Found in BaseTools/Source/Python/Ecc/CParser.py - About 40 mins to fix

                              Consider simplifying this complex logical expression.
                              Open

                                                  if (LA54_1 == 65) :
                                                      alt54 = 1
                                                  elif ((IDENTIFIER <= LA54_1 <= FLOATING_POINT_LITERAL) or LA54_1 == 62 or LA54_1 == 66 or (68 <= LA54_1 <= 69) or (72 <= LA54_1 <= 74) or (77 <= LA54_1 <= 79)) :
                                                      alt54 = 2
                                                  else:
                              Severity: Major
                              Found in BaseTools/Source/Python/Ecc/CParser.py - About 40 mins to fix

                                Consider simplifying this complex logical expression.
                                Open

                                                        if (LA42_1 == 53) :
                                                            LA42_3 = self.input.LA(3)
                                
                                                            if (self.synpred82()) :
                                                                alt42 = 1
                                Severity: Major
                                Found in BaseTools/Source/Python/Ecc/CParser.py - About 40 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                      if (LA1_0 == IDENTIFIER or LA1_0 == 26 or (29 <= LA1_0 <= 42) or (45 <= LA1_0 <= 46) or (48 <= LA1_0 <= 62) or LA1_0 == 66) :
                                                          alt1 = 1
                                  
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Ecc/CParser.py - About 40 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                                if (Line.startswith('#') and CurrentSection == MODEL_IDENTIFIER_FILE_HEADER) and\
                                                                    HeaderCommentStart and not Line.startswith('##') and not\
                                                                    HeaderCommentEnd and NextLine != '':
                                                                    HeaderSectionLines.append((Line, LineNo))
                                                                    continue
                                    Severity: Major
                                    Found in BaseTools/Source/Python/Ecc/Check.py - About 40 mins to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                                          if (LA35_1 == 65) :
                                                              alt35 = 2
                                                          elif ((IDENTIFIER <= LA35_1 <= FLOATING_POINT_LITERAL) or LA35_1 == 62 or LA35_1 == 66 or (68 <= LA35_1 <= 69) or (72 <= LA35_1 <= 74) or (77 <= LA35_1 <= 79)) :
                                                              alt35 = 1
                                                          else:
                                      Severity: Major
                                      Found in BaseTools/Source/Python/Ecc/CParser.py - About 40 mins to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                        if ((IDENTIFIER <= LA91_0 <= FLOATING_POINT_LITERAL) or LA91_0 == 62 or LA91_0 == 66 or (68 <= LA91_0 <= 69) or (72 <= LA91_0 <= 74) or (77 <= LA91_0 <= 79)) :
                                                            alt91 = 1
                                                        if alt91 == 1:
                                        Severity: Major
                                        Found in BaseTools/Source/Python/Ecc/CParser.py - About 40 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language