Добавьте файлы проекта.
This commit is contained in:
17
SQLLinter/Infrastructure/Rules/IndexHintRule.cs
Normal file
17
SQLLinter/Infrastructure/Rules/IndexHintRule.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Microsoft.SqlServer.TransactSql.ScriptDom;
|
||||
using SQLLinter.Common;
|
||||
|
||||
namespace SQLLinter.Infrastructure.Rules;
|
||||
|
||||
public class IndexHintRule : BaseRuleVisitor
|
||||
{
|
||||
public override string Text => "Запрещено использование хинтов WITH (INDEX).";
|
||||
|
||||
public override void Visit(TableHint node)
|
||||
{
|
||||
if (node.HintKind == TableHintKind.Index)
|
||||
{
|
||||
AddViolation(Name, Text, GetLineNumber(node), GetColumnNumber(node));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user