Добавьте файлы проекта.
This commit is contained in:
19
SQLLinter/Infrastructure/Rules/LinkedServerReferenceRule.cs
Normal file
19
SQLLinter/Infrastructure/Rules/LinkedServerReferenceRule.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Microsoft.SqlServer.TransactSql.ScriptDom;
|
||||
using SQLLinter.Common;
|
||||
|
||||
namespace SQLLinter.Infrastructure.Rules;
|
||||
|
||||
public class LinkedServerReferenceRule : BaseRuleVisitor, IRule
|
||||
{
|
||||
|
||||
public override string Text => "Запрещены межсерверные запросы: {0}";
|
||||
|
||||
public override void Visit(NamedTableReference node)
|
||||
{
|
||||
if (node.SchemaObject.ServerIdentifier != null)
|
||||
{
|
||||
AddViolation(node, node.SchemaObject.ServerIdentifier.Value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user