Изменено формирование ошибок на темплейты

This commit is contained in:
FrigaT
2025-12-26 21:52:27 +03:00
parent 3c2ee7f9a7
commit 4a0e9d7d6b
12 changed files with 52 additions and 49 deletions

View File

@@ -76,7 +76,7 @@ public class SqlRuleVisitor : IRuleVisitor
}
}
violations.ForEach(t => _reporter.ReportViolation(filePath, t.Line, t.Column, rule.Severity, t.RuleName, t.Message));
violations.ForEach(t => _reporter.ReportViolation(filePath, t.Line, t.Column, rule.Severity, t.RuleName, t.Template, t.Params));
}
private static bool VisitorIsBlackListedForDynamicSql(IRule visitor)
@@ -109,7 +109,15 @@ public class SqlRuleVisitor : IRuleVisitor
if (!globalRulesOnLine.Any())
{
_reporter.ReportViolation(new RuleViolation(sqlPath, "invalid-syntax", error.Message, error.Line, error.Column, RuleViolationSeverity.Critical));
_reporter.ReportViolation(new RuleViolation()
{
FileName = sqlPath,
RuleName = "invalid-syntax",
Text = error.Message,
Line = error.Line,
Column = error.Column,
Severity = RuleViolationSeverity.Critical
});
if (updatedExitCode)
{
continue;