Добавьте файлы проекта.
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
using SQLLinter.Common;
|
||||
|
||||
namespace SQLLinter.Infrastructure.Rules.RuleViolations
|
||||
{
|
||||
public class RuleViolation : IRuleViolation
|
||||
{
|
||||
public RuleViolation(string fileName, string ruleName, string text, int startLine, int startColumn, RuleViolationSeverity severity)
|
||||
{
|
||||
FileName = fileName;
|
||||
RuleName = ruleName;
|
||||
Text = text;
|
||||
Line = startLine;
|
||||
Column = startColumn;
|
||||
Severity = severity;
|
||||
}
|
||||
|
||||
public RuleViolation(string fileName, string ruleName, int startLine, int startColumn)
|
||||
{
|
||||
FileName = fileName;
|
||||
RuleName = ruleName;
|
||||
Line = startLine;
|
||||
Column = startColumn;
|
||||
}
|
||||
|
||||
public RuleViolation(string ruleName, int startLine, int startColumn)
|
||||
{
|
||||
RuleName = ruleName;
|
||||
Line = startLine;
|
||||
Column = startColumn;
|
||||
}
|
||||
|
||||
public int Column { get; set; }
|
||||
|
||||
public string FileName { get; set; }
|
||||
|
||||
public int Line { get; set; }
|
||||
|
||||
public string RuleName { get; set; }
|
||||
|
||||
public RuleViolationSeverity Severity { get; set; }
|
||||
|
||||
public string Text { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $@"{Severity.ToString().ToUpper()}: L{Line} C{Column} {FileName} ""{Text}""";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user