]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Ecc/Configuration.py
BaseTools: Add new RegExp for future use
[mirror_edk2.git] / BaseTools / Source / Python / Ecc / Configuration.py
index 0ba8d732d77d42747aaf62a9d94b6af139fd31c1..b523858e1b1f5149b6ef0702495797053f6e8ec0 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to define class Configuration\r
 #\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
 ##\r
 # Import Modules\r
 #\r
-import os\r
+import Common.LongFilePathOs as os\r
 import Common.EdkLogger as EdkLogger\r
 from Common.DataType import *\r
 from Common.String import *\r
+from Common.LongFilePathSupport import OpenLongFilePath as open\r
 \r
 ## Configuration\r
 #\r
@@ -79,6 +80,8 @@ class Configuration(object):
         self.GeneralCheckFileExistence = 1\r
         # Check whether file has non ACSII char\r
         self.GeneralCheckNonAcsii = 1\r
+        # Check whether UNI file is valid\r
+        self.GeneralCheckUni = 1\r
 \r
         ## Space Checking\r
         self.SpaceCheckAll = 1\r
@@ -217,6 +220,8 @@ class Configuration(object):
         self.MetaDataFileCheckLibraryInstanceOrder = 1\r
         # Check whether the unnecessary inclusion of library classes in the INF file\r
         self.MetaDataFileCheckLibraryNoUse = 1\r
+        # Check the header file in Include\Library directory whether be defined in the package DEC file.\r
+        self.MetaDataFileCheckLibraryDefinedInDec = 1\r
         # Check whether an INF file is specified in the FDF file, but not in the DSC file, then the INF file must be for a Binary module only\r
         self.MetaDataFileCheckBinaryInfInFdf = 1\r
         # Not to report error and warning related OS include file such as "windows.h" and "stdio.h"\r
@@ -235,6 +240,27 @@ class Configuration(object):
         # Check whether there are FILE_GUID duplication among different INF files\r
         self.MetaDataFileCheckModuleFileGuidDuplication = 1\r
 \r
+        # Check Guid Format in INF files\r
+        self.MetaDataFileCheckModuleFileGuidFormat = 1\r
+        # Check Protocol Format in INF files\r
+        self.MetaDataFileCheckModuleFileProtocolFormat = 1\r
+        # Check Ppi Format in INF files\r
+        self.MetaDataFileCheckModuleFilePpiFormat = 1\r
+        # Check Pcd Format in INF files\r
+        self.MetaDataFileCheckModuleFilePcdFormat = 1\r
+        \r
+        # Check UNI file\r
+        self.UniCheckAll = 0\r
+        # Check INF or DEC file whether defined the localized information in the associated UNI file.\r
+        self.UniCheckHelpInfo = 1\r
+        # Check PCD whether defined the prompt, help in the DEC file and localized information in the associated UNI file.\r
+        self.UniCheckPCDInfo = 1\r
+\r
+        # Check SMM communication function parameter\r
+        self.SmmCommParaCheckAll = 0\r
+        # Check if the EFI_SMM_COMMUNICATION_PROTOCOL parameter buffer type is Reserved / ACPI NVS or UEFI RT code/data\r
+        self.SmmCommParaCheckBufferType = -1\r
+\r
         #\r
         # The check points in this section are reserved\r
         #\r
@@ -244,9 +270,18 @@ class Configuration(object):
 \r
         # The directory listed here will not be parsed, split with ','\r
         self.SkipDirList = []\r
+        \r
+        # The file listed here will not be parsed, split with ','\r
+        self.SkipFileList = []\r
 \r
         # A list for binary file ext name\r
         self.BinaryExtList = []\r
+        \r
+        # A list for only scanned folders\r
+        self.ScanOnlyDirList = []\r
+        \r
+        # A list for Copyright format\r
+        self.Copyright = []\r
 \r
         self.ParseConfig()\r
 \r
@@ -271,8 +306,12 @@ class Configuration(object):
                     continue\r
                 if List[0] == 'SkipDirList':\r
                     List[1] = GetSplitValueList(List[1], TAB_COMMA_SPLIT)\r
+                if List[0] == 'SkipFileList':\r
+                    List[1] = GetSplitValueList(List[1], TAB_COMMA_SPLIT)\r
                 if List[0] == 'BinaryExtList':\r
                     List[1] = GetSplitValueList(List[1], TAB_COMMA_SPLIT)\r
+                if List[0] == 'Copyright':\r
+                    List[1] = GetSplitValueList(List[1], TAB_COMMA_SPLIT)\r
                 self.__dict__[List[0]] = List[1]\r
 \r
     def ShowMe(self):\r