From fb0b35e05f772bd415fe264267bbbcde2e0accda Mon Sep 17 00:00:00 2001 From: Antoine Coeur Date: Wed, 6 Feb 2019 15:44:39 +0800 Subject: BaseTools: Various typo Various typo in BaseTools. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Coeur Reviewed-by: Liming Gao --- BaseTools/Source/Python/Ecc/C.g | 8 ++++---- BaseTools/Source/Python/Ecc/CParser3/CLexer.py | 2 +- BaseTools/Source/Python/Ecc/CParser3/CParser.py | 2 +- BaseTools/Source/Python/Ecc/Check.py | 14 +++++++------- BaseTools/Source/Python/Ecc/Database.py | 8 ++++---- BaseTools/Source/Python/Ecc/EccMain.py | 4 ++-- BaseTools/Source/Python/Ecc/EccToolError.py | 4 ++-- BaseTools/Source/Python/Ecc/MetaDataParser.py | 2 +- BaseTools/Source/Python/Ecc/c.py | 8 ++++---- 9 files changed, 26 insertions(+), 26 deletions(-) (limited to 'BaseTools/Source/Python/Ecc') diff --git a/BaseTools/Source/Python/Ecc/C.g b/BaseTools/Source/Python/Ecc/C.g index e344088f36..4affd61ecc 100644 --- a/BaseTools/Source/Python/Ecc/C.g +++ b/BaseTools/Source/Python/Ecc/C.g @@ -23,7 +23,7 @@ options { ## @file # The file defines the Lexer for C source files. # -# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE. +# THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE. # This file is generated by running: # java org.antlr.Tool C.g # @@ -44,7 +44,7 @@ options { ## @file # The file defines the parser for C source files. # -# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE. +# THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE. # This file is generated by running: # java org.antlr.Tool C.g # @@ -653,11 +653,11 @@ UnicodeEscape WS : (' '|'\r'|'\t'|'\u000C'|'\n') {$channel=HIDDEN;} ; -// ingore '\' of line concatenation +// ignore '\' of line concatenation BS : ('\\') {$channel=HIDDEN;} ; -// ingore function modifiers +// ignore function modifiers //FUNC_MODIFIERS : 'EFIAPI' {$channel=HIDDEN;} // ; diff --git a/BaseTools/Source/Python/Ecc/CParser3/CLexer.py b/BaseTools/Source/Python/Ecc/CParser3/CLexer.py index b9e57c1b55..17c1af6113 100644 --- a/BaseTools/Source/Python/Ecc/CParser3/CLexer.py +++ b/BaseTools/Source/Python/Ecc/CParser3/CLexer.py @@ -6,7 +6,7 @@ from antlr3.compat import set, frozenset ## @file # The file defines the Lexer for C source files. # -# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE. +# THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE. # This file is generated by running: # java org.antlr.Tool C.g # diff --git a/BaseTools/Source/Python/Ecc/CParser3/CParser.py b/BaseTools/Source/Python/Ecc/CParser3/CParser.py index a3ab8e7bf4..c63b0a556f 100644 --- a/BaseTools/Source/Python/Ecc/CParser3/CParser.py +++ b/BaseTools/Source/Python/Ecc/CParser3/CParser.py @@ -8,7 +8,7 @@ from antlr3.compat import set, frozenset ## @file # The file defines the parser for C source files. # -# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE. +# THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE. # This file is generated by running: # java org.antlr.Tool C.g # diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python/Ecc/Check.py index a6c62359d0..6e5bcee846 100644 --- a/BaseTools/Source/Python/Ecc/Check.py +++ b/BaseTools/Source/Python/Ecc/Check.py @@ -1403,7 +1403,7 @@ class Check(object): # Check whether only capital letters are used for #define declarations def NamingConventionCheckDefineStatement(self, FileTable): if EccGlobalData.gConfig.NamingConventionCheckDefineStatement == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1': - EdkLogger.quiet("Checking naming covention of #define statement ...") + EdkLogger.quiet("Checking naming convention of #define statement ...") SqlCommand = """select ID, Value from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_MACRO_DEFINE) RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand) @@ -1418,7 +1418,7 @@ class Check(object): # Check whether only capital letters are used for typedef declarations def NamingConventionCheckTypedefStatement(self, FileTable): if EccGlobalData.gConfig.NamingConventionCheckTypedefStatement == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1': - EdkLogger.quiet("Checking naming covention of #typedef statement ...") + EdkLogger.quiet("Checking naming convention of #typedef statement ...") SqlCommand = """select ID, Name from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_TYPEDEF) RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand) @@ -1438,7 +1438,7 @@ class Check(object): # Check whether the #ifndef at the start of an include file uses both prefix and postfix underscore characters, '_'. def NamingConventionCheckIfndefStatement(self, FileTable): if EccGlobalData.gConfig.NamingConventionCheckIfndefStatement == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1': - EdkLogger.quiet("Checking naming covention of #ifndef statement ...") + EdkLogger.quiet("Checking naming convention of #ifndef statement ...") SqlCommand = """select ID, Value from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_MACRO_IFNDEF) RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand) @@ -1455,7 +1455,7 @@ class Check(object): # Check whether the path name followed the rule def NamingConventionCheckPathName(self): if EccGlobalData.gConfig.NamingConventionCheckPathName == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1': - EdkLogger.quiet("Checking naming covention of file path name ...") + EdkLogger.quiet("Checking naming convention of file path name ...") Pattern = re.compile(r'^[A-Z]+\S*[a-z]\S*$') SqlCommand = """select ID, Name from File""" RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand) @@ -1472,7 +1472,7 @@ class Check(object): # Check whether the variable name followed the rule def NamingConventionCheckVariableName(self, FileTable): if EccGlobalData.gConfig.NamingConventionCheckVariableName == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1': - EdkLogger.quiet("Checking naming covention of variable name ...") + EdkLogger.quiet("Checking naming convention of variable name ...") Pattern = re.compile(r'^[A-Zgm]+\S*[a-z]\S*$') SqlCommand = """select ID, Name from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_VARIABLE) @@ -1492,7 +1492,7 @@ class Check(object): # Check whether the function name followed the rule def NamingConventionCheckFunctionName(self): if EccGlobalData.gConfig.NamingConventionCheckFunctionName == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1': - EdkLogger.quiet("Checking naming covention of function name ...") + EdkLogger.quiet("Checking naming convention of function name ...") Pattern = re.compile(r'^[A-Z]+\S*[a-z]\S*$') SqlCommand = """select ID, Name from Function""" RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand) @@ -1504,7 +1504,7 @@ class Check(object): # Check whether NO use short variable name with single character def NamingConventionCheckSingleCharacterVariable(self, FileTable): if EccGlobalData.gConfig.NamingConventionCheckSingleCharacterVariable == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1': - EdkLogger.quiet("Checking naming covention of single character variable name ...") + EdkLogger.quiet("Checking naming convention of single character variable name ...") SqlCommand = """select ID, Name from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_VARIABLE) RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand) diff --git a/BaseTools/Source/Python/Ecc/Database.py b/BaseTools/Source/Python/Ecc/Database.py index 9d4acac7b7..2a6b1198d8 100644 --- a/BaseTools/Source/Python/Ecc/Database.py +++ b/BaseTools/Source/Python/Ecc/Database.py @@ -39,7 +39,7 @@ DATABASE_PATH = "Ecc.db" ## Database # -# This class defined the ECC databse +# This class defined the ECC database # During the phase of initialization, the database will create all tables and # insert all records of table DataModel # @@ -83,7 +83,7 @@ class Database(object): self.Conn = sqlite3.connect(self.DbPath, isolation_level = 'DEFERRED') self.Conn.execute("PRAGMA page_size=4096") self.Conn.execute("PRAGMA synchronous=OFF") - # to avoid non-ascii charater conversion error + # to avoid non-ascii character conversion error self.Conn.text_factory = str self.Cur = self.Conn.cursor() @@ -214,7 +214,7 @@ class Database(object): ## UpdateIdentifierBelongsToFunction # - # Update the field "BelongsToFunction" for each Indentifier + # Update the field "BelongsToFunction" for each Identifier # # def UpdateIdentifierBelongsToFunction_disabled(self): @@ -267,7 +267,7 @@ class Database(object): ## UpdateIdentifierBelongsToFunction # - # Update the field "BelongsToFunction" for each Indentifier + # Update the field "BelongsToFunction" for each Identifier # # def UpdateIdentifierBelongsToFunction(self): diff --git a/BaseTools/Source/Python/Ecc/EccMain.py b/BaseTools/Source/Python/Ecc/EccMain.py index edb6c6d7d4..f06183d646 100644 --- a/BaseTools/Source/Python/Ecc/EccMain.py +++ b/BaseTools/Source/Python/Ecc/EccMain.py @@ -209,7 +209,7 @@ class Ecc(object): Op.write("%s\r" % Filename) #Dsc(Filename, True, True, EccGlobalData.gWorkspace, EccGlobalData.gDb) self.MetaFile = DscParser(PathClass(Filename, Root), MODEL_FILE_DSC, MetaFileStorage(EccGlobalData.gDb.TblDsc.Cur, Filename, MODEL_FILE_DSC, True)) - # alwasy do post-process, in case of macros change + # always do post-process, in case of macros change self.MetaFile.DoPostProcess() self.MetaFile.Start() self.MetaFile._PostProcess() @@ -307,7 +307,7 @@ class Ecc(object): if Options.Workspace: os.environ["WORKSPACE"] = Options.Workspace - # Check workspace envirnoment + # Check workspace environment if "WORKSPACE" not in os.environ: EdkLogger.error("ECC", BuildToolError.ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found", ExtraData="WORKSPACE") diff --git a/BaseTools/Source/Python/Ecc/EccToolError.py b/BaseTools/Source/Python/Ecc/EccToolError.py index ae0a31af8a..3f1a44c1f7 100644 --- a/BaseTools/Source/Python/Ecc/EccToolError.py +++ b/BaseTools/Source/Python/Ecc/EccToolError.py @@ -1,5 +1,5 @@ ## @file -# Standardized Error Hanlding infrastructures. +# Standardized Error Handling infrastructures. # # Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials @@ -152,7 +152,7 @@ gEccErrorMessage = { ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_2 : "The #ifndef must be the first line of code following the file header comment", ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_3 : "The #endif must appear on the last line in the file", ERROR_INCLUDE_FILE_CHECK_DATA : "Include files should contain only public or only private data and cannot contain code or define data variables", - ERROR_INCLUDE_FILE_CHECK_NAME : "No permission for the inlcude file with same names", + ERROR_INCLUDE_FILE_CHECK_NAME : "No permission for the include file with same names", ERROR_DECLARATION_DATA_TYPE_CHECK_ALL : "", ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE : "There should be no use of int, unsigned, char, void, static, long in any .c, .h or .asl files", diff --git a/BaseTools/Source/Python/Ecc/MetaDataParser.py b/BaseTools/Source/Python/Ecc/MetaDataParser.py index 4594716886..aab2e92ea7 100644 --- a/BaseTools/Source/Python/Ecc/MetaDataParser.py +++ b/BaseTools/Source/Python/Ecc/MetaDataParser.py @@ -18,7 +18,7 @@ from Ecc.EccToolError import * from Common.MultipleWorkspace import MultipleWorkspace as mws from Ecc import EccGlobalData import re -## Get the inlcude path list for a source file +## Get the include path list for a source file # # 1. Find the source file belongs to which inf file # 2. Find the inf's package diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py index 0c377c6c4a..7b645ff053 100644 --- a/BaseTools/Source/Python/Ecc/c.py +++ b/BaseTools/Source/Python/Ecc/c.py @@ -733,7 +733,7 @@ def SplitPredicateByOp(Str, Op, IsFuncCalling=False): while not LBFound and (Str[Index].isalnum() or Str[Index] == '_'): Index += 1 - # maybe type-cast at the begining, skip it. + # maybe type-cast at the beginning, skip it. RemainingStr = Str[Index:].lstrip() if RemainingStr.startswith(')') and not LBFound: Index += 1 @@ -834,7 +834,7 @@ def GetDataTypeFromModifier(ModifierStr): for M in MList: if M in EccGlobalData.gConfig.ModifierSet: continue - # remove array sufix + # remove array suffix if M.startswith('[') or M.endswith(']'): continue ReturnType += M + ' ' @@ -1019,7 +1019,7 @@ def GetFinalTypeValue(Type, FieldName, TypedefDict, SUDict): Type = GetDataTypeFromModifier(Field[0:Index]) return Type.strip() else: - # For the condition that the field in struct is an array with [] sufixes... + # For the condition that the field in struct is an array with [] suffixes... if not Field[Index + len(FieldName)].isalnum(): Type = GetDataTypeFromModifier(Field[0:Index]) return Type.strip() @@ -1629,7 +1629,7 @@ def CheckMemberVariableFormat(Name, Value, FileTable, TdId, ModelId): Field = Field.strip() if Field == '': continue - # For the condition that the field in struct is an array with [] sufixes... + # For the condition that the field in struct is an array with [] suffixes... if Field[-1] == ']': LBPos = Field.find('[') Field = Field[0:LBPos] -- cgit v1.2.3