1 Commits

Author SHA1 Message Date
9abf8daf90 Исправлена проверка с глубиной подзапросов
All checks were successful
CI / build-test (push) Successful in 38s
Release / pack-and-publish (release) Successful in 40s
2025-12-08 17:35:33 +03:00
2 changed files with 4 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ namespace SQLLinter.CLI
{ {
static void Main(string[] args) static void Main(string[] args)
{ {
var rep = new MarkdownFileReporter(); var rep = new HTMLReporter();
var con = new Config() var con = new Config()
{ {
CompatibilityLevel = 170, CompatibilityLevel = 170,
@@ -45,14 +45,14 @@ namespace SQLLinter.CLI
var linter = new Linter(con, rep); var linter = new Linter(con, rep);
using (StreamReader reader = new StreamReader(@"C:\Users\frost\Desktop\DISTR-2599\test.sql")) using (StreamReader reader = new StreamReader(@"C:\Users\frost\Downloads\Telegram Desktop\tdostdetail.sql"))
{ {
linter.Run("test.sql", reader.BaseStream); linter.Run("test.sql", reader.BaseStream);
} }
//linter.Run(@"C:\Users\frost\Desktop\DISTR-2599\test.sql"); //linter.Run(@"C:\Users\frost\Desktop\DISTR-2599\test.sql");
rep.SaveReport(@"C:\Users\frost\Desktop\DISTR-2599\test.md"); rep.SaveReport(@"C:\Users\frost\Downloads\Telegram Desktop\test.html");
} }
} }
} }

View File

@@ -5,7 +5,7 @@ namespace SQLLinter.Infrastructure.Rules;
public class NestedSubqueryDepthRule : BaseRuleVisitor public class NestedSubqueryDepthRule : BaseRuleVisitor
{ {
public override string Text => "Слишком глубокие подзапросы (>" + _maxDepth + "} уровней): {0}"; public override string Text => "Слишком глубокие подзапросы (>" + _maxDepth + " уровней): {0}";
private int _depth = 0; private int _depth = 0;
private const int _maxDepth = 3; private const int _maxDepth = 3;