Добавьте файлы проекта.
This commit is contained in:
18
SQLLinter/Infrastructure/Rules/ObjectPropertyRule.cs
Normal file
18
SQLLinter/Infrastructure/Rules/ObjectPropertyRule.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Microsoft.SqlServer.TransactSql.ScriptDom;
|
||||
using SQLLinter.Common;
|
||||
|
||||
namespace SQLLinter.Infrastructure.Rules;
|
||||
|
||||
public class ObjectPropertyRule : BaseRuleVisitor, IRule
|
||||
{
|
||||
|
||||
public override string Text => "Ожидается использование SYS.COLUMNS вместо функции свойства объекта.";
|
||||
|
||||
public override void Visit(FunctionCall node)
|
||||
{
|
||||
if (node.FunctionName.Value.Equals("OBJECTPROPERTY", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
AddViolation(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user