Added query to determine if tablestr and methodstr (and their counterparts) have unbalanced

This commit is contained in:
peter-villadsen 2022-01-28 17:25:48 -08:00
Родитель c1a1c911bd
Коммит a73d5f0b83
1 изменённых файлов: 19 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,19 @@
(: Copyright (c) Microsoft Corporation.
Licensed under the MIT license. :)
(: @Language Xpp :)
(: @Category Informational :)
<T>
{
for $a in /(Class | Table | Query | Form)
for $attr in $a//AttributeList/Attribute[count(*)>=2]
for $tablestrattr in $attr/AttributeExpression/IntrinsicAttributeLiteral[lower-case(@FunctionName) = ('tablestr', 'classstr', 'querystr', 'formstr')]
for $fieldstrattr in $attr/AttributeExpression/IntrinsicAttributeLiteral[lower-case(@FunctionName) = ('methodstr', 'formmethodstr', 'tablemethodstr', 'staticmethodstr', 'tablestaticstr', 'fieldstr')]
where lower-case(tablestrattr/@Arg1) != lower-case(fielstrattr/@Arg1)
order by $a/@Artifact
return <Res Artifact='{$a/@Artifact}'
StartLine='{$attr/@StartLine}' StartCol='{$attr/@StartCol}'
EndLine='{$attr/@EndLine}' EndCol='{$attr/@EndCol}' />
}
</T>