mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Feature/peek def code gen (#215)
* Add codeGen for existing types * Modify code gen logic to match current code * Extend logic for new smo objects * Add logic to retrieve token type from QuickInfo * Remove duplicate types * Add tests for new types * Modify GetScript logic to use suggestions first * Add more tests * Modify codeGen to include quickInfo logic * Cake build changes to run CodeGen * CodeGen replace indentation * Refactor GetScript and add more tests * Refactor Resolver calls * Fix TestDriver test for Definition * Change quickInfo string case * Revert change sto .sln file * Fix typos in comments * change String to string * Rename test sql objects
This commit is contained in:
18
build.cake
18
build.cake
@@ -3,11 +3,13 @@
|
||||
#load "scripts/runhelpers.cake"
|
||||
#load "scripts/archiving.cake"
|
||||
#load "scripts/artifacts.cake"
|
||||
#tool "nuget:?package=Mono.TextTransform"
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Net;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Cake.Common.IO
|
||||
|
||||
// Basic arguments
|
||||
var target = Argument("target", "Default");
|
||||
@@ -258,6 +260,7 @@ Task("TestCore")
|
||||
Task("Test")
|
||||
.IsDependentOn("Setup")
|
||||
.IsDependentOn("SRGen")
|
||||
.IsDependentOn("CodeGen")
|
||||
.IsDependentOn("BuildTest")
|
||||
.Does(() =>
|
||||
{
|
||||
@@ -306,6 +309,7 @@ Task("Test")
|
||||
Task("OnlyPublish")
|
||||
.IsDependentOn("Setup")
|
||||
.IsDependentOn("SRGen")
|
||||
.IsDependentOn("CodeGen")
|
||||
.Does(() =>
|
||||
{
|
||||
var project = buildPlan.MainProject;
|
||||
@@ -541,6 +545,20 @@ Task("SRGen")
|
||||
}
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// Executes T4Template-based code generators
|
||||
/// </summary>
|
||||
Task("CodeGen")
|
||||
.Does(() =>
|
||||
{
|
||||
var t4Files = GetFiles(sourceFolder + "/**/*.tt");
|
||||
foreach(var t4Template in t4Files)
|
||||
{
|
||||
TransformTemplate(t4Template, new TextTransformSettings {});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Default Task aliases to Local.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user