MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / CheckFuncLayoutBody

Function CheckFuncLayoutBody

BaseTools/Source/Python/Ecc/c.py:1502–1528  ·  view source on GitHub ↗
(FullFileName)

Source from the content-addressed store, hash-verified

1500 break
1501
1502def CheckFuncLayoutBody(FullFileName):
1503 ErrorMsgList = []
1504
1505 FileID = GetTableID(FullFileName, ErrorMsgList)
1506 if FileID < 0:
1507 return ErrorMsgList
1508
1509 FileTable = 'Identifier' + str(FileID)
1510 Db = GetDB()
1511 SqlStatement = """ select BodyStartColumn, EndColumn, ID, Name
1512 from Function
1513 where BelongsToFile = %d
1514 """ % (FileID)
1515 ResultSet = Db.TblFile.Exec(SqlStatement)
1516 if len(ResultSet) == 0:
1517 return ErrorMsgList
1518 for Result in ResultSet:
1519 if Result[0] != 0:
1520 if not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY, Result[3]):
1521 PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY,
1522 'The open brace should be at the very beginning of a line for the function [%s].' % Result[3],
1523 'Function', Result[2])
1524 if Result[1] != 0:
1525 if not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY, Result[3]):
1526 PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY,
1527 'The close brace should be at the very beginning of a line for the function [%s].' % Result[3],
1528 'Function', Result[2])
1529
1530def CheckFuncLayoutLocalVariable(FullFileName):
1531 ErrorMsgList = []

Callers

nothing calls this directly

Calls 6

GetTableIDFunction · 0.85
lenFunction · 0.85
IsExceptionMethod · 0.80
GetDBFunction · 0.70
PrintErrorMsgFunction · 0.70
ExecMethod · 0.45

Tested by

no test coverage detected