добавлена оптимизированная версия нового дизайна
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using SQLLinter.Infrastructure.Diagram;
|
||||
using SQLLinter.Infrastructure.Parser;
|
||||
using SQLLinter.Infrastructure.Reporters;
|
||||
using F = SQLLinter.Infrastructure.Reporters.Formatters.Html;
|
||||
|
||||
namespace SQLLinter.CLI
|
||||
{
|
||||
@@ -56,22 +57,35 @@ namespace SQLLinter.CLI
|
||||
|
||||
using (StreamReader reader = new StreamReader(@"C:\Users\frost\Downloads\Telegram Desktop\test.sql"))
|
||||
{
|
||||
Dictionary<string, Stream> files = new Dictionary<string, Stream>
|
||||
{
|
||||
{ "test-qwewq-asdcxczc-asdsa -s--sadsasd-dsads-dsa-d-sd--dsa - 1.sql", reader.BaseStream },
|
||||
{ "test-qwewq-asdcxczc-asdsa -s--sadsasd-dsads-dsa-d-sd--dsa - 2.sql", reader.BaseStream },
|
||||
var name = "test-qwewq-asdcxczc-asdsa -s--sadsasd-dsads-dsa-d-sd--dsa - 0.sql";
|
||||
|
||||
Dictionary<string, Stream> files = new();
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
files[name + i + ".sql"] = reader.BaseStream;
|
||||
}
|
||||
|
||||
};
|
||||
linter.Run(files);
|
||||
//diagramer.Run("test.sql", reader.BaseStream);
|
||||
}
|
||||
|
||||
//linter.Run(@"C:\Users\frost\Desktop\DISTR-2599\test.sql");
|
||||
|
||||
var formatter = new HtmlReportFormatter_v2();
|
||||
IReportFormatter formatter = new F.v3.HtmlReportFormatter();
|
||||
var content = formatter.Format(rep.Violations, null);
|
||||
|
||||
File.WriteAllText(@"C:\Users\frost\Downloads\Telegram Desktop\test.html", content);
|
||||
File.WriteAllText(@"C:\Users\frost\Downloads\Telegram Desktop\test3.html", content);
|
||||
|
||||
|
||||
formatter = new F.v2.HtmlReportFormatter();
|
||||
content = formatter.Format(rep.Violations, null);
|
||||
File.WriteAllText(@"C:\Users\frost\Downloads\Telegram Desktop\test2.html", content);
|
||||
|
||||
|
||||
formatter = new F.v1.HtmlReportFormatter();
|
||||
content = formatter.Format(rep.Violations, null);
|
||||
File.WriteAllText(@"C:\Users\frost\Downloads\Telegram Desktop\test1.html", content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user