diff options
author | Guo Mang <mang.guo@intel.com> | 2018-04-25 17:24:58 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2018-04-25 17:26:11 +0800 |
commit | 6e3789d7424660b14ef3d7123221c97db5d8aff5 (patch) | |
tree | 6a5a7f1e0bc5a5296f2de0c8f02091c85e3443b7 /BaseTools/Source/Python/Workspace/MetaFileCommentParser.py | |
parent | d33896d88d9d32d516129e92e25b80f8fddc6f7b (diff) | |
download | edk2-platforms-6e3789d7424660b14ef3d7123221c97db5d8aff5.tar.xz |
Remove unused files
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/MetaFileCommentParser.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/MetaFileCommentParser.py | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/BaseTools/Source/Python/Workspace/MetaFileCommentParser.py b/BaseTools/Source/Python/Workspace/MetaFileCommentParser.py deleted file mode 100644 index df1e90faf5..0000000000 --- a/BaseTools/Source/Python/Workspace/MetaFileCommentParser.py +++ /dev/null @@ -1,51 +0,0 @@ -## @file
-# This file is used to check format of comments
-#
-# Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-from CommonDataClass.DataClass import (
- MODEL_PCD_PATCHABLE_IN_MODULE,
- MODEL_PCD_DYNAMIC_EX,
- MODEL_PCD_DYNAMIC,
- MODEL_EFI_GUID,
- MODEL_EFI_PPI,
- MODEL_EFI_PROTOCOL
-)
-from Common.BuildToolError import FORMAT_INVALID
-import Common.EdkLogger as EdkLogger
-
-UsageList = ("PRODUCES", "PRODUCED", "ALWAYS_PRODUCES", "ALWAYS_PRODUCED", "SOMETIMES_PRODUCES",
- "SOMETIMES_PRODUCED", "CONSUMES", "CONSUMED", "ALWAYS_CONSUMES", "ALWAYS_CONSUMED",
- "SOMETIMES_CONSUMES", "SOMETIMES_CONSUMED", "SOMETIME_CONSUMES")
-ErrorMsgMap = {
- MODEL_EFI_GUID : "The usage for this GUID is not listed in this INF: %s[%d]:%s",
- MODEL_EFI_PPI : "The usage for this PPI is not listed in this INF: %s[%d]:%s.",
- MODEL_EFI_PROTOCOL : "The usage for this Protocol is not listed in this INF: %s[%d]:%s.",
- MODEL_PCD_DYNAMIC : "The usage for this PCD is not listed in this INF: %s[%d]:%s."
-}
-
-def CheckInfComment(SectionType, Comments, InfFile, LineNo, ValueList):
- if SectionType in [MODEL_PCD_PATCHABLE_IN_MODULE, MODEL_PCD_DYNAMIC_EX, MODEL_PCD_DYNAMIC]:
- CheckUsage(Comments, UsageList, InfFile, LineNo, ValueList[0]+'.'+ValueList[1], ErrorMsgMap[MODEL_PCD_DYNAMIC])
- elif SectionType in [MODEL_EFI_GUID, MODEL_EFI_PPI]:
- CheckUsage(Comments, UsageList, InfFile, LineNo, ValueList[0], ErrorMsgMap[SectionType])
- elif SectionType == MODEL_EFI_PROTOCOL:
- CheckUsage(Comments, UsageList + ("TO_START", "BY_START"), InfFile, LineNo, ValueList[0], ErrorMsgMap[SectionType])
-
-def CheckUsage(Comments, Usages, InfFile, LineNo, Value, ErrorMsg):
- for Comment in Comments:
- for Word in Comment[0].replace('#', ' ').split():
- if Word in Usages:
- return
- EdkLogger.error(
- "Parser", FORMAT_INVALID,
- ErrorMsg % (InfFile, LineNo, Value)
- )
|