├── .coby.yml
├── .gitignore
├── .nuget
└── NuGet.exe
├── BuildAndTest.cmd
├── LICENSE
├── README.md
├── SECURITY.md
└── src
├── DefaultProject
├── DefaultProject.csproj
└── Properties
│ └── AssemblyInfo.cs
├── DiffTestResults.bat
├── Nuget
└── SqlSkim.nuspec
├── Shared
└── SharedAssemblyInfo.cs
├── SqlSkim.Driver.FunctionalTests
├── BuiltInRuleFunctionalTests.cs
├── Properties
│ └── AssemblyInfo.cs
├── RulesTestData
│ ├── AvoidVariableLengthTypesOfSmallSize.sql
│ └── Expected
│ │ └── AvoidVariableLengthTypesOfSmallSize.sql.sarif
├── SqlSkim.Driver.FunctionalTests.csproj
├── UpdateBaselines.ps1
└── packages.config
├── SqlSkim.Driver.UnitTests
├── Properties
│ └── AssemblyInfo.cs
├── SqlSkim.Driver.UnitTests.csproj
├── SqlSkimTests.cs
└── packages.config
├── SqlSkim.Driver
├── AllNodesVisitor.cs
├── AnalyzeCommand.cs
├── AnalyzeOptions.cs
├── ExportConfigurationCommand.cs
├── ExportRulesCommand.cs
├── Properties
│ └── AssemblyInfo.cs
├── SqlSkim.Driver.csproj
├── SqlSkim.Driver.csproj.user
├── SqlSkim.cs
├── TSqlAnalyzer.cs
├── VisitCommand.cs
├── VisitOptions.cs
└── packages.config
├── SqlSkim.Parsers.UnitTests
├── Properties
│ └── AssemblyInfo.cs
├── SqlSkim.Parsers.UnitTests.csproj
└── packages.config
├── SqlSkim.Parsers
├── Properties
│ └── AssemblyInfo.cs
├── SqlSkim.Parsers.csproj
└── VersionConstants.cs
├── SqlSkim.Rules.UnitTests
├── Properties
│ └── AssemblyInfo.cs
├── SqlSkim.Rules.UnitTests.csproj
└── packages.config
├── SqlSkim.Rules
├── AvoidVariableLengthTypesOfSmallSize.cs
├── DefaultSqlSkimmer.cs
├── Properties
│ └── AssemblyInfo.cs
├── RemoveUnusedVariables.cs
├── RuleIds.cs
├── RuleResources.Designer.cs
├── RuleResources.resx
├── SqlSkim.Rules.csproj
└── packages.config
├── SqlSkim.Sdk.UnitTests
├── Properties
│ └── AssemblyInfo.cs
├── SqlSkim.Sdk.UnitTests.csproj
└── packages.config
├── SqlSkim.Sdk
├── AllNodesVisitor.cs
├── ExtensionMethods.cs
├── ISqlSkimmer.cs
├── Properties
│ └── AssemblyInfo.cs
├── SkimmerBase.cs
├── SqlFileContext.cs
├── SqlSkim.Sdk.csproj
└── packages.config
├── SqlSkim.sln
└── build.props
/.coby.yml:
--------------------------------------------------------------------------------
1 | solution-file-path: src/SqlSkim.sln
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.suo
2 | *.user
3 | *.userosscache
4 | *.sln.docstates
5 |
6 | # Build results
7 | bin/
8 | obj/
9 | src/packages/
10 | src/TestResults/
11 | src/SqlSkim.Driver.FunctionalTests/RulesTestData/Actual/
--------------------------------------------------------------------------------
/.nuget/NuGet.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/sqlskim/c6eeac2a8e163a6d7656728b47489ad72402a5b1/.nuget/NuGet.exe
--------------------------------------------------------------------------------
/BuildAndTest.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | SETLOCAL
3 | @REM Uncomment this line to update nuget.exe
4 | @REM Doing so can break SLN build (which uses nuget.exe to
5 | @REM create a nuget package for binskim) so must opt-in
6 | @REM %~dp0.nuget\NuGet.exe update -self
7 |
8 | set MAJOR=0
9 | set MINOR=1
10 | set PATCH=1
11 | set PRERELEASE=-beta
12 |
13 | set VERSION_CONSTANTS=src\SqlSkim.Parsers\VersionConstants.cs
14 |
15 | rd /s /q bld
16 |
17 | @REM Rewrite VersionConstants.cs
18 | echo // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT > %VERSION_CONSTANTS%
19 | echo // license. See LICENSE file in the project root for full license information. >> %VERSION_CONSTANTS%
20 | echo namespace Microsoft.CodeAnalysis.Sql >> %VERSION_CONSTANTS%
21 | echo { >> %VERSION_CONSTANTS%
22 | echo public static class VersionConstants >> %VERSION_CONSTANTS%
23 | echo { >> %VERSION_CONSTANTS%
24 | echo public const string Prerelease = "%PRERELEASE%"; >> %VERSION_CONSTANTS%
25 | echo public const string AssemblyVersion = "%MAJOR%.%MINOR%.%PATCH%"; >> %VERSION_CONSTANTS%
26 | echo public const string FileVersion = AssemblyVersion + ".0"; >> %VERSION_CONSTANTS%
27 | echo public const string Version = AssemblyVersion + Prerelease; >> %VERSION_CONSTANTS%
28 | echo } >> %VERSION_CONSTANTS%
29 | echo } >> %VERSION_CONSTANTS%
30 |
31 | %~dp0.nuget\NuGet.exe restore src\SqlSkim.sln
32 | msbuild /verbosity:minimal /target:rebuild src\SqlSkim.sln /p:Configuration=Release /p:"Platform=Any CPU"
33 | md bld\bin\nuget
34 |
35 | .nuget\NuGet.exe pack .\src\Nuget\SqlSkim.nuspec -Symbols -Properties id=Microsoft.CodeAnalysis.SqlSkim;major=%MAJOR%;minor=%MINOR%;patch=%PATCH%;prerelease=%PRERELEASE% -Verbosity Quiet -BasePath .\bld\bin\SqlSkim.Driver -OutputDirectory .\bld\bin\Nuget
36 |
37 | src\packages\xunit.runner.console.2.1.0\tools\xunit.console.x86.exe bld\bin\SqlSkim.Driver.UnitTests\AnyCpu_Release\SqlSkim.Driver.UnitTests.dll
38 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | SqlSkim
2 |
3 | Copyright (c) Microsoft Corporation
4 |
5 | All rights reserved.
6 |
7 | MIT License
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION W
14 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # sqlskim
2 | TSQL Linter and database verifier
3 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Security
4 |
5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6 |
7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
8 |
9 | ## Reporting Security Issues
10 |
11 | **Please do not report security vulnerabilities through public GitHub issues.**
12 |
13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
14 |
15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
16 |
17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
18 |
19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20 |
21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22 | * Full paths of source file(s) related to the manifestation of the issue
23 | * The location of the affected source code (tag/branch/commit or direct URL)
24 | * Any special configuration required to reproduce the issue
25 | * Step-by-step instructions to reproduce the issue
26 | * Proof-of-concept or exploit code (if possible)
27 | * Impact of the issue, including how an attacker might exploit the issue
28 |
29 | This information will help us triage your report more quickly.
30 |
31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
32 |
33 | ## Preferred Languages
34 |
35 | We prefer all communications to be in English.
36 |
37 | ## Policy
38 |
39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/DefaultProject/DefaultProject.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {REPLACEME}
5 |
6 |
7 | Microsoft.CodeAnalysis.Sql
8 |
9 |
10 | REPLACE
11 |
12 |
13 | Library
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/DefaultProject/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System.Reflection;
5 | using System.Runtime.InteropServices;
6 |
7 |
--------------------------------------------------------------------------------
/src/DiffTestResults.bat:
--------------------------------------------------------------------------------
1 |
2 |
3 | IF "%DIFF_EXE%" == "" (
4 | set DIFF_EXE="C:\Program Files\Beyond Compare 4\BComp.exe"
5 | )
6 |
7 | %DIFF_EXE% SqlSkim.Driver.FunctionalTests\RulesTestData\Expected SqlSkim.Driver.FunctionalTests\RulesTestData\Actual /title1=Expected /title2=Actual
--------------------------------------------------------------------------------
/src/Nuget/SqlSkim.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $id$
5 | $major$.$minor$.$patch$$prerelease$
6 | Microsoft SqlSkim Analysis Tools
7 | Michael C. Fanning,David Brookler,Nick Guerrera,
8 | Michael C. Fanning
9 | false
10 | A database and TSQL checker
11 | Version $major$.$minor$.$patch$$prerelease$ of SqlSkim
12 | Copyright Microsoft 2015
13 | https://github.com/microsoft/sqlskim/blob/master/LICENSE
14 | https://github.com/microsoft/sqlskim
15 | sql tsql linter security
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/Shared/SharedAssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System.Reflection;
5 | using System.Runtime.CompilerServices;
6 | using System.Runtime.InteropServices;
7 |
8 | [assembly: AssemblyVersion(Microsoft.CodeAnalysis.Sql.VersionConstants.AssemblyVersion)]
9 | [assembly: AssemblyFileVersion(Microsoft.CodeAnalysis.Sql.VersionConstants.FileVersion)]
10 |
11 | [assembly: AssemblyProduct("SqlSkim SQL Analyzer")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyCopyright("")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | // Setting ComVisible to false makes the types in this assembly not visible
19 | // to COM components. If you need to access a type in this assembly from
20 | // COM, set the ComVisible attribute to true on that type.
21 | [assembly: ComVisible(false)]
22 |
23 | [assembly: InternalsVisibleTo("SqlSkim")]
24 | [assembly: InternalsVisibleTo("SqlSkim.Sdk.UnitTests")]
25 | [assembly: InternalsVisibleTo("SqlSkim.Rules.UnitTests")]
26 | [assembly: InternalsVisibleTo("SqlSkim.Driver.UnitTests")]
27 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver.FunctionalTests/BuiltInRuleFunctionalTests.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Globalization;
7 | using System.IO;
8 | using System.Reflection;
9 | using System.Text;
10 | using Microsoft.CodeAnalysis.Sarif.Readers;
11 | using Microsoft.CodeAnalysis.Sarif.Sdk;
12 | using Newtonsoft.Json;
13 | using Xunit;
14 | using Xunit.Abstractions;
15 |
16 | namespace Microsoft.CodeAnalysis.Sql
17 | {
18 | public class BuiltInRuleFunctionalTests
19 | {
20 | private readonly ITestOutputHelper _testOutputHelper;
21 |
22 | public BuiltInRuleFunctionalTests(ITestOutputHelper output)
23 | {
24 | _testOutputHelper = output;
25 | }
26 |
27 | private static string TestDirectory = GetTestDirectory(@"SqlSkim.Driver.FunctionalTests\RulesTestData");
28 |
29 | private static string GetTestDirectory(string relativeDirectory)
30 | {
31 | var codeBaseUrl = new Uri(Assembly.GetExecutingAssembly().CodeBase);
32 | var codeBasePath = Uri.UnescapeDataString(codeBaseUrl.AbsolutePath);
33 | var dirPath = Path.GetDirectoryName(codeBasePath);
34 | dirPath = Path.Combine(dirPath, @"..\..\..\..\src\");
35 | dirPath = Path.GetFullPath(dirPath);
36 | return Path.Combine(dirPath, relativeDirectory);
37 | }
38 |
39 | [Fact]
40 | public void Driver_BuiltInRuleFunctionalTests()
41 | {
42 | BatchRuleRules(string.Empty, "*.sql");
43 | }
44 |
45 | private void BatchRuleRules(string ruleName, string inputFilter)
46 | {
47 | var sb = new StringBuilder();
48 |
49 | string testDirectory = BuiltInRuleFunctionalTests.TestDirectory + "\\" + ruleName;
50 | string[] testFiles = Directory.GetFiles(testDirectory, inputFilter);
51 |
52 | foreach (string file in testFiles)
53 | {
54 | RunRules(sb, file);
55 | }
56 |
57 | if (sb.Length == 0)
58 | {
59 | // Test passes
60 | return;
61 | }
62 |
63 | string rebaselineMessage = "If the actual output is expected, generate new baselines by executing `UpdateBaselines.ps1` from a PS command prompt.";
64 | sb.AppendLine(String.Format(CultureInfo.CurrentCulture, rebaselineMessage));
65 |
66 | if (sb.Length > 0)
67 | {
68 | sb.AppendLine();
69 | sb.AppendLine("Run the following to all test baselines vs. actual results:");
70 | sb.AppendLine(GenerateDiffCommand(
71 | Path.Combine(testDirectory, "Expected"),
72 | Path.Combine(testDirectory, "Actual")));
73 | _testOutputHelper.WriteLine(sb.ToString());
74 | }
75 |
76 | Assert.Equal(0, sb.Length);
77 | }
78 |
79 | private void RunRules(StringBuilder sb, string inputFileName)
80 | {
81 | string fileName = Path.GetFileName(inputFileName);
82 | string actualDirectory = Path.Combine(Path.GetDirectoryName(inputFileName), "Actual");
83 | string expectedDirectory = Path.Combine(Path.GetDirectoryName(inputFileName), "Expected");
84 |
85 | if (Directory.Exists(actualDirectory))
86 | {
87 | Directory.Delete(actualDirectory, true);
88 | }
89 | Directory.CreateDirectory(actualDirectory);
90 |
91 | string expectedFileName = Path.Combine(expectedDirectory, fileName + ".sarif");
92 | string actualFileName = Path.Combine(actualDirectory, fileName + ".sarif");
93 |
94 | AnalyzeCommand command = new AnalyzeCommand();
95 | AnalyzeOptions options = new AnalyzeOptions();
96 |
97 | options.TargetFileSpecifiers = new string[] { inputFileName };
98 | options.OutputFilePath = actualFileName;
99 | options.Verbose = true;
100 | options.Recurse = false;
101 | options.ConfigurationFilePath = "default";
102 |
103 | int result = command.Run(options);
104 |
105 | Assert.Equal(0, result);
106 |
107 | JsonSerializerSettings settings = new JsonSerializerSettings()
108 | {
109 | ContractResolver = SarifContractResolver.Instance,
110 | Formatting = Formatting.Indented
111 | };
112 |
113 | string expectedText = File.ReadAllText(expectedFileName);
114 | string actualText = File.ReadAllText(actualFileName);
115 |
116 | // Make sure we can successfully deserialize what was just generated
117 | ResultLog expectedLog = JsonConvert.DeserializeObject(expectedText, settings);
118 | ResultLog actualLog = JsonConvert.DeserializeObject(actualText, settings);
119 |
120 | var visitor = new ResultDiffingVisitor(expectedLog);
121 |
122 | if (!visitor.Diff(actualLog.RunLogs[0].Results))
123 | {
124 | string errorMessage = "The output of the tool did not match for input {0}.";
125 | sb.AppendLine(String.Format(CultureInfo.CurrentCulture, errorMessage, inputFileName));
126 | sb.AppendLine("Check differences with:");
127 | sb.AppendLine(GenerateDiffCommand(expectedFileName, actualFileName));
128 | }
129 | }
130 |
131 | private string GenerateDiffCommand(string expected, string actual)
132 | {
133 | expected = Path.GetFullPath(expected);
134 | actual = Path.GetFullPath(actual);
135 |
136 | string beyondCompare = TryFindBeyondCompare();
137 | if (beyondCompare != null)
138 | {
139 | return String.Format(CultureInfo.InvariantCulture, "\"{0}\" \"{1}\" \"{2}\" /title1=Expected /title2=Actual", beyondCompare, expected, actual);
140 | }
141 |
142 | return String.Format(CultureInfo.InvariantCulture, "tfsodd \"{0}\" \"{1}\"", expected, actual);
143 | }
144 |
145 | private static string TryFindBeyondCompare()
146 | {
147 | List directories = new List();
148 | string programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86);
149 |
150 | directories.Add(programFiles);
151 | directories.Add(programFiles.Replace(" (x86)", ""));
152 |
153 | foreach (string directory in directories)
154 | {
155 | for (int idx = 4; idx >= 3; --idx)
156 | {
157 | string beyondComparePath = String.Format(CultureInfo.InvariantCulture, "{0}\\Beyond Compare {1}\\BComp.exe", directory, idx);
158 | if (File.Exists(beyondComparePath))
159 | {
160 | return beyondComparePath;
161 | }
162 | }
163 |
164 | string beyondCompare2Path = programFiles + "\\Beyond Compare 2\\BC2.exe";
165 | if (File.Exists(beyondCompare2Path))
166 | {
167 | return beyondCompare2Path;
168 | }
169 | }
170 |
171 | return null;
172 | }
173 | }
174 | }
175 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver.FunctionalTests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver.FunctionalTests/RulesTestData/AvoidVariableLengthTypesOfSmallSize.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE [dbo].[TableWithWarning]
2 | (
3 | [ID] INT NOT NULL IDENTITY(0, 1),
4 | [c1] INT NOT NULL PRIMARY KEY,
5 | [c2] INT,
6 | [c3] INT,
7 | [SmallBinary] VARBINARY(1),
8 | [SmallUnicodeString] NVARCHAR (1),
9 | [SmallString] VARCHAR(2)
10 | )
11 | ON [PRIMARY]
12 |
13 | CREATE TABLE [dbo].[FixedTable]
14 | (
15 | [ID] INT NOT NULL IDENTITY(0, 1),
16 | [c1] INT NOT NULL PRIMARY KEY,
17 | [c2] INT,
18 | [c3] INT,
19 | [SmallBinary] VARBINARY(10),
20 | [SmallUnicodeString] NVARCHAR (3),
21 | [SmallString] VARCHAR(41))
22 | ON [PRIMARY]
--------------------------------------------------------------------------------
/src/SqlSkim.Driver.FunctionalTests/RulesTestData/Expected/AvoidVariableLengthTypesOfSmallSize.sql.sarif:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.4",
3 | "runLogs": [
4 | {
5 | "toolInfo": {
6 | "name": "SqlSkim",
7 | "fullName": "SqlSkim 0.1.0-beta",
8 | "version": "0.1.0"
9 | },
10 | "runInfo": {
11 | "invocationInfo": "\"D:\\src\\sqlskim-ms\\bld\\bin\\SqlSkim.Driver\\AnyCPU_Release\\SqlSkim.exe\" analyze D:\\src\\sqlskim-ms\\src\\SqlSkim.Driver.FunctionalTests\\RulesTestData\\AvoidVariableLengthTypesOfSmallSize.sql --output D:\\src\\sqlskim-ms\\src\\SqlSkim.Driver.FunctionalTests\\RulesTestData\\Expected\\AvoidVariableLengthTypesOfSmallSize.sql.sarif.temp --verbose --config default",
12 | "analysisTargets": [
13 | {
14 | "uri": "file:///D:/src/sqlskim-ms/src/SqlSkim.Driver.FunctionalTests/RulesTestData/AvoidVariableLengthTypesOfSmallSize.sql"
15 | }
16 | ]
17 | },
18 | "results": [
19 | {
20 | "ruleId": "MSG1001",
21 | "kind": "note",
22 | "formattedMessage": {
23 | "specifierId": "AnalyzingTarget",
24 | "arguments": [
25 | "AvoidVariableLengthTypesOfSmallSize.sql"
26 | ]
27 | },
28 | "locations": [
29 | {
30 | "analysisTarget": [
31 | {
32 | "uri": "file:///D:/src/sqlskim-ms/src/SqlSkim.Driver.FunctionalTests/RulesTestData/AvoidVariableLengthTypesOfSmallSize.sql",
33 | "mimeType": "application/octet-stream"
34 | }
35 | ]
36 | }
37 | ]
38 | },
39 | {
40 | "ruleId": "SQL2009",
41 | "kind": "warning",
42 | "formattedMessage": {
43 | "specifierId": "Default",
44 | "arguments": [
45 | "SmallBinary",
46 | "VarBinary",
47 | "1"
48 | ]
49 | },
50 | "locations": [
51 | {
52 | "analysisTarget": [
53 | {
54 | "uri": "file:///D:/src/sqlskim-ms/src/SqlSkim.Driver.FunctionalTests/RulesTestData/AvoidVariableLengthTypesOfSmallSize.sql",
55 | "mimeType": "application/octet-stream",
56 | "region": {
57 | "startLine": 7,
58 | "startColumn": 15,
59 | "endColumn": 27
60 | }
61 | }
62 | ]
63 | }
64 | ]
65 | },
66 | {
67 | "ruleId": "SQL2009",
68 | "kind": "warning",
69 | "formattedMessage": {
70 | "specifierId": "Default",
71 | "arguments": [
72 | "SmallUnicodeString",
73 | "NVarChar",
74 | "1"
75 | ]
76 | },
77 | "locations": [
78 | {
79 | "analysisTarget": [
80 | {
81 | "uri": "file:///D:/src/sqlskim-ms/src/SqlSkim.Driver.FunctionalTests/RulesTestData/AvoidVariableLengthTypesOfSmallSize.sql",
82 | "mimeType": "application/octet-stream",
83 | "region": {
84 | "startLine": 8,
85 | "startColumn": 22,
86 | "endColumn": 34
87 | }
88 | }
89 | ]
90 | }
91 | ]
92 | },
93 | {
94 | "ruleId": "SQL2009",
95 | "kind": "warning",
96 | "formattedMessage": {
97 | "specifierId": "Default",
98 | "arguments": [
99 | "SmallString",
100 | "VarChar",
101 | "2"
102 | ]
103 | },
104 | "locations": [
105 | {
106 | "analysisTarget": [
107 | {
108 | "uri": "file:///D:/src/sqlskim-ms/src/SqlSkim.Driver.FunctionalTests/RulesTestData/AvoidVariableLengthTypesOfSmallSize.sql",
109 | "mimeType": "application/octet-stream",
110 | "region": {
111 | "startLine": 9,
112 | "startColumn": 15,
113 | "endColumn": 25
114 | }
115 | }
116 | ]
117 | }
118 | ]
119 | }
120 | ],
121 | "ruleInfo": [
122 | {
123 | "id": "MSG1001",
124 | "name": "GeneralMessage",
125 | "fullDescription": "An informational output message was logged.",
126 | "formatSpecifiers": {
127 | "Default": "{0}",
128 | "AnalyzingTarget": "Analyzing '{0}'..."
129 | }
130 | },
131 | {
132 | "id": "SQL2009",
133 | "name": "AvoidVariableLengthTypesOfSmallSize",
134 | "shortDescription": "When you use data types of variable length such as VARCHAR, NVARCHAR, and VARBINARY, you incur an additional storage cost to track the length of the value stored in the data type.",
135 | "fullDescription": "When you use data types of variable length such as VARCHAR, NVARCHAR, and VARBINARY, you incur an additional storage cost to track the length of the value stored in the data type. In addition, columns of variable length are stored after all columns of fixed length, which can have performance implications. This rule also fires in cases where a type of variable length, such as VARCHAR, is declared with no explicit length. In this case, if specified, the default length is 1. Note that data for types of variable length is physically stored after data for types of fixed length. Therefore, you will cause data movement if you change a column from variable to fixed length in a table that is not empty.",
136 | "options": {},
137 | "formatSpecifiers": {
138 | "Default": "The data type for column '{0}' was defined as type {1} of size ({2}) which may incur additional storage and performance costs over a fixed length type. Declare this column as a fixed size data type or ignore the warning if performance is not a concern."
139 | }
140 | }
141 | ]
142 | }
143 | ]
144 | }
--------------------------------------------------------------------------------
/src/SqlSkim.Driver.FunctionalTests/SqlSkim.Driver.FunctionalTests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {9E73C78B-DBE2-4ED1-888F-6610F0E73E70}
6 |
7 |
8 |
9 |
10 | Microsoft.CodeAnalysis.Sql
11 |
12 |
13 | SqlSkim.Driver.UnitTests
14 |
15 |
16 | Library
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | ..\packages\Newtonsoft.Json.8.0.1\lib\net45\Newtonsoft.Json.dll
25 | True
26 |
27 |
28 | ..\packages\Sarif.Sdk.1.4.23-beta\lib\net40\Sarif.dll
29 | True
30 |
31 |
32 | ..\packages\Sarif.Driver.1.4.23-beta\lib\net40\Sarif.Driver.dll
33 | True
34 |
35 |
36 |
37 |
38 |
39 |
40 | ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll
41 | True
42 |
43 |
44 | ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll
45 | True
46 |
47 |
48 | ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll
49 | True
50 |
51 |
52 | ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll
53 | True
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | {8f4bdd7a-cf06-4d41-8d0e-c78aa055c759}
64 | SqlSkim.Driver
65 |
66 |
67 | {d87c16f2-a31e-43df-9657-854add3b39d9}
68 | SqlSkim.Parsers
69 |
70 |
71 | {d5a40e1a-89b9-42ad-a136-c512896a9bc8}
72 | SqlSkim.Sdk
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver.FunctionalTests/UpdateBaselines.ps1:
--------------------------------------------------------------------------------
1 | Param(
2 | [string]$RuleName
3 | )
4 |
5 | $tool = "SqlSkim"
6 | $utility = "$PSScriptRoot\..\..\bld\bin\$tool.Driver\AnyCPU_Release\SqlSkim.exe"
7 | $sourceExtension = "sql"
8 |
9 | function Build-Tool()
10 | {
11 | Write-Host "Building the tool..." -NoNewline
12 | # Out-Null *and* /noconsolelogger here because our scripts call out to batch files and similar
13 | # that don't respect msbuild's /noconsolelogger switch.
14 | msbuild $PSScriptRoot\..\$tool.Driver\$tool.Driver.csproj /p:"Platform=AnyCPU`;Configuration=Release" /m
15 | Write-Host " done."
16 | }
17 |
18 | function Build-Baselines($rulename)
19 | {
20 | Write-Host "Building baselines..."
21 | $expectedDirectory = Join-Path "$PSScriptRoot\RulesTestData" $ruleName
22 | $expectedDirectory = Join-Path $expectedDirectory "Expected"
23 | $testsDirectory = "$PSScriptRoot\RulesTestData\"
24 | $sourceExtension = "*.$sourceExtension"
25 | Get-ChildItem $testsDirectory -Filter $sourceExtension | ForEach-Object {
26 | Write-Host " $_ -> $_.sarif"
27 | $input = $_.FullName
28 | $outputFile = $_.Name
29 | $output = Join-Path $expectedDirectory "$outputFile.sarif"
30 | $outputTemp = "$output.temp"
31 |
32 | # Actually run the tool
33 | Remove-Item $outputTemp -ErrorAction SilentlyContinue
34 | &$utility analyze "$input" --output "$outputTemp" --verbose --config default
35 |
36 | Move-Item $outputTemp $output -Force
37 | }
38 | }
39 |
40 | $allTools = (Get-ChildItem "$PSScriptRootRulesTestData" -Directory | ForEach-Object { $_.Name })
41 |
42 | Build-Tool
43 |
44 | Build-Baselines $_
45 |
46 | Write-Host "Finished! Terminate."
47 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver.FunctionalTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver.UnitTests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver.UnitTests/SqlSkim.Driver.UnitTests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {14E3D312-9871-4784-B312-0345536B3D1D}
6 |
7 |
8 |
9 |
10 | Microsoft.CodeAnalysis.Sql
11 |
12 |
13 | SqlSkim.Driver.UnitTests
14 |
15 |
16 | Library
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll
29 | True
30 |
31 |
32 | ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll
33 | True
34 |
35 |
36 | ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll
37 | True
38 |
39 |
40 | ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll
41 | True
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | {8f4bdd7a-cf06-4d41-8d0e-c78aa055c759}
52 | SqlSkim.Driver
53 |
54 |
55 | {d87c16f2-a31e-43df-9657-854add3b39d9}
56 | SqlSkim.Parsers
57 |
58 |
59 | {d5a40e1a-89b9-42ad-a136-c512896a9bc8}
60 | SqlSkim.Sdk
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver.UnitTests/SqlSkimTests.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using Xunit;
5 |
6 | namespace Microsoft.CodeAnalysis.Sql
7 | {
8 | public class SqlSkimTests
9 | {
10 | [Fact]
11 | public void Driver_MainWithNoArgsFails()
12 | {
13 | Assert.Equal(1, SqlSkim.Main(new string[] { }));
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver.UnitTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver/AnalyzeCommand.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Reflection;
7 |
8 | using Microsoft.CodeAnalysis.Sarif.Driver.Sdk;
9 | using Microsoft.CodeAnalysis.Sql.Rules;
10 | using Microsoft.CodeAnalysis.Sql.Sdk;
11 | using Microsoft.SqlServer.TransactSql.ScriptDom;
12 |
13 | namespace Microsoft.CodeAnalysis.Sql
14 | {
15 | public class AnalyzeCommand : AnalyzeCommandBase
16 | {
17 | // No tool-specific function as yet, so only verbose 'analyzing file'
18 | // output indicates tool is functioning.
19 | //
20 | // e.g.: sqlsqim analyze c:\test\*.sql --verbose
21 |
22 | public override IEnumerable DefaultPlugInAssemblies
23 | {
24 | get
25 | {
26 | return new Assembly[] {
27 | typeof(AvoidVariableLengthTypesOfSmallSize).Assembly
28 | };
29 | }
30 | }
31 |
32 | public override string Prerelease { get { return VersionConstants.Prerelease; } }
33 |
34 | protected override void AnalyzeTarget(IEnumerable> skimmers, SqlFileContext context, HashSet disabledSkimmers)
35 | {
36 | TSqlFragment tsqlFragment;
37 |
38 | IList parseErrors = context.TryGetTSqlFragment(out tsqlFragment);
39 |
40 | if (parseErrors.Count > 0)
41 | {
42 | foreach (ParseError parseError in parseErrors)
43 | {
44 | Errors.LogTargetParseError(context, parseError.CreateRegion(), parseError.Message);
45 | }
46 | return;
47 | }
48 |
49 | context.Fragment = tsqlFragment;
50 |
51 | TSqlAnalyzer analyzer = new TSqlAnalyzer(skimmers, disabledSkimmers);
52 | analyzer.Analyze(context);
53 |
54 | RuntimeErrors |= analyzer.RuntimeErrors;
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver/AnalyzeOptions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System.Collections.Generic;
5 |
6 | using CommandLine;
7 |
8 | using Microsoft.CodeAnalysis.Sarif.Driver.Sdk;
9 |
10 | namespace Microsoft.CodeAnalysis.Sql
11 | {
12 | [Verb("analyze", HelpText = "Analyze one or more SQl files for security and correctness issues.")]
13 | public class AnalyzeOptions : AnalyzeOptionsBase
14 | {
15 | // We currently implement no options over the base configuration
16 | }
17 | }
--------------------------------------------------------------------------------
/src/SqlSkim.Driver/ExportConfigurationCommand.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System.Collections.Generic;
5 | using System.Reflection;
6 |
7 | using Microsoft.CodeAnalysis.Sql.Rules;
8 | using Microsoft.CodeAnalysis.Sarif.Driver.Sdk;
9 |
10 | namespace Microsoft.CodeAnalysis.Sql
11 | {
12 | internal class ExportConfigurationCommand : ExportConfigurationCommandBase
13 | {
14 | public override IEnumerable DefaultPlugInAssemblies
15 | {
16 | get
17 | {
18 | return new Assembly[] {
19 | typeof(AvoidVariableLengthTypesOfSmallSize).Assembly
20 | };
21 | }
22 | }
23 |
24 | public override string Prerelease { get; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver/ExportRulesCommand.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System.Collections.Generic;
5 | using System.Reflection;
6 |
7 | using Microsoft.CodeAnalysis.Sarif.Driver.Sdk;
8 | using Microsoft.CodeAnalysis.Sql.Rules;
9 |
10 | namespace Microsoft.CodeAnalysis.Sql
11 | {
12 | internal class ExportRulesMetadataCommand : ExportRulesMetadataCommandBase
13 | {
14 | public override IEnumerable DefaultPlugInAssemblies
15 | {
16 | get
17 | {
18 | return new Assembly[] {
19 | typeof(AvoidVariableLengthTypesOfSmallSize).Assembly
20 | };
21 | }
22 | }
23 |
24 | public override string Prerelease { get { return VersionConstants.Prerelease; } }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver/SqlSkim.Driver.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {8F4BDD7A-CF06-4D41-8D0E-C78AA055C759}
5 |
6 |
7 | Microsoft.CodeAnalysis.Sql
8 |
9 |
10 | SqlSkim
11 |
12 |
13 |
14 |
15 |
16 | false
17 |
18 |
19 | false
20 | false
21 |
22 |
23 |
24 |
25 | ..\packages\CommandLineParser.2.0.275-beta\lib\net45\CommandLine.dll
26 | True
27 |
28 |
29 | ..\packages\Microsoft.SqlServer.TransactSql.ScriptDom.12.0.1\lib\net40\Microsoft.SqlServer.TransactSql.ScriptDom.dll
30 | True
31 |
32 |
33 | ..\packages\Newtonsoft.Json.8.0.1\lib\net45\Newtonsoft.Json.dll
34 | True
35 |
36 |
37 | ..\packages\Sarif.Sdk.1.4.23-beta\lib\net40\Sarif.dll
38 | True
39 |
40 |
41 | ..\packages\Sarif.Driver.1.4.23-beta\lib\net40\Sarif.Driver.dll
42 | True
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | {d87c16f2-a31e-43df-9657-854add3b39d9}
68 | SqlSkim.Parsers
69 |
70 |
71 | {1f1583ab-55fd-41b8-9b18-53d4f4b9c552}
72 | SqlSkim.Rules
73 |
74 |
75 | {d5a40e1a-89b9-42ad-a136-c512896a9bc8}
76 | SqlSkim.Sdk
77 |
78 |
79 |
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver/SqlSkim.Driver.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | exportRules d:\repros\sqlskim.rules.xml
5 |
6 |
7 | analyze d:\repros\test.sql --config default
8 |
9 |
10 | analyze --config default d:\repros\test.sql --verbose -o out.sarif
11 |
12 |
13 | analyze "d:\src\sqlskim-ms\src\SqlSkim.Driver.FunctionalTests\RulesTestData\AvoidVariableLengthTypesOfSmallSize.sql"
14 |
15 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver/SqlSkim.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using CommandLine;
5 |
6 | using Microsoft.CodeAnalysis.Sarif.Driver.Sdk;
7 |
8 | namespace Microsoft.CodeAnalysis.Sql
9 | {
10 | internal class SqlSkim
11 | {
12 | internal static int Main(string[] args)
13 | {
14 | return Parser.Default.ParseArguments<
15 | VisitOptions,
16 | AnalyzeOptions,
17 | ExportConfigurationOptions,
18 | ExportRulesMetadataOptions>(args)
19 | .MapResult(
20 | (VisitOptions visitOptions) => new VisitCommand().Run(visitOptions),
21 | (AnalyzeOptions analyzeOptions) => new AnalyzeCommand().Run(analyzeOptions),
22 | (ExportConfigurationOptions exportConfigurationOptions) => new ExportConfigurationCommand().Run(exportConfigurationOptions),
23 | (ExportRulesMetadataOptions exportRulesMetadataOptions) => new ExportRulesMetadataCommand().Run(exportRulesMetadataOptions),
24 | errs => 1);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver/TSqlAnalyzer.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using Microsoft.CodeAnalysis.Sarif.Driver.Sdk;
7 | using Microsoft.SqlServer.TransactSql.ScriptDom;
8 |
9 | namespace Microsoft.CodeAnalysis.Sql.Sdk
10 | {
11 | public class TSqlAnalyzer
12 | {
13 | HashSet disabledSkimmers;
14 | Dictionary>> typeToSkimmersMap;
15 |
16 | public RuntimeConditions RuntimeErrors { get; set; }
17 |
18 | public TSqlAnalyzer(IEnumerable> skimmers, HashSet disabledSkimmers)
19 | {
20 | this.disabledSkimmers = disabledSkimmers;
21 | this.typeToSkimmersMap = new Dictionary>>();
22 |
23 | foreach (ISqlSkimmer skimmer in skimmers)
24 | {
25 | if (disabledSkimmers.Contains(skimmer.Id)) { continue; }
26 |
27 | foreach (Type type in skimmer.Types)
28 | {
29 | List> skimmersList;
30 |
31 | if (!this.typeToSkimmersMap.TryGetValue(type, out skimmersList))
32 | {
33 | skimmersList = this.typeToSkimmersMap[type] = new List>();
34 | }
35 | skimmersList.Add(skimmer);
36 | }
37 | }
38 | }
39 |
40 | public void Analyze(SqlFileContext context)
41 | {
42 | var visitor = new AllNodesVisitor(
43 | (node) =>
44 | {
45 | List> skimmersList;
46 |
47 | if (node == null) { return; }
48 |
49 | if (this.typeToSkimmersMap.TryGetValue(node.GetType(), out skimmersList))
50 | {
51 | foreach (ISqlSkimmer skimmer in skimmersList)
52 | {
53 | context.Fragment = node;
54 | try
55 | {
56 | skimmer.Analyze(context);
57 | }
58 | catch (Exception ex)
59 | {
60 | RuntimeErrors |= AnalyzeCommand.LogUnhandledRuleExceptionAnalyzingTarget(
61 | this.disabledSkimmers,
62 | context,
63 | skimmer,
64 | ex);
65 | }
66 | }
67 | }
68 | }
69 | );
70 | context.Fragment.Accept(visitor);
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver/VisitOptions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using CommandLine;
5 |
6 | namespace Microsoft.CodeAnalysis.Sql
7 | {
8 | [Verb("visit", HelpText = "Visit a TSQL file and dump its structure to console.")]
9 | public class VisitOptions
10 | {
11 | [Value(0,
12 | HelpText = "A path to a TSQL file.")]
13 | public string FilePath { get; internal set; }
14 | }
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/src/SqlSkim.Driver/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/SqlSkim.Parsers.UnitTests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System.Reflection;
5 | using System.Runtime.InteropServices;
6 |
7 |
--------------------------------------------------------------------------------
/src/SqlSkim.Parsers.UnitTests/SqlSkim.Parsers.UnitTests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {E838EC9E-505D-4C34-9CF8-4AF754710CE3}
6 |
7 |
8 |
9 |
10 | Microsoft.CodeAnalysis.Sql
11 |
12 |
13 | SqlSkim.Parsers.UnitTests
14 |
15 |
16 | Library
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll
29 | True
30 |
31 |
32 | ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll
33 | True
34 |
35 |
36 | ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll
37 | True
38 |
39 |
40 | ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll
41 | True
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | {d87c16f2-a31e-43df-9657-854add3b39d9}
51 | SqlSkim.Parsers
52 |
53 |
54 | {d5a40e1a-89b9-42ad-a136-c512896a9bc8}
55 | SqlSkim.Sdk
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/src/SqlSkim.Parsers.UnitTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/SqlSkim.Parsers/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/SqlSkim.Parsers/SqlSkim.Parsers.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {D87C16F2-A31E-43DF-9657-854ADD3B39D9}
5 |
6 |
7 | Microsoft.CodeAnalysis.Sql
8 |
9 |
10 | SqlSkim.Parsers
11 |
12 |
13 |
14 |
15 |
16 | Library
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/SqlSkim.Parsers/VersionConstants.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT
2 | // license. See LICENSE file in the project root for full license information.
3 | namespace Microsoft.CodeAnalysis.Sql
4 | {
5 | public static class VersionConstants
6 | {
7 | public const string Prerelease = "-beta";
8 | public const string AssemblyVersion = "0.1.1";
9 | public const string FileVersion = AssemblyVersion + ".0";
10 | public const string Version = AssemblyVersion + Prerelease;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/SqlSkim.Rules.UnitTests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System.Reflection;
5 | using System.Runtime.InteropServices;
6 |
7 |
--------------------------------------------------------------------------------
/src/SqlSkim.Rules.UnitTests/SqlSkim.Rules.UnitTests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {477AE8D6-2D38-4B85-90A9-E869AAA9D1FD}
6 |
7 |
8 |
9 |
10 | Microsoft.CodeAnalysis.Sql
11 |
12 |
13 | SqlSkim.Rules.UnitTests
14 |
15 |
16 | Library
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | ..\packages\Newtonsoft.Json.8.0.1\lib\net45\Newtonsoft.Json.dll
25 | True
26 |
27 |
28 | ..\packages\Sarif.Sdk.1.4.23-beta\lib\net40\Sarif.dll
29 | True
30 |
31 |
32 | ..\packages\Sarif.Driver.1.4.23-beta\lib\net40\Sarif.Driver.dll
33 | True
34 |
35 |
36 |
37 |
38 |
39 |
40 | ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll
41 | True
42 |
43 |
44 | ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll
45 | True
46 |
47 |
48 | ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll
49 | True
50 |
51 |
52 | ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll
53 | True
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | {d87c16f2-a31e-43df-9657-854add3b39d9}
63 | SqlSkim.Parsers
64 |
65 |
66 | {d5a40e1a-89b9-42ad-a136-c512896a9bc8}
67 | SqlSkim.Sdk
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/src/SqlSkim.Rules.UnitTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/SqlSkim.Rules/AvoidVariableLengthTypesOfSmallSize.cs:
--------------------------------------------------------------------------------
1 | // Copyright(c) Microsoft.All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Composition;
8 |
9 | using Microsoft.CodeAnalysis.Sarif.Driver.Sdk;
10 | using Microsoft.CodeAnalysis.Sarif.Sdk;
11 | using Microsoft.CodeAnalysis.Sql.Sdk;
12 | using Microsoft.SqlServer.TransactSql.ScriptDom;
13 |
14 | namespace Microsoft.CodeAnalysis.Sql.Rules
15 | {
16 | [Export(typeof(ISkimmer)), Export(typeof(IRuleDescriptor)), Export(typeof(IOptionsProvider))]
17 | public class AvoidVariableLengthTypesOfSmallSize : DefaultSqlSkimmer, IOptionsProvider
18 | {
19 | ///
20 | /// SQL2009
21 | ///
22 | public override string Id { get { return RuleIds.AvoidVariableLengthTypesOfSmallSize; } }
23 |
24 | ///
25 | /// SQL2009: When you use data types of variable length such as VARCHAR, NVARCHAR, and
26 | /// VARBINARY, you incur an additional storage cost to track the length of the value
27 | /// stored in the data type. In addition, columns of variable length are stored after all
28 | /// columns of fixed length, which can have performance implications. This rule also fires
29 | /// in cases where a type of variable length, such as VARCHAR, is declared with no explicit
30 | /// length. In this case, if specified, the default length is 1. Note that data for types
31 | /// of variable length is physically stored after data for types of fixed length. Therefore,
32 | /// you will cause data movement if you change a column from variable to fixed length in
33 | /// a table that is not empty.
34 | ///
35 | public override string FullDescription { get { return RuleResources.SQL2009_AvoidVariableLengthTypesOfSmallSize_Description; } }
36 |
37 | protected override IEnumerable FormatSpecifierIds
38 | {
39 | get
40 | {
41 | return new string[] { nameof(RuleResources.SQL2009_Default) };
42 | }
43 | }
44 |
45 | public IEnumerable GetOptions()
46 | {
47 | return new List
48 | {
49 | SmallSizeThreshold,
50 | }.ToImmutableArray();
51 | }
52 |
53 | private const string AnalyzerName = RuleIds.AvoidVariableLengthTypesOfSmallSize + "." + nameof(AvoidVariableLengthTypesOfSmallSize);
54 |
55 | ///
56 | // An inclusive integer value that specifies the upper-bound of what is regarded as a type
57 | // of small size. A value of 2, for example, configures analysis to regard any type of size
58 | // 1 or 2 to be regarded as small.
59 | ///
60 | public static PerLanguageOption SmallSizeThreshold { get; } =
61 | new PerLanguageOption(
62 | AnalyzerName,
63 | nameof(SmallSizeThreshold),
64 | defaultValue: () => { return 2; },
65 | description: RuleResources.SQL2009_SmallSizeThreshold_Description);
66 |
67 | public override AnalysisApplicability CanAnalyze(SqlFileContext context, out string reasonIfNotApplicable)
68 | {
69 | reasonIfNotApplicable = null;
70 | AnalysisApplicability result = AnalysisApplicability.ApplicableToSpecifiedTarget;
71 | if (context.Policy == null)
72 | {
73 | reasonIfNotApplicable = RuleResources.SQL2009_MissingConfig;
74 | result = AnalysisApplicability.NotApplicableDueToMissingConfiguration;
75 | }
76 | return result;
77 | }
78 |
79 | public override void Analyze(SqlFileContext context)
80 | {
81 | ColumnDefinition node = (ColumnDefinition)context.Fragment;
82 |
83 | SqlDataTypeReference sdtr = node.DataType as SqlDataTypeReference;
84 | if (sdtr == null) { return; }
85 |
86 | if (sdtr.SqlDataTypeOption != SqlDataTypeOption.VarBinary &&
87 | sdtr.SqlDataTypeOption != SqlDataTypeOption.VarChar &&
88 | sdtr.SqlDataTypeOption != SqlDataTypeOption.NVarChar)
89 | {
90 |
91 | return;
92 | }
93 |
94 | if (sdtr.Parameters.Count > 0)
95 | {
96 | Region region = sdtr.CreateRegion();
97 |
98 | int size = Int32.Parse(sdtr.Parameters[0].Value);
99 |
100 | if (size <= context.Policy.GetProperty(SmallSizeThreshold))
101 | {
102 | // The data type for column '{0}' was defined as {1} of a
103 | // small size ({2}) which may incur additional storage and
104 | // performance costs. Declare this data type as a fixed size
105 | // or ignore the warning in cases performance is not a concern.
106 | context.Logger.Log(this,
107 | RuleUtilities.BuildResult(ResultKind.Warning, context, region,
108 | nameof(RuleResources.SQL2009_Default),
109 | node.ColumnIdentifier.Value,
110 | sdtr.SqlDataTypeOption.ToString(),
111 | size.ToString()));
112 | }
113 | }
114 | return;
115 | }
116 |
117 | public override IEnumerable Types
118 | {
119 | get
120 | {
121 | return new Type[] { typeof(ColumnDefinition) };
122 | }
123 | }
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/src/SqlSkim.Rules/DefaultSqlSkimmer.cs:
--------------------------------------------------------------------------------
1 | // Copyright(c) Microsoft.All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Resources;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using Microsoft.CodeAnalysis.Sql.Sdk;
11 |
12 | namespace Microsoft.CodeAnalysis.Sql.Rules
13 | {
14 | public abstract class DefaultSqlSkimmer : SqlSkimmerBase
15 | {
16 | protected override ResourceManager ResourceManager
17 | {
18 | get
19 | {
20 | return RuleResources.ResourceManager;
21 | }
22 | }
23 |
24 | private static Uri s_helpUri = new Uri("https://github.com/microsoft/sqlskim");
25 |
26 | public override Uri HelpUri
27 | {
28 | get
29 | {
30 | return s_helpUri;
31 | }
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/SqlSkim.Rules/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System.Reflection;
5 | using System.Runtime.InteropServices;
6 |
7 |
--------------------------------------------------------------------------------
/src/SqlSkim.Rules/RemoveUnusedVariables.cs:
--------------------------------------------------------------------------------
1 | //// Copyright (c) Microsoft. All rights reserved.
2 | //// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | //using System;
5 | //using System.Collections.Generic;
6 | //using System.Composition;
7 |
8 | //using Microsoft.CodeAnalysis.Sarif.Driver.Sdk;
9 | //using Microsoft.CodeAnalysis.Sarif.Sdk;
10 | //using Microsoft.CodeAnalysis.Sql.Sdk;
11 | //using Microsoft.SqlServer.TransactSql.ScriptDom;
12 |
13 | //namespace Microsoft.CodeAnalysis.Sql.Rules
14 | //{
15 | // [Export(typeof(ISkimmer)), Export(typeof(IRuleDescriptor))]
16 | // public class RemoveUnusedVariables : SqlSkimmerBase
17 | // {
18 | // public override string Id { get { return RuleIds.RemoveUnusedVariables; } }
19 |
20 | // public override string FullDescription { get { return RuleResources.SQL2001_RemoveUnusedVariables_Description; } }
21 |
22 | // public override void Analyze(SqlFileContext context)
23 | // {
24 | // return;
25 | // }
26 |
27 | // public override IEnumerable Types { get { return new Type[] { }; } }
28 | // }
29 | //}
30 |
--------------------------------------------------------------------------------
/src/SqlSkim.Rules/RuleIds.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | namespace Microsoft.CodeAnalysis.Sql
5 | {
6 | public static class RuleIds
7 | {
8 | public const string RemoveUnusedVariables = "SQL2001";
9 |
10 | public const string AvoidVariableLengthTypesOfSmallSize = "SQL2009";
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/SqlSkim.Rules/RuleResources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Microsoft.CodeAnalysis.Sql.Rules {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class RuleResources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal RuleResources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.CodeAnalysis.Sql.Rules.RuleResources", typeof(RuleResources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized string similar to Review unused variables to determine whether they can be removed or if the absence of use indicates a bug in the stored procedure..
65 | ///
66 | internal static string SQL2001_RemoveUnusedVariables_Description {
67 | get {
68 | return ResourceManager.GetString("SQL2001_RemoveUnusedVariables_Description", resourceCulture);
69 | }
70 | }
71 |
72 | ///
73 | /// Looks up a localized string similar to When you use data types of variable length such as VARCHAR, NVARCHAR, and VARBINARY, you incur an additional storage cost to track the length of the value stored in the data type. In addition, columns of variable length are stored after all columns of fixed length, which can have performance implications. This rule also fires in cases where a type of variable length, such as VARCHAR, is declared with no explicit length. In this case, if specified, the default length is 1. Note that data for types of variabl [rest of string was truncated]";.
74 | ///
75 | internal static string SQL2009_AvoidVariableLengthTypesOfSmallSize_Description {
76 | get {
77 | return ResourceManager.GetString("SQL2009_AvoidVariableLengthTypesOfSmallSize_Description", resourceCulture);
78 | }
79 | }
80 |
81 | ///
82 | /// Looks up a localized string similar to The data type for column '{0}' was defined as type {1} of size ({2}) which may incur additional storage and performance costs over a fixed length type. Declare this column as a fixed size data type or ignore the warning if performance is not a concern..
83 | ///
84 | internal static string SQL2009_Default {
85 | get {
86 | return ResourceManager.GetString("SQL2009_Default", resourceCulture);
87 | }
88 | }
89 |
90 | ///
91 | /// Looks up a localized string similar to size threshold for designating small variable type column definitions.
92 | ///
93 | internal static string SQL2009_MissingConfig {
94 | get {
95 | return ResourceManager.GetString("SQL2009_MissingConfig", resourceCulture);
96 | }
97 | }
98 |
99 | ///
100 | /// Looks up a localized string similar to An inclusive integer value that specifies the upper-bound of what is regarded as a type of small size. A value of 2, for example, configures analysis to regard any type of size 1 or 2 to be regarded as small..
101 | ///
102 | internal static string SQL2009_SmallSizeThreshold_Description {
103 | get {
104 | return ResourceManager.GetString("SQL2009_SmallSizeThreshold_Description", resourceCulture);
105 | }
106 | }
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/src/SqlSkim.Rules/RuleResources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | Review unused variables to determine whether they can be removed or if the absence of use indicates a bug in the stored procedure.
122 |
123 |
124 | When you use data types of variable length such as VARCHAR, NVARCHAR, and VARBINARY, you incur an additional storage cost to track the length of the value stored in the data type. In addition, columns of variable length are stored after all columns of fixed length, which can have performance implications. This rule also fires in cases where a type of variable length, such as VARCHAR, is declared with no explicit length. In this case, if specified, the default length is 1. Note that data for types of variable length is physically stored after data for types of fixed length. Therefore, you will cause data movement if you change a column from variable to fixed length in a table that is not empty.
125 |
126 |
127 | The data type for column '{0}' was defined as type {1} of size ({2}) which may incur additional storage and performance costs over a fixed length type. Declare this column as a fixed size data type or ignore the warning if performance is not a concern.
128 |
129 |
130 | size threshold for designating small variable type column definitions
131 |
132 |
133 | An inclusive integer value that specifies the upper-bound of what is regarded as a type of small size. A value of 2, for example, configures analysis to regard any type of size 1 or 2 to be regarded as small.
134 |
135 |
--------------------------------------------------------------------------------
/src/SqlSkim.Rules/SqlSkim.Rules.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {1F1583AB-55FD-41B8-9B18-53D4F4B9C552}
5 |
6 |
7 | Microsoft.CodeAnalysis.Sql.Rules
8 |
9 |
10 | SqlSkim.Rules
11 |
12 |
13 | Library
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | ..\packages\Microsoft.SqlServer.TransactSql.ScriptDom.12.0.1\lib\net40\Microsoft.SqlServer.TransactSql.ScriptDom.dll
22 | True
23 |
24 |
25 | ..\packages\Newtonsoft.Json.8.0.1\lib\net45\Newtonsoft.Json.dll
26 | True
27 |
28 |
29 | ..\packages\Sarif.Sdk.1.4.23-beta\lib\net40\Sarif.dll
30 | True
31 |
32 |
33 | ..\packages\Sarif.Driver.1.4.23-beta\lib\net40\Sarif.Driver.dll
34 | True
35 |
36 |
37 |
38 | ..\packages\System.Collections.Immutable.1.1.37\lib\dotnet\System.Collections.Immutable.dll
39 | True
40 |
41 |
42 | ..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll
43 | True
44 |
45 |
46 | ..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll
47 | True
48 |
49 |
50 | ..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll
51 | True
52 |
53 |
54 | ..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll
55 | True
56 |
57 |
58 | ..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll
59 | True
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | True
74 | True
75 | RuleResources.resx
76 |
77 |
78 |
79 |
80 | {d87c16f2-a31e-43df-9657-854add3b39d9}
81 | SqlSkim.Parsers
82 |
83 |
84 | {d5a40e1a-89b9-42ad-a136-c512896a9bc8}
85 | SqlSkim.Sdk
86 |
87 |
88 |
89 |
90 | ResXFileCodeGenerator
91 | RuleResources.Designer.cs
92 |
93 |
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/src/SqlSkim.Rules/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/SqlSkim.Sdk.UnitTests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System.Reflection;
5 | using System.Runtime.InteropServices;
6 |
7 |
--------------------------------------------------------------------------------
/src/SqlSkim.Sdk.UnitTests/SqlSkim.Sdk.UnitTests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {62AFB42E-06B2-4DE3-98E5-7CE679D3CF56}
6 |
7 |
8 |
9 |
10 | Microsoft.CodeAnalysis.Sql
11 |
12 |
13 | SqlSkim.Sdk.UnitTests
14 |
15 |
16 | Library
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll
29 | True
30 |
31 |
32 | ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll
33 | True
34 |
35 |
36 | ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll
37 | True
38 |
39 |
40 | ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll
41 | True
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | {d87c16f2-a31e-43df-9657-854add3b39d9}
51 | SqlSkim.Parsers
52 |
53 |
54 | {d5a40e1a-89b9-42ad-a136-c512896a9bc8}
55 | SqlSkim.Sdk
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/src/SqlSkim.Sdk.UnitTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/SqlSkim.Sdk/AllNodesVisitor.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 |
6 | using Microsoft.SqlServer.TransactSql.ScriptDom;
7 |
8 | namespace Microsoft.CodeAnalysis.Sql.Sdk
9 | {
10 | public class AllNodesVisitor : TSqlConcreteFragmentVisitor
11 | {
12 | Action action;
13 |
14 | public AllNodesVisitor(Action action)
15 | {
16 | this.action = action;
17 | }
18 |
19 | public override void Visit(CreateEventSessionStatement node) { this.action(node); }
20 | public override void Visit(EventDeclaration node) { this.action(node); }
21 | public override void Visit(EventDeclarationSetParameter node) { this.action(node); }
22 | public override void Visit(SourceDeclaration node) { this.action(node); }
23 | public override void Visit(EventDeclarationCompareFunctionParameter node) { this.action(node); }
24 | public override void Visit(TargetDeclaration node) { this.action(node); }
25 | public override void Visit(EventRetentionSessionOption node) { this.action(node); }
26 | public override void Visit(MemoryPartitionSessionOption node) { this.action(node); }
27 | public override void Visit(LiteralSessionOption node) { this.action(node); }
28 | public override void Visit(MaxDispatchLatencySessionOption node) { this.action(node); }
29 | public override void Visit(OnOffSessionOption node) { this.action(node); }
30 | public override void Visit(AlterEventSessionStatement node) { this.action(node); }
31 | public override void Visit(DropEventSessionStatement node) { this.action(node); }
32 | public override void Visit(AlterResourceGovernorStatement node) { this.action(node); }
33 | public override void Visit(CreateSpatialIndexStatement node) { this.action(node); }
34 | public override void Visit(SpatialIndexRegularOption node) { this.action(node); }
35 | public override void Visit(BoundingBoxSpatialIndexOption node) { this.action(node); }
36 | public override void Visit(BoundingBoxParameter node) { this.action(node); }
37 | public override void Visit(GridsSpatialIndexOption node) { this.action(node); }
38 | public override void Visit(GridParameter node) { this.action(node); }
39 | public override void Visit(CellsPerObjectSpatialIndexOption node) { this.action(node); }
40 | public override void Visit(AlterServerConfigurationStatement node) { this.action(node); }
41 | public override void Visit(ProcessAffinityRange node) { this.action(node); }
42 | public override void Visit(AlterServerConfigurationSetBufferPoolExtensionStatement node) { this.action(node); }
43 | public override void Visit(AlterServerConfigurationBufferPoolExtensionOption node) { this.action(node); }
44 | public override void Visit(AlterServerConfigurationBufferPoolExtensionContainerOption node) { this.action(node); }
45 | public override void Visit(AlterServerConfigurationBufferPoolExtensionSizeOption node) { this.action(node); }
46 | public override void Visit(AlterServerConfigurationSetDiagnosticsLogStatement node) { this.action(node); }
47 | public override void Visit(AlterServerConfigurationDiagnosticsLogOption node) { this.action(node); }
48 | public override void Visit(AlterServerConfigurationDiagnosticsLogMaxSizeOption node) { this.action(node); }
49 | public override void Visit(AlterServerConfigurationSetFailoverClusterPropertyStatement node) { this.action(node); }
50 | public override void Visit(AlterServerConfigurationFailoverClusterPropertyOption node) { this.action(node); }
51 | public override void Visit(AlterServerConfigurationSetHadrClusterStatement node) { this.action(node); }
52 | public override void Visit(AlterServerConfigurationHadrClusterOption node) { this.action(node); }
53 | public override void Visit(CreateAvailabilityGroupStatement node) { this.action(node); }
54 | public override void Visit(AlterAvailabilityGroupStatement node) { this.action(node); }
55 | public override void Visit(AvailabilityReplica node) { this.action(node); }
56 | public override void Visit(LiteralReplicaOption node) { this.action(node); }
57 | public override void Visit(AvailabilityModeReplicaOption node) { this.action(node); }
58 | public override void Visit(FailoverModeReplicaOption node) { this.action(node); }
59 | public override void Visit(PrimaryRoleReplicaOption node) { this.action(node); }
60 | public override void Visit(SecondaryRoleReplicaOption node) { this.action(node); }
61 | public override void Visit(LiteralAvailabilityGroupOption node) { this.action(node); }
62 | public override void Visit(AlterAvailabilityGroupAction node) { this.action(node); }
63 | public override void Visit(AlterAvailabilityGroupFailoverAction node) { this.action(node); }
64 | public override void Visit(AlterAvailabilityGroupFailoverOption node) { this.action(node); }
65 | public override void Visit(DropAvailabilityGroupStatement node) { this.action(node); }
66 | public override void Visit(CreateFederationStatement node) { this.action(node); }
67 | public override void Visit(AlterFederationStatement node) { this.action(node); }
68 | public override void Visit(DropFederationStatement node) { this.action(node); }
69 | public override void Visit(UseFederationStatement node) { this.action(node); }
70 | public override void Visit(DiskStatement node) { this.action(node); }
71 | public override void Visit(DiskStatementOption node) { this.action(node); }
72 | public override void Visit(CreateColumnStoreIndexStatement node) { this.action(node); }
73 | public override void Visit(WindowFrameClause node) { this.action(node); }
74 | public override void Visit(WindowDelimiter node) { this.action(node); }
75 | public override void Visit(WithinGroupClause node) { this.action(node); }
76 | public override void Visit(SelectiveXmlIndexPromotedPath node) { this.action(node); }
77 | public override void Visit(MergeActionClause node) { this.action(node); }
78 | public override void Visit(UpdateMergeAction node) { this.action(node); }
79 | public override void Visit(DeleteMergeAction node) { this.action(node); }
80 | public override void Visit(InsertMergeAction node) { this.action(node); }
81 | public override void Visit(CreateTypeTableStatement node) { this.action(node); }
82 | public override void Visit(AuditSpecificationPart node) { this.action(node); }
83 | public override void Visit(AuditActionSpecification node) { this.action(node); }
84 | public override void Visit(DatabaseAuditAction node) { this.action(node); }
85 | public override void Visit(AuditActionGroupReference node) { this.action(node); }
86 | public override void Visit(CreateDatabaseAuditSpecificationStatement node) { this.action(node); }
87 | public override void Visit(AlterDatabaseAuditSpecificationStatement node) { this.action(node); }
88 | public override void Visit(DropDatabaseAuditSpecificationStatement node) { this.action(node); }
89 | public override void Visit(CreateServerAuditSpecificationStatement node) { this.action(node); }
90 | public override void Visit(AlterServerAuditSpecificationStatement node) { this.action(node); }
91 | public override void Visit(DropServerAuditSpecificationStatement node) { this.action(node); }
92 | public override void Visit(CreateServerAuditStatement node) { this.action(node); }
93 | public override void Visit(AlterServerAuditStatement node) { this.action(node); }
94 | public override void Visit(DropServerAuditStatement node) { this.action(node); }
95 | public override void Visit(AuditTarget node) { this.action(node); }
96 | public override void Visit(QueueDelayAuditOption node) { this.action(node); }
97 | public override void Visit(AuditGuidAuditOption node) { this.action(node); }
98 | public override void Visit(OnFailureAuditOption node) { this.action(node); }
99 | public override void Visit(StateAuditOption node) { this.action(node); }
100 | public override void Visit(MaxSizeAuditTargetOption node) { this.action(node); }
101 | public override void Visit(MaxRolloverFilesAuditTargetOption node) { this.action(node); }
102 | public override void Visit(LiteralAuditTargetOption node) { this.action(node); }
103 | public override void Visit(OnOffAuditTargetOption node) { this.action(node); }
104 | public override void Visit(CreateDatabaseEncryptionKeyStatement node) { this.action(node); }
105 | public override void Visit(AlterDatabaseEncryptionKeyStatement node) { this.action(node); }
106 | public override void Visit(DropDatabaseEncryptionKeyStatement node) { this.action(node); }
107 | public override void Visit(ResourcePoolStatement node) { this.action(node); }
108 | public override void Visit(ResourcePoolParameter node) { this.action(node); }
109 | public override void Visit(ResourcePoolAffinitySpecification node) { this.action(node); }
110 | public override void Visit(CreateResourcePoolStatement node) { this.action(node); }
111 | public override void Visit(AlterResourcePoolStatement node) { this.action(node); }
112 | public override void Visit(DropResourcePoolStatement node) { this.action(node); }
113 | public override void Visit(WorkloadGroupResourceParameter node) { this.action(node); }
114 | public override void Visit(WorkloadGroupImportanceParameter node) { this.action(node); }
115 | public override void Visit(CreateWorkloadGroupStatement node) { this.action(node); }
116 | public override void Visit(AlterWorkloadGroupStatement node) { this.action(node); }
117 | public override void Visit(DropWorkloadGroupStatement node) { this.action(node); }
118 | public override void Visit(BrokerPriorityParameter node) { this.action(node); }
119 | public override void Visit(CreateBrokerPriorityStatement node) { this.action(node); }
120 | public override void Visit(AlterBrokerPriorityStatement node) { this.action(node); }
121 | public override void Visit(DropBrokerPriorityStatement node) { this.action(node); }
122 | public override void Visit(CreateFullTextStopListStatement node) { this.action(node); }
123 | public override void Visit(AlterFullTextStopListStatement node) { this.action(node); }
124 | public override void Visit(FullTextStopListAction node) { this.action(node); }
125 | public override void Visit(DropFullTextStopListStatement node) { this.action(node); }
126 | public override void Visit(CreateCryptographicProviderStatement node) { this.action(node); }
127 | public override void Visit(AlterCryptographicProviderStatement node) { this.action(node); }
128 | public override void Visit(DropCryptographicProviderStatement node) { this.action(node); }
129 | public override void Visit(EventSessionObjectName node) { this.action(node); }
130 | public override void Visit(EventSessionStatement node) { this.action(node); }
131 | public override void Visit(DropSearchPropertyListStatement node) { this.action(node); }
132 | public override void Visit(CreateLoginStatement node) { this.action(node); }
133 | public override void Visit(PasswordCreateLoginSource node) { this.action(node); }
134 | public override void Visit(PrincipalOption node) { this.action(node); }
135 | public override void Visit(OnOffPrincipalOption node) { this.action(node); }
136 | public override void Visit(LiteralPrincipalOption node) { this.action(node); }
137 | public override void Visit(IdentifierPrincipalOption node) { this.action(node); }
138 | public override void Visit(WindowsCreateLoginSource node) { this.action(node); }
139 | public override void Visit(CertificateCreateLoginSource node) { this.action(node); }
140 | public override void Visit(AsymmetricKeyCreateLoginSource node) { this.action(node); }
141 | public override void Visit(PasswordAlterPrincipalOption node) { this.action(node); }
142 | public override void Visit(AlterLoginOptionsStatement node) { this.action(node); }
143 | public override void Visit(AlterLoginEnableDisableStatement node) { this.action(node); }
144 | public override void Visit(AlterLoginAddDropCredentialStatement node) { this.action(node); }
145 | public override void Visit(RevertStatement node) { this.action(node); }
146 | public override void Visit(DropContractStatement node) { this.action(node); }
147 | public override void Visit(DropEndpointStatement node) { this.action(node); }
148 | public override void Visit(DropMessageTypeStatement node) { this.action(node); }
149 | public override void Visit(DropQueueStatement node) { this.action(node); }
150 | public override void Visit(DropRemoteServiceBindingStatement node) { this.action(node); }
151 | public override void Visit(DropRouteStatement node) { this.action(node); }
152 | public override void Visit(DropServiceStatement node) { this.action(node); }
153 | public override void Visit(AddSignatureStatement node) { this.action(node); }
154 | public override void Visit(DropSignatureStatement node) { this.action(node); }
155 | public override void Visit(DropEventNotificationStatement node) { this.action(node); }
156 | public override void Visit(ExecuteAsStatement node) { this.action(node); }
157 | public override void Visit(EndConversationStatement node) { this.action(node); }
158 | public override void Visit(MoveConversationStatement node) { this.action(node); }
159 | public override void Visit(GetConversationGroupStatement node) { this.action(node); }
160 | public override void Visit(ReceiveStatement node) { this.action(node); }
161 | public override void Visit(SendStatement node) { this.action(node); }
162 | public override void Visit(AlterSchemaStatement node) { this.action(node); }
163 | public override void Visit(AlterAsymmetricKeyStatement node) { this.action(node); }
164 | public override void Visit(AlterServiceMasterKeyStatement node) { this.action(node); }
165 | public override void Visit(BeginConversationTimerStatement node) { this.action(node); }
166 | public override void Visit(BeginDialogStatement node) { this.action(node); }
167 | public override void Visit(ScalarExpressionDialogOption node) { this.action(node); }
168 | public override void Visit(OnOffDialogOption node) { this.action(node); }
169 | public override void Visit(BackupCertificateStatement node) { this.action(node); }
170 | public override void Visit(BackupServiceMasterKeyStatement node) { this.action(node); }
171 | public override void Visit(RestoreServiceMasterKeyStatement node) { this.action(node); }
172 | public override void Visit(BackupMasterKeyStatement node) { this.action(node); }
173 | public override void Visit(RestoreMasterKeyStatement node) { this.action(node); }
174 | public override void Visit(ScalarExpressionSnippet node) { this.action(node); }
175 | public override void Visit(BooleanExpressionSnippet node) { this.action(node); }
176 | public override void Visit(StatementListSnippet node) { this.action(node); }
177 | public override void Visit(SelectStatementSnippet node) { this.action(node); }
178 | public override void Visit(SchemaObjectNameSnippet node) { this.action(node); }
179 | public override void Visit(TSqlFragmentSnippet node) { this.action(node); }
180 | public override void Visit(TSqlStatementSnippet node) { this.action(node); }
181 | public override void Visit(IdentifierSnippet node) { this.action(node); }
182 | public override void Visit(TSqlScript node) { this.action(node); }
183 | public override void Visit(TSqlBatch node) { this.action(node); }
184 | public override void Visit(MergeStatement node) { this.action(node); }
185 | public override void Visit(MergeSpecification node) { this.action(node); }
186 | public override void Visit(GrandTotalGroupingSpecification node) { this.action(node); }
187 | public override void Visit(GroupingSetsGroupingSpecification node) { this.action(node); }
188 | public override void Visit(OutputClause node) { this.action(node); }
189 | public override void Visit(OutputIntoClause node) { this.action(node); }
190 | public override void Visit(HavingClause node) { this.action(node); }
191 | public override void Visit(IdentityFunctionCall node) { this.action(node); }
192 | public override void Visit(JoinParenthesisTableReference node) { this.action(node); }
193 | public override void Visit(OrderByClause node) { this.action(node); }
194 | public override void Visit(QualifiedJoin node) { this.action(node); }
195 | public override void Visit(OdbcQualifiedJoinTableReference node) { this.action(node); }
196 | public override void Visit(QueryParenthesisExpression node) { this.action(node); }
197 | public override void Visit(QuerySpecification node) { this.action(node); }
198 | public override void Visit(FromClause node) { this.action(node); }
199 | public override void Visit(SelectScalarExpression node) { this.action(node); }
200 | public override void Visit(SelectStarExpression node) { this.action(node); }
201 | public override void Visit(SelectSetVariable node) { this.action(node); }
202 | public override void Visit(DataModificationTableReference node) { this.action(node); }
203 | public override void Visit(ChangeTableChangesTableReference node) { this.action(node); }
204 | public override void Visit(ChangeTableVersionTableReference node) { this.action(node); }
205 | public override void Visit(BooleanTernaryExpression node) { this.action(node); }
206 | public override void Visit(TopRowFilter node) { this.action(node); }
207 | public override void Visit(OffsetClause node) { this.action(node); }
208 | public override void Visit(UnaryExpression node) { this.action(node); }
209 | public override void Visit(BinaryQueryExpression node) { this.action(node); }
210 | public override void Visit(VariableTableReference node) { this.action(node); }
211 | public override void Visit(VariableMethodCallTableReference node) { this.action(node); }
212 | public override void Visit(DropPartitionFunctionStatement node) { this.action(node); }
213 | public override void Visit(DropPartitionSchemeStatement node) { this.action(node); }
214 | public override void Visit(DropSynonymStatement node) { this.action(node); }
215 | public override void Visit(DropAggregateStatement node) { this.action(node); }
216 | public override void Visit(DropAssemblyStatement node) { this.action(node); }
217 | public override void Visit(DropApplicationRoleStatement node) { this.action(node); }
218 | public override void Visit(DropFullTextCatalogStatement node) { this.action(node); }
219 | public override void Visit(DropFullTextIndexStatement node) { this.action(node); }
220 | public override void Visit(DropLoginStatement node) { this.action(node); }
221 | public override void Visit(DropRoleStatement node) { this.action(node); }
222 | public override void Visit(DropTypeStatement node) { this.action(node); }
223 | public override void Visit(DropUserStatement node) { this.action(node); }
224 | public override void Visit(DropMasterKeyStatement node) { this.action(node); }
225 | public override void Visit(DropSymmetricKeyStatement node) { this.action(node); }
226 | public override void Visit(DropAsymmetricKeyStatement node) { this.action(node); }
227 | public override void Visit(DropCertificateStatement node) { this.action(node); }
228 | public override void Visit(DropCredentialStatement node) { this.action(node); }
229 | public override void Visit(AlterPartitionFunctionStatement node) { this.action(node); }
230 | public override void Visit(AlterPartitionSchemeStatement node) { this.action(node); }
231 | public override void Visit(AlterFullTextIndexStatement node) { this.action(node); }
232 | public override void Visit(SimpleAlterFullTextIndexAction node) { this.action(node); }
233 | public override void Visit(SetStopListAlterFullTextIndexAction node) { this.action(node); }
234 | public override void Visit(SetSearchPropertyListAlterFullTextIndexAction node) { this.action(node); }
235 | public override void Visit(DropAlterFullTextIndexAction node) { this.action(node); }
236 | public override void Visit(AddAlterFullTextIndexAction node) { this.action(node); }
237 | public override void Visit(AlterColumnAlterFullTextIndexAction node) { this.action(node); }
238 | public override void Visit(CreateSearchPropertyListStatement node) { this.action(node); }
239 | public override void Visit(AlterSearchPropertyListStatement node) { this.action(node); }
240 | public override void Visit(AddSearchPropertyListAction node) { this.action(node); }
241 | public override void Visit(DropSearchPropertyListAction node) { this.action(node); }
242 | public override void Visit(CreateAggregateStatement node) { this.action(node); }
243 | public override void Visit(CreateEndpointStatement node) { this.action(node); }
244 | public override void Visit(AlterEndpointStatement node) { this.action(node); }
245 | public override void Visit(EndpointAffinity node) { this.action(node); }
246 | public override void Visit(LiteralEndpointProtocolOption node) { this.action(node); }
247 | public override void Visit(AuthenticationEndpointProtocolOption node) { this.action(node); }
248 | public override void Visit(PortsEndpointProtocolOption node) { this.action(node); }
249 | public override void Visit(CompressionEndpointProtocolOption node) { this.action(node); }
250 | public override void Visit(ListenerIPEndpointProtocolOption node) { this.action(node); }
251 | public override void Visit(IPv4 node) { this.action(node); }
252 | public override void Visit(SoapMethod node) { this.action(node); }
253 | public override void Visit(EnabledDisabledPayloadOption node) { this.action(node); }
254 | public override void Visit(WsdlPayloadOption node) { this.action(node); }
255 | public override void Visit(LoginTypePayloadOption node) { this.action(node); }
256 | public override void Visit(LiteralPayloadOption node) { this.action(node); }
257 | public override void Visit(SessionTimeoutPayloadOption node) { this.action(node); }
258 | public override void Visit(SchemaPayloadOption node) { this.action(node); }
259 | public override void Visit(CharacterSetPayloadOption node) { this.action(node); }
260 | public override void Visit(RolePayloadOption node) { this.action(node); }
261 | public override void Visit(AuthenticationPayloadOption node) { this.action(node); }
262 | public override void Visit(EncryptionPayloadOption node) { this.action(node); }
263 | public override void Visit(CreateSymmetricKeyStatement node) { this.action(node); }
264 | public override void Visit(KeySourceKeyOption node) { this.action(node); }
265 | public override void Visit(AlgorithmKeyOption node) { this.action(node); }
266 | public override void Visit(IdentityValueKeyOption node) { this.action(node); }
267 | public override void Visit(ProviderKeyNameKeyOption node) { this.action(node); }
268 | public override void Visit(CreationDispositionKeyOption node) { this.action(node); }
269 | public override void Visit(AlterSymmetricKeyStatement node) { this.action(node); }
270 | public override void Visit(OnOffFullTextCatalogOption node) { this.action(node); }
271 | public override void Visit(CreateFullTextCatalogStatement node) { this.action(node); }
272 | public override void Visit(AlterFullTextCatalogStatement node) { this.action(node); }
273 | public override void Visit(CreateServiceStatement node) { this.action(node); }
274 | public override void Visit(AlterServiceStatement node) { this.action(node); }
275 | public override void Visit(ServiceContract node) { this.action(node); }
276 | public override void Visit(BinaryExpression node) { this.action(node); }
277 | public override void Visit(BuiltInFunctionTableReference node) { this.action(node); }
278 | public override void Visit(ComputeClause node) { this.action(node); }
279 | public override void Visit(ComputeFunction node) { this.action(node); }
280 | public override void Visit(PivotedTableReference node) { this.action(node); }
281 | public override void Visit(UnpivotedTableReference node) { this.action(node); }
282 | public override void Visit(UnqualifiedJoin node) { this.action(node); }
283 | public override void Visit(TableSampleClause node) { this.action(node); }
284 | public override void Visit(BooleanNotExpression node) { this.action(node); }
285 | public override void Visit(BooleanParenthesisExpression node) { this.action(node); }
286 | public override void Visit(BooleanComparisonExpression node) { this.action(node); }
287 | public override void Visit(BooleanBinaryExpression node) { this.action(node); }
288 | public override void Visit(BooleanIsNullExpression node) { this.action(node); }
289 | public override void Visit(ExpressionWithSortOrder node) { this.action(node); }
290 | public override void Visit(GroupByClause node) { this.action(node); }
291 | public override void Visit(ExpressionGroupingSpecification node) { this.action(node); }
292 | public override void Visit(CompositeGroupingSpecification node) { this.action(node); }
293 | public override void Visit(CubeGroupingSpecification node) { this.action(node); }
294 | public override void Visit(RollupGroupingSpecification node) { this.action(node); }
295 | public override void Visit(IdentityOptions node) { this.action(node); }
296 | public override void Visit(ColumnStorageOptions node) { this.action(node); }
297 | public override void Visit(CreateTableStatement node) { this.action(node); }
298 | public override void Visit(FederationScheme node) { this.action(node); }
299 | public override void Visit(TableDataCompressionOption node) { this.action(node); }
300 | public override void Visit(DataCompressionOption node) { this.action(node); }
301 | public override void Visit(CompressionPartitionRange node) { this.action(node); }
302 | public override void Visit(CheckConstraintDefinition node) { this.action(node); }
303 | public override void Visit(DefaultConstraintDefinition node) { this.action(node); }
304 | public override void Visit(ForeignKeyConstraintDefinition node) { this.action(node); }
305 | public override void Visit(NullableConstraintDefinition node) { this.action(node); }
306 | public override void Visit(UniqueConstraintDefinition node) { this.action(node); }
307 | public override void Visit(BackupDatabaseStatement node) { this.action(node); }
308 | public override void Visit(BackupTransactionLogStatement node) { this.action(node); }
309 | public override void Visit(RestoreStatement node) { this.action(node); }
310 | public override void Visit(RestoreOption node) { this.action(node); }
311 | public override void Visit(ScalarExpressionRestoreOption node) { this.action(node); }
312 | public override void Visit(MoveRestoreOption node) { this.action(node); }
313 | public override void Visit(StopRestoreOption node) { this.action(node); }
314 | public override void Visit(FileStreamRestoreOption node) { this.action(node); }
315 | public override void Visit(BackupOption node) { this.action(node); }
316 | public override void Visit(BackupEncryptionOption node) { this.action(node); }
317 | public override void Visit(DeviceInfo node) { this.action(node); }
318 | public override void Visit(MirrorToClause node) { this.action(node); }
319 | public override void Visit(BackupRestoreFileInfo node) { this.action(node); }
320 | public override void Visit(BulkInsertStatement node) { this.action(node); }
321 | public override void Visit(InsertBulkStatement node) { this.action(node); }
322 | public override void Visit(BulkInsertOption node) { this.action(node); }
323 | public override void Visit(LiteralBulkInsertOption node) { this.action(node); }
324 | public override void Visit(OrderBulkInsertOption node) { this.action(node); }
325 | public override void Visit(ColumnDefinitionBase node) { this.action(node); }
326 | public override void Visit(InsertBulkColumnDefinition node) { this.action(node); }
327 | public override void Visit(DbccStatement node) { this.action(node); }
328 | public override void Visit(DbccOption node) { this.action(node); }
329 | public override void Visit(DbccNamedLiteral node) { this.action(node); }
330 | public override void Visit(CreateAsymmetricKeyStatement node) { this.action(node); }
331 | public override void Visit(CreatePartitionFunctionStatement node) { this.action(node); }
332 | public override void Visit(PartitionParameterType node) { this.action(node); }
333 | public override void Visit(CreatePartitionSchemeStatement node) { this.action(node); }
334 | public override void Visit(OnOffRemoteServiceBindingOption node) { this.action(node); }
335 | public override void Visit(UserRemoteServiceBindingOption node) { this.action(node); }
336 | public override void Visit(CreateRemoteServiceBindingStatement node) { this.action(node); }
337 | public override void Visit(AlterRemoteServiceBindingStatement node) { this.action(node); }
338 | public override void Visit(AssemblyEncryptionSource node) { this.action(node); }
339 | public override void Visit(FileEncryptionSource node) { this.action(node); }
340 | public override void Visit(ProviderEncryptionSource node) { this.action(node); }
341 | public override void Visit(AlterCertificateStatement node) { this.action(node); }
342 | public override void Visit(CreateCertificateStatement node) { this.action(node); }
343 | public override void Visit(CertificateOption node) { this.action(node); }
344 | public override void Visit(CreateContractStatement node) { this.action(node); }
345 | public override void Visit(ContractMessage node) { this.action(node); }
346 | public override void Visit(CreateCredentialStatement node) { this.action(node); }
347 | public override void Visit(AlterCredentialStatement node) { this.action(node); }
348 | public override void Visit(CreateMessageTypeStatement node) { this.action(node); }
349 | public override void Visit(AlterMessageTypeStatement node) { this.action(node); }
350 | public override void Visit(KillStatsJobStatement node) { this.action(node); }
351 | public override void Visit(CheckpointStatement node) { this.action(node); }
352 | public override void Visit(ReconfigureStatement node) { this.action(node); }
353 | public override void Visit(ShutdownStatement node) { this.action(node); }
354 | public override void Visit(SetUserStatement node) { this.action(node); }
355 | public override void Visit(TruncateTableStatement node) { this.action(node); }
356 | public override void Visit(PredicateSetStatement node) { this.action(node); }
357 | public override void Visit(SetStatisticsStatement node) { this.action(node); }
358 | public override void Visit(SetRowCountStatement node) { this.action(node); }
359 | public override void Visit(SetOffsetsStatement node) { this.action(node); }
360 | public override void Visit(GeneralSetCommand node) { this.action(node); }
361 | public override void Visit(SetFipsFlaggerCommand node) { this.action(node); }
362 | public override void Visit(SetCommandStatement node) { this.action(node); }
363 | public override void Visit(SetTransactionIsolationLevelStatement node) { this.action(node); }
364 | public override void Visit(SetTextSizeStatement node) { this.action(node); }
365 | public override void Visit(SetIdentityInsertStatement node) { this.action(node); }
366 | public override void Visit(SetErrorLevelStatement node) { this.action(node); }
367 | public override void Visit(CreateDatabaseStatement node) { this.action(node); }
368 | public override void Visit(FileDeclaration node) { this.action(node); }
369 | public override void Visit(FileDeclarationOption node) { this.action(node); }
370 | public override void Visit(NameFileDeclarationOption node) { this.action(node); }
371 | public override void Visit(FileNameFileDeclarationOption node) { this.action(node); }
372 | public override void Visit(SizeFileDeclarationOption node) { this.action(node); }
373 | public override void Visit(MaxSizeFileDeclarationOption node) { this.action(node); }
374 | public override void Visit(FileGrowthFileDeclarationOption node) { this.action(node); }
375 | public override void Visit(FileGroupDefinition node) { this.action(node); }
376 | public override void Visit(AlterDatabaseCollateStatement node) { this.action(node); }
377 | public override void Visit(AlterDatabaseRebuildLogStatement node) { this.action(node); }
378 | public override void Visit(AlterDatabaseAddFileStatement node) { this.action(node); }
379 | public override void Visit(AlterDatabaseAddFileGroupStatement node) { this.action(node); }
380 | public override void Visit(AlterDatabaseRemoveFileGroupStatement node) { this.action(node); }
381 | public override void Visit(AlterDatabaseRemoveFileStatement node) { this.action(node); }
382 | public override void Visit(AlterDatabaseModifyNameStatement node) { this.action(node); }
383 | public override void Visit(AlterDatabaseModifyFileStatement node) { this.action(node); }
384 | public override void Visit(AlterDatabaseModifyFileGroupStatement node) { this.action(node); }
385 | public override void Visit(AlterDatabaseTermination node) { this.action(node); }
386 | public override void Visit(AlterDatabaseSetStatement node) { this.action(node); }
387 | public override void Visit(DatabaseOption node) { this.action(node); }
388 | public override void Visit(OnOffDatabaseOption node) { this.action(node); }
389 | public override void Visit(AutoCreateStatisticsDatabaseOption node) { this.action(node); }
390 | public override void Visit(ContainmentDatabaseOption node) { this.action(node); }
391 | public override void Visit(HadrDatabaseOption node) { this.action(node); }
392 | public override void Visit(HadrAvailabilityGroupDatabaseOption node) { this.action(node); }
393 | public override void Visit(DelayedDurabilityDatabaseOption node) { this.action(node); }
394 | public override void Visit(CursorDefaultDatabaseOption node) { this.action(node); }
395 | public override void Visit(RecoveryDatabaseOption node) { this.action(node); }
396 | public override void Visit(TargetRecoveryTimeDatabaseOption node) { this.action(node); }
397 | public override void Visit(PageVerifyDatabaseOption node) { this.action(node); }
398 | public override void Visit(PartnerDatabaseOption node) { this.action(node); }
399 | public override void Visit(WitnessDatabaseOption node) { this.action(node); }
400 | public override void Visit(ParameterizationDatabaseOption node) { this.action(node); }
401 | public override void Visit(LiteralDatabaseOption node) { this.action(node); }
402 | public override void Visit(IdentifierDatabaseOption node) { this.action(node); }
403 | public override void Visit(ChangeTrackingDatabaseOption node) { this.action(node); }
404 | public override void Visit(AutoCleanupChangeTrackingOptionDetail node) { this.action(node); }
405 | public override void Visit(ChangeRetentionChangeTrackingOptionDetail node) { this.action(node); }
406 | public override void Visit(FileStreamDatabaseOption node) { this.action(node); }
407 | public override void Visit(MaxSizeDatabaseOption node) { this.action(node); }
408 | public override void Visit(AlterTableAlterColumnStatement node) { this.action(node); }
409 | public override void Visit(ColumnDefinition node) { this.action(node); }
410 | public override void Visit(CreateRoleStatement node) { this.action(node); }
411 | public override void Visit(AlterRoleStatement node) { this.action(node); }
412 | public override void Visit(RenameAlterRoleAction node) { this.action(node); }
413 | public override void Visit(AddMemberAlterRoleAction node) { this.action(node); }
414 | public override void Visit(DropMemberAlterRoleAction node) { this.action(node); }
415 | public override void Visit(CreateServerRoleStatement node) { this.action(node); }
416 | public override void Visit(AlterServerRoleStatement node) { this.action(node); }
417 | public override void Visit(DropServerRoleStatement node) { this.action(node); }
418 | public override void Visit(UserLoginOption node) { this.action(node); }
419 | public override void Visit(CreateUserStatement node) { this.action(node); }
420 | public override void Visit(AlterUserStatement node) { this.action(node); }
421 | public override void Visit(StatisticsOption node) { this.action(node); }
422 | public override void Visit(ResampleStatisticsOption node) { this.action(node); }
423 | public override void Visit(StatisticsPartitionRange node) { this.action(node); }
424 | public override void Visit(OnOffStatisticsOption node) { this.action(node); }
425 | public override void Visit(LiteralStatisticsOption node) { this.action(node); }
426 | public override void Visit(CreateStatisticsStatement node) { this.action(node); }
427 | public override void Visit(UpdateStatisticsStatement node) { this.action(node); }
428 | public override void Visit(ReturnStatement node) { this.action(node); }
429 | public override void Visit(DeclareCursorStatement node) { this.action(node); }
430 | public override void Visit(CursorDefinition node) { this.action(node); }
431 | public override void Visit(CursorOption node) { this.action(node); }
432 | public override void Visit(SetVariableStatement node) { this.action(node); }
433 | public override void Visit(CursorId node) { this.action(node); }
434 | public override void Visit(OpenCursorStatement node) { this.action(node); }
435 | public override void Visit(CloseCursorStatement node) { this.action(node); }
436 | public override void Visit(CryptoMechanism node) { this.action(node); }
437 | public override void Visit(OpenSymmetricKeyStatement node) { this.action(node); }
438 | public override void Visit(CloseSymmetricKeyStatement node) { this.action(node); }
439 | public override void Visit(OpenMasterKeyStatement node) { this.action(node); }
440 | public override void Visit(CloseMasterKeyStatement node) { this.action(node); }
441 | public override void Visit(DeallocateCursorStatement node) { this.action(node); }
442 | public override void Visit(FetchType node) { this.action(node); }
443 | public override void Visit(FetchCursorStatement node) { this.action(node); }
444 | public override void Visit(WhereClause node) { this.action(node); }
445 | public override void Visit(DropDatabaseStatement node) { this.action(node); }
446 | public override void Visit(DropIndexStatement node) { this.action(node); }
447 | public override void Visit(BackwardsCompatibleDropIndexClause node) { this.action(node); }
448 | public override void Visit(DropIndexClause node) { this.action(node); }
449 | public override void Visit(MoveToDropIndexOption node) { this.action(node); }
450 | public override void Visit(FileStreamOnDropIndexOption node) { this.action(node); }
451 | public override void Visit(DropStatisticsStatement node) { this.action(node); }
452 | public override void Visit(DropTableStatement node) { this.action(node); }
453 | public override void Visit(DropProcedureStatement node) { this.action(node); }
454 | public override void Visit(DropFunctionStatement node) { this.action(node); }
455 | public override void Visit(DropViewStatement node) { this.action(node); }
456 | public override void Visit(DropDefaultStatement node) { this.action(node); }
457 | public override void Visit(DropRuleStatement node) { this.action(node); }
458 | public override void Visit(DropTriggerStatement node) { this.action(node); }
459 | public override void Visit(DropSchemaStatement node) { this.action(node); }
460 | public override void Visit(RaiseErrorLegacyStatement node) { this.action(node); }
461 | public override void Visit(RaiseErrorStatement node) { this.action(node); }
462 | public override void Visit(ThrowStatement node) { this.action(node); }
463 | public override void Visit(UseStatement node) { this.action(node); }
464 | public override void Visit(KillStatement node) { this.action(node); }
465 | public override void Visit(KillQueryNotificationSubscriptionStatement node) { this.action(node); }
466 | public override void Visit(LowPriorityLockWaitTableSwitchOption node) { this.action(node); }
467 | public override void Visit(DropClusteredConstraintStateOption node) { this.action(node); }
468 | public override void Visit(DropClusteredConstraintValueOption node) { this.action(node); }
469 | public override void Visit(DropClusteredConstraintMoveOption node) { this.action(node); }
470 | public override void Visit(AlterTableDropTableElement node) { this.action(node); }
471 | public override void Visit(AlterTableDropTableElementStatement node) { this.action(node); }
472 | public override void Visit(AlterTableTriggerModificationStatement node) { this.action(node); }
473 | public override void Visit(EnableDisableTriggerStatement node) { this.action(node); }
474 | public override void Visit(TryCatchStatement node) { this.action(node); }
475 | public override void Visit(CreateTypeUdtStatement node) { this.action(node); }
476 | public override void Visit(CreateTypeUddtStatement node) { this.action(node); }
477 | public override void Visit(CreateSynonymStatement node) { this.action(node); }
478 | public override void Visit(ExecuteAsClause node) { this.action(node); }
479 | public override void Visit(QueueOption node) { this.action(node); }
480 | public override void Visit(QueueStateOption node) { this.action(node); }
481 | public override void Visit(QueueProcedureOption node) { this.action(node); }
482 | public override void Visit(QueueValueOption node) { this.action(node); }
483 | public override void Visit(QueueExecuteAsOption node) { this.action(node); }
484 | public override void Visit(RouteOption node) { this.action(node); }
485 | public override void Visit(AlterRouteStatement node) { this.action(node); }
486 | public override void Visit(CreateRouteStatement node) { this.action(node); }
487 | public override void Visit(AlterQueueStatement node) { this.action(node); }
488 | public override void Visit(CreateQueueStatement node) { this.action(node); }
489 | public override void Visit(IndexDefinition node) { this.action(node); }
490 | public override void Visit(IndexType node) { this.action(node); }
491 | public override void Visit(PartitionSpecifier node) { this.action(node); }
492 | public override void Visit(AlterIndexStatement node) { this.action(node); }
493 | public override void Visit(CreateXmlIndexStatement node) { this.action(node); }
494 | public override void Visit(CreateSelectiveXmlIndexStatement node) { this.action(node); }
495 | public override void Visit(FileGroupOrPartitionScheme node) { this.action(node); }
496 | public override void Visit(CreateIndexStatement node) { this.action(node); }
497 | public override void Visit(IndexStateOption node) { this.action(node); }
498 | public override void Visit(IndexExpressionOption node) { this.action(node); }
499 | public override void Visit(OnlineIndexOption node) { this.action(node); }
500 | public override void Visit(OnlineIndexLowPriorityLockWaitOption node) { this.action(node); }
501 | public override void Visit(LowPriorityLockWaitMaxDurationOption node) { this.action(node); }
502 | public override void Visit(LowPriorityLockWaitAbortAfterWaitOption node) { this.action(node); }
503 | public override void Visit(FullTextIndexColumn node) { this.action(node); }
504 | public override void Visit(CreateFullTextIndexStatement node) { this.action(node); }
505 | public override void Visit(ChangeTrackingFullTextIndexOption node) { this.action(node); }
506 | public override void Visit(StopListFullTextIndexOption node) { this.action(node); }
507 | public override void Visit(SearchPropertyListFullTextIndexOption node) { this.action(node); }
508 | public override void Visit(FullTextCatalogAndFileGroup node) { this.action(node); }
509 | public override void Visit(EventTypeContainer node) { this.action(node); }
510 | public override void Visit(EventGroupContainer node) { this.action(node); }
511 | public override void Visit(CreateEventNotificationStatement node) { this.action(node); }
512 | public override void Visit(EventNotificationObjectScope node) { this.action(node); }
513 | public override void Visit(CreateMasterKeyStatement node) { this.action(node); }
514 | public override void Visit(AlterMasterKeyStatement node) { this.action(node); }
515 | public override void Visit(ApplicationRoleOption node) { this.action(node); }
516 | public override void Visit(CreateApplicationRoleStatement node) { this.action(node); }
517 | public override void Visit(AlterApplicationRoleStatement node) { this.action(node); }
518 | public override void Visit(ExecuteInsertSource node) { this.action(node); }
519 | public override void Visit(RowValue node) { this.action(node); }
520 | public override void Visit(PrintStatement node) { this.action(node); }
521 | public override void Visit(UpdateCall node) { this.action(node); }
522 | public override void Visit(TSEqualCall node) { this.action(node); }
523 | public override void Visit(IntegerLiteral node) { this.action(node); }
524 | public override void Visit(NumericLiteral node) { this.action(node); }
525 | public override void Visit(RealLiteral node) { this.action(node); }
526 | public override void Visit(MoneyLiteral node) { this.action(node); }
527 | public override void Visit(BinaryLiteral node) { this.action(node); }
528 | public override void Visit(StringLiteral node) { this.action(node); }
529 | public override void Visit(NullLiteral node) { this.action(node); }
530 | public override void Visit(IdentifierLiteral node) { this.action(node); }
531 | public override void Visit(DefaultLiteral node) { this.action(node); }
532 | public override void Visit(MaxLiteral node) { this.action(node); }
533 | public override void Visit(OdbcLiteral node) { this.action(node); }
534 | public override void Visit(LiteralRange node) { this.action(node); }
535 | public override void Visit(VariableReference node) { this.action(node); }
536 | public override void Visit(OnOffOptionValue node) { this.action(node); }
537 | public override void Visit(LiteralOptionValue node) { this.action(node); }
538 | public override void Visit(GlobalVariableExpression node) { this.action(node); }
539 | public override void Visit(IdentifierOrValueExpression node) { this.action(node); }
540 | public override void Visit(SchemaObjectNameOrValueExpression node) { this.action(node); }
541 | public override void Visit(ParenthesisExpression node) { this.action(node); }
542 | public override void Visit(ColumnReferenceExpression node) { this.action(node); }
543 | public override void Visit(NextValueForExpression node) { this.action(node); }
544 | public override void Visit(SequenceOption node) { this.action(node); }
545 | public override void Visit(DataTypeSequenceOption node) { this.action(node); }
546 | public override void Visit(ScalarExpressionSequenceOption node) { this.action(node); }
547 | public override void Visit(CreateSequenceStatement node) { this.action(node); }
548 | public override void Visit(AlterSequenceStatement node) { this.action(node); }
549 | public override void Visit(DropSequenceStatement node) { this.action(node); }
550 | public override void Visit(CreateAssemblyStatement node) { this.action(node); }
551 | public override void Visit(AlterAssemblyStatement node) { this.action(node); }
552 | public override void Visit(AssemblyOption node) { this.action(node); }
553 | public override void Visit(OnOffAssemblyOption node) { this.action(node); }
554 | public override void Visit(PermissionSetAssemblyOption node) { this.action(node); }
555 | public override void Visit(AddFileSpec node) { this.action(node); }
556 | public override void Visit(CreateXmlSchemaCollectionStatement node) { this.action(node); }
557 | public override void Visit(AlterXmlSchemaCollectionStatement node) { this.action(node); }
558 | public override void Visit(DropXmlSchemaCollectionStatement node) { this.action(node); }
559 | public override void Visit(AssemblyName node) { this.action(node); }
560 | public override void Visit(AlterTableRebuildStatement node) { this.action(node); }
561 | public override void Visit(AlterTableChangeTrackingModificationStatement node) { this.action(node); }
562 | public override void Visit(AlterTableFileTableNamespaceStatement node) { this.action(node); }
563 | public override void Visit(AlterTableSetStatement node) { this.action(node); }
564 | public override void Visit(LockEscalationTableOption node) { this.action(node); }
565 | public override void Visit(FileStreamOnTableOption node) { this.action(node); }
566 | public override void Visit(FileTableDirectoryTableOption node) { this.action(node); }
567 | public override void Visit(FileTableCollateFileNameTableOption node) { this.action(node); }
568 | public override void Visit(FileTableConstraintNameTableOption node) { this.action(node); }
569 | public override void Visit(MemoryOptimizedTableOption node) { this.action(node); }
570 | public override void Visit(DurabilityTableOption node) { this.action(node); }
571 | public override void Visit(AlterTableAddTableElementStatement node) { this.action(node); }
572 | public override void Visit(AlterTableConstraintModificationStatement node) { this.action(node); }
573 | public override void Visit(AlterTableSwitchStatement node) { this.action(node); }
574 | public override void Visit(LiteralAtomicBlockOption node) { this.action(node); }
575 | public override void Visit(IdentifierAtomicBlockOption node) { this.action(node); }
576 | public override void Visit(OnOffAtomicBlockOption node) { this.action(node); }
577 | public override void Visit(BeginTransactionStatement node) { this.action(node); }
578 | public override void Visit(BreakStatement node) { this.action(node); }
579 | public override void Visit(ColumnWithSortOrder node) { this.action(node); }
580 | public override void Visit(CommitTransactionStatement node) { this.action(node); }
581 | public override void Visit(RollbackTransactionStatement node) { this.action(node); }
582 | public override void Visit(SaveTransactionStatement node) { this.action(node); }
583 | public override void Visit(ContinueStatement node) { this.action(node); }
584 | public override void Visit(CreateDefaultStatement node) { this.action(node); }
585 | public override void Visit(CreateFunctionStatement node) { this.action(node); }
586 | public override void Visit(CreateRuleStatement node) { this.action(node); }
587 | public override void Visit(DeclareVariableElement node) { this.action(node); }
588 | public override void Visit(DeclareVariableStatement node) { this.action(node); }
589 | public override void Visit(GoToStatement node) { this.action(node); }
590 | public override void Visit(IfStatement node) { this.action(node); }
591 | public override void Visit(LabelStatement node) { this.action(node); }
592 | public override void Visit(MultiPartIdentifier node) { this.action(node); }
593 | public override void Visit(SchemaObjectName node) { this.action(node); }
594 | public override void Visit(ChildObjectName node) { this.action(node); }
595 | public override void Visit(ProcedureParameter node) { this.action(node); }
596 | public override void Visit(WhileStatement node) { this.action(node); }
597 | public override void Visit(DeleteStatement node) { this.action(node); }
598 | public override void Visit(DeleteSpecification node) { this.action(node); }
599 | public override void Visit(InsertStatement node) { this.action(node); }
600 | public override void Visit(InsertSpecification node) { this.action(node); }
601 | public override void Visit(UpdateStatement node) { this.action(node); }
602 | public override void Visit(UpdateSpecification node) { this.action(node); }
603 | public override void Visit(CreateSchemaStatement node) { this.action(node); }
604 | public override void Visit(WaitForStatement node) { this.action(node); }
605 | public override void Visit(ReadTextStatement node) { this.action(node); }
606 | public override void Visit(UpdateTextStatement node) { this.action(node); }
607 | public override void Visit(WriteTextStatement node) { this.action(node); }
608 | public override void Visit(LineNoStatement node) { this.action(node); }
609 | public override void Visit(GrantStatement node) { this.action(node); }
610 | public override void Visit(DenyStatement node) { this.action(node); }
611 | public override void Visit(RevokeStatement node) { this.action(node); }
612 | public override void Visit(AlterAuthorizationStatement node) { this.action(node); }
613 | public override void Visit(Permission node) { this.action(node); }
614 | public override void Visit(SecurityTargetObject node) { this.action(node); }
615 | public override void Visit(SecurityTargetObjectName node) { this.action(node); }
616 | public override void Visit(SecurityPrincipal node) { this.action(node); }
617 | public override void Visit(GrantStatement80 node) { this.action(node); }
618 | public override void Visit(DenyStatement80 node) { this.action(node); }
619 | public override void Visit(RevokeStatement80 node) { this.action(node); }
620 | public override void Visit(CommandSecurityElement80 node) { this.action(node); }
621 | public override void Visit(PrivilegeSecurityElement80 node) { this.action(node); }
622 | public override void Visit(Privilege80 node) { this.action(node); }
623 | public override void Visit(SecurityUserClause80 node) { this.action(node); }
624 | public override void Visit(SqlCommandIdentifier node) { this.action(node); }
625 | public override void Visit(AssignmentSetClause node) { this.action(node); }
626 | public override void Visit(FunctionCallSetClause node) { this.action(node); }
627 | public override void Visit(ValuesInsertSource node) { this.action(node); }
628 | public override void Visit(SelectInsertSource node) { this.action(node); }
629 | public override void Visit(LiteralTableHint node) { this.action(node); }
630 | public override void Visit(QueryDerivedTable node) { this.action(node); }
631 | public override void Visit(InlineDerivedTable node) { this.action(node); }
632 | public override void Visit(SubqueryComparisonPredicate node) { this.action(node); }
633 | public override void Visit(ExistsPredicate node) { this.action(node); }
634 | public override void Visit(LikePredicate node) { this.action(node); }
635 | public override void Visit(InPredicate node) { this.action(node); }
636 | public override void Visit(FullTextPredicate node) { this.action(node); }
637 | public override void Visit(UserDefinedTypePropertyAccess node) { this.action(node); }
638 | public override void Visit(SelectStatement node) { this.action(node); }
639 | public override void Visit(BrowseForClause node) { this.action(node); }
640 | public override void Visit(ReadOnlyForClause node) { this.action(node); }
641 | public override void Visit(XmlForClause node) { this.action(node); }
642 | public override void Visit(XmlForClauseOption node) { this.action(node); }
643 | public override void Visit(UpdateForClause node) { this.action(node); }
644 | public override void Visit(OptimizerHint node) { this.action(node); }
645 | public override void Visit(LiteralOptimizerHint node) { this.action(node); }
646 | public override void Visit(TableHintsOptimizerHint node) { this.action(node); }
647 | public override void Visit(ForceSeekTableHint node) { this.action(node); }
648 | public override void Visit(OptimizeForOptimizerHint node) { this.action(node); }
649 | public override void Visit(VariableValuePair node) { this.action(node); }
650 | public override void Visit(SimpleWhenClause node) { this.action(node); }
651 | public override void Visit(SearchedWhenClause node) { this.action(node); }
652 | public override void Visit(SimpleCaseExpression node) { this.action(node); }
653 | public override void Visit(SearchedCaseExpression node) { this.action(node); }
654 | public override void Visit(NullIfExpression node) { this.action(node); }
655 | public override void Visit(CoalesceExpression node) { this.action(node); }
656 | public override void Visit(IIfCall node) { this.action(node); }
657 | public override void Visit(FullTextTableReference node) { this.action(node); }
658 | public override void Visit(SemanticTableReference node) { this.action(node); }
659 | public override void Visit(OpenXmlTableReference node) { this.action(node); }
660 | public override void Visit(OpenRowsetTableReference node) { this.action(node); }
661 | public override void Visit(InternalOpenRowset node) { this.action(node); }
662 | public override void Visit(BulkOpenRowset node) { this.action(node); }
663 | public override void Visit(OpenQueryTableReference node) { this.action(node); }
664 | public override void Visit(AdHocTableReference node) { this.action(node); }
665 | public override void Visit(SchemaDeclarationItem node) { this.action(node); }
666 | public override void Visit(ConvertCall node) { this.action(node); }
667 | public override void Visit(TryConvertCall node) { this.action(node); }
668 | public override void Visit(ParseCall node) { this.action(node); }
669 | public override void Visit(TryParseCall node) { this.action(node); }
670 | public override void Visit(CastCall node) { this.action(node); }
671 | public override void Visit(TryCastCall node) { this.action(node); }
672 | public override void Visit(FunctionCall node) { this.action(node); }
673 | public override void Visit(ExpressionCallTarget node) { this.action(node); }
674 | public override void Visit(MultiPartIdentifierCallTarget node) { this.action(node); }
675 | public override void Visit(UserDefinedTypeCallTarget node) { this.action(node); }
676 | public override void Visit(LeftFunctionCall node) { this.action(node); }
677 | public override void Visit(RightFunctionCall node) { this.action(node); }
678 | public override void Visit(PartitionFunctionCall node) { this.action(node); }
679 | public override void Visit(OverClause node) { this.action(node); }
680 | public override void Visit(ParameterlessCall node) { this.action(node); }
681 | public override void Visit(ScalarSubquery node) { this.action(node); }
682 | public override void Visit(OdbcFunctionCall node) { this.action(node); }
683 | public override void Visit(ExtractFromExpression node) { this.action(node); }
684 | public override void Visit(OdbcConvertSpecification node) { this.action(node); }
685 | public override void Visit(AlterFunctionStatement node) { this.action(node); }
686 | public override void Visit(BeginEndBlockStatement node) { this.action(node); }
687 | public override void Visit(BeginEndAtomicBlockStatement node) { this.action(node); }
688 | public override void Visit(StatementList node) { this.action(node); }
689 | public override void Visit(ExecuteStatement node) { this.action(node); }
690 | public override void Visit(ExecuteOption node) { this.action(node); }
691 | public override void Visit(ResultSetsExecuteOption node) { this.action(node); }
692 | public override void Visit(ResultSetDefinition node) { this.action(node); }
693 | public override void Visit(InlineResultSetDefinition node) { this.action(node); }
694 | public override void Visit(ResultColumnDefinition node) { this.action(node); }
695 | public override void Visit(SchemaObjectResultSetDefinition node) { this.action(node); }
696 | public override void Visit(ExecuteSpecification node) { this.action(node); }
697 | public override void Visit(ExecuteContext node) { this.action(node); }
698 | public override void Visit(ExecuteParameter node) { this.action(node); }
699 | public override void Visit(ProcedureReferenceName node) { this.action(node); }
700 | public override void Visit(ExecutableProcedureReference node) { this.action(node); }
701 | public override void Visit(ExecutableStringList node) { this.action(node); }
702 | public override void Visit(AdHocDataSource node) { this.action(node); }
703 | public override void Visit(ViewOption node) { this.action(node); }
704 | public override void Visit(AlterViewStatement node) { this.action(node); }
705 | public override void Visit(CreateViewStatement node) { this.action(node); }
706 | public override void Visit(TriggerObject node) { this.action(node); }
707 | public override void Visit(TriggerOption node) { this.action(node); }
708 | public override void Visit(ExecuteAsTriggerOption node) { this.action(node); }
709 | public override void Visit(TriggerAction node) { this.action(node); }
710 | public override void Visit(AlterTriggerStatement node) { this.action(node); }
711 | public override void Visit(CreateTriggerStatement node) { this.action(node); }
712 | public override void Visit(Identifier node) { this.action(node); }
713 | public override void Visit(AlterProcedureStatement node) { this.action(node); }
714 | public override void Visit(CreateProcedureStatement node) { this.action(node); }
715 | public override void Visit(ProcedureReference node) { this.action(node); }
716 | public override void Visit(MethodSpecifier node) { this.action(node); }
717 | public override void Visit(ProcedureOption node) { this.action(node); }
718 | public override void Visit(ExecuteAsProcedureOption node) { this.action(node); }
719 | public override void Visit(FunctionOption node) { this.action(node); }
720 | public override void Visit(ExecuteAsFunctionOption node) { this.action(node); }
721 | public override void Visit(XmlNamespaces node) { this.action(node); }
722 | public override void Visit(XmlNamespacesDefaultElement node) { this.action(node); }
723 | public override void Visit(XmlNamespacesAliasElement node) { this.action(node); }
724 | public override void Visit(CommonTableExpression node) { this.action(node); }
725 | public override void Visit(WithCtesAndXmlNamespaces node) { this.action(node); }
726 | public override void Visit(TableValuedFunctionReturnType node) { this.action(node); }
727 | public override void Visit(SqlDataTypeReference node) { this.action(node); }
728 | public override void Visit(UserDataTypeReference node) { this.action(node); }
729 | public override void Visit(XmlDataTypeReference node) { this.action(node); }
730 | public override void Visit(ScalarFunctionReturnType node) { this.action(node); }
731 | public override void Visit(SelectFunctionReturnType node) { this.action(node); }
732 | public override void Visit(TableDefinition node) { this.action(node); }
733 | public override void Visit(DeclareTableVariableBody node) { this.action(node); }
734 | public override void Visit(DeclareTableVariableStatement node) { this.action(node); }
735 | public override void Visit(NamedTableReference node) { this.action(node); }
736 | public override void Visit(SchemaObjectFunctionTableReference node) { this.action(node); }
737 | public override void Visit(TableHint node) { this.action(node); }
738 | public override void Visit(IndexTableHint node) { this.action(node); }
739 |
740 | }
741 | }
--------------------------------------------------------------------------------
/src/SqlSkim.Sdk/ExtensionMethods.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using Microsoft.CodeAnalysis.Sarif.Sdk;
5 | using Microsoft.SqlServer.TransactSql.ScriptDom;
6 |
7 | namespace Microsoft.CodeAnalysis.Sql
8 | {
9 | public static class ExtensionMethod
10 | {
11 | public static Region CreateRegion(this ParseError parseError)
12 | {
13 | var region = new Region();
14 | region.StartLine = parseError.Line;
15 | region.StartColumn = parseError.Column;
16 | return region;
17 | }
18 |
19 | public static Region CreateRegion(this TSqlFragment tsqlFragment)
20 | {
21 | var region = new Region();
22 | region.StartLine = tsqlFragment.StartLine;
23 | region.StartColumn = tsqlFragment.StartColumn;
24 |
25 | // TODO disabled pending SourceMap port
26 | //region.CharOffset = tsqlFragment.StartOffset;
27 | //region.Length = tsqlFragment.FragmentLength;
28 |
29 | // TODO this is only true for regions that don't span multiple lines
30 | region.EndColumn = region.StartColumn + tsqlFragment.FragmentLength;
31 |
32 | return region;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/SqlSkim.Sdk/ISqlSkimmer.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 |
7 | using Microsoft.CodeAnalysis.Sarif.Driver.Sdk;
8 | using Microsoft.CodeAnalysis.Sarif.Sdk;
9 |
10 | using Microsoft.SqlServer.TransactSql.ScriptDom;
11 |
12 | namespace Microsoft.CodeAnalysis.Sql.Sdk
13 | {
14 | public interface ISqlSkimmer : ISkimmer, IRuleDescriptor
15 | {
16 | IEnumerable Types { get; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/SqlSkim.Sdk/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System.Reflection;
5 | using System.Runtime.InteropServices;
6 |
7 |
--------------------------------------------------------------------------------
/src/SqlSkim.Sdk/SkimmerBase.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Resources;
7 |
8 | using Microsoft.CodeAnalysis.Sarif.Driver.Sdk;
9 |
10 | namespace Microsoft.CodeAnalysis.Sql.Sdk
11 | {
12 | public abstract class SqlSkimmerBase : SkimmerBase, ISqlSkimmer
13 | {
14 | public abstract IEnumerable Types { get; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/SqlSkim.Sdk/SqlFileContext.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.IO;
7 |
8 | using Microsoft.CodeAnalysis.Sarif.Driver.Sdk;
9 | using Microsoft.CodeAnalysis.Sarif.Sdk;
10 | using Microsoft.SqlServer.TransactSql.ScriptDom;
11 |
12 | namespace Microsoft.CodeAnalysis.Sql
13 | {
14 | public class SqlFileContext : IAnalysisContext
15 | {
16 | private static HashSet ValidFileExtensions = new HashSet(
17 | new string[] { ".sql" }, StringComparer.OrdinalIgnoreCase);
18 |
19 | private object lockObject;
20 | private TSqlFragment tsqlFragment;
21 |
22 | public SqlFileContext()
23 | {
24 | this.lockObject = new object();
25 | }
26 |
27 | public bool IsValidAnalysisTarget
28 | {
29 | get
30 | {
31 | return ValidFileExtensions.Contains(Path.GetExtension(this.TargetUri.LocalPath));
32 | }
33 | }
34 |
35 | public IList TryGetTSqlFragment(out TSqlFragment fragment)
36 | {
37 | IList errors;
38 |
39 | if (this.tsqlFragment != null)
40 | {
41 | fragment = this.tsqlFragment;
42 | return null;
43 | }
44 |
45 | errors = null;
46 | fragment = null;
47 |
48 | lock (this.lockObject)
49 | {
50 | if (this.tsqlFragment == null)
51 | {
52 | var parser = new TSql120Parser(initialQuotedIdentifiers: false);
53 |
54 | using (StringReader reader = new StringReader(File.ReadAllText(TargetUri.LocalPath)))
55 | {
56 | this.tsqlFragment = parser.Parse(reader, out errors);
57 | }
58 | }
59 | }
60 |
61 | fragment = this.tsqlFragment;
62 | return errors;
63 | }
64 |
65 | public TSqlFragment Fragment { get; set; }
66 |
67 | public IAnalysisLogger Logger { get; set; }
68 |
69 | public PropertyBag Policy { get; set; }
70 |
71 | public IRuleDescriptor Rule { get; set; }
72 |
73 | public Exception TargetLoadException { get; set; }
74 |
75 | public Uri TargetUri { get; set; }
76 |
77 | public string MimeType { get; set; }
78 |
79 | public RuntimeConditions RuntimeErrors { get; set; }
80 |
81 | public void Dispose()
82 | {
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/src/SqlSkim.Sdk/SqlSkim.Sdk.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {D5A40E1A-89B9-42AD-A136-C512896A9BC8}
5 |
6 |
7 | Microsoft.CodeAnalysis.Sql
8 |
9 |
10 | SqlSkim.Sdk
11 |
12 |
13 | Library
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | ..\packages\Microsoft.SqlServer.TransactSql.ScriptDom.12.0.1\lib\net40\Microsoft.SqlServer.TransactSql.ScriptDom.dll
22 | True
23 |
24 |
25 | ..\packages\Newtonsoft.Json.8.0.1\lib\net45\Newtonsoft.Json.dll
26 | True
27 |
28 |
29 | ..\packages\Sarif.Sdk.1.4.23-beta\lib\net40\Sarif.dll
30 | True
31 |
32 |
33 | ..\packages\Sarif.Driver.1.4.23-beta\lib\net40\Sarif.Driver.dll
34 | True
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | {d87c16f2-a31e-43df-9657-854add3b39d9}
56 | SqlSkim.Parsers
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/src/SqlSkim.Sdk/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/SqlSkim.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlSkim.Driver", "SqlSkim.Driver\SqlSkim.Driver.csproj", "{8F4BDD7A-CF06-4D41-8D0E-C78AA055C759}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlSkim.Sdk", "SqlSkim.Sdk\SqlSkim.Sdk.csproj", "{D5A40E1A-89B9-42AD-A136-C512896A9BC8}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlSkim.Rules", "SqlSkim.Rules\SqlSkim.Rules.csproj", "{1F1583AB-55FD-41B8-9B18-53D4F4B9C552}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlSkim.Driver.UnitTests", "SqlSkim.Driver.UnitTests\SqlSkim.Driver.UnitTests.csproj", "{14E3D312-9871-4784-B312-0345536B3D1D}"
13 | EndProject
14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlSkim.Parsers", "SqlSkim.Parsers\SqlSkim.Parsers.csproj", "{D87C16F2-A31E-43DF-9657-854ADD3B39D9}"
15 | EndProject
16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlSkim.Parsers.UnitTests", "SqlSkim.Parsers.UnitTests\SqlSkim.Parsers.UnitTests.csproj", "{E838EC9E-505D-4C34-9CF8-4AF754710CE3}"
17 | EndProject
18 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlSkim.Rules.UnitTests", "SqlSkim.Rules.UnitTests\SqlSkim.Rules.UnitTests.csproj", "{477AE8D6-2D38-4B85-90A9-E869AAA9D1FD}"
19 | EndProject
20 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlSkim.Sdk.UnitTests", "SqlSkim.Sdk.UnitTests\SqlSkim.Sdk.UnitTests.csproj", "{62AFB42E-06B2-4DE3-98E5-7CE679D3CF56}"
21 | EndProject
22 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlSkim.Driver.FunctionalTests", "SqlSkim.Driver.FunctionalTests\SqlSkim.Driver.FunctionalTests.csproj", "{9E73C78B-DBE2-4ED1-888F-6610F0E73E70}"
23 | EndProject
24 | Global
25 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
26 | Debug|Any CPU = Debug|Any CPU
27 | Release|Any CPU = Release|Any CPU
28 | EndGlobalSection
29 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
30 | {8F4BDD7A-CF06-4D41-8D0E-C78AA055C759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31 | {8F4BDD7A-CF06-4D41-8D0E-C78AA055C759}.Debug|Any CPU.Build.0 = Debug|Any CPU
32 | {8F4BDD7A-CF06-4D41-8D0E-C78AA055C759}.Release|Any CPU.ActiveCfg = Release|Any CPU
33 | {8F4BDD7A-CF06-4D41-8D0E-C78AA055C759}.Release|Any CPU.Build.0 = Release|Any CPU
34 | {D5A40E1A-89B9-42AD-A136-C512896A9BC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35 | {D5A40E1A-89B9-42AD-A136-C512896A9BC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
36 | {D5A40E1A-89B9-42AD-A136-C512896A9BC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
37 | {D5A40E1A-89B9-42AD-A136-C512896A9BC8}.Release|Any CPU.Build.0 = Release|Any CPU
38 | {1F1583AB-55FD-41B8-9B18-53D4F4B9C552}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39 | {1F1583AB-55FD-41B8-9B18-53D4F4B9C552}.Debug|Any CPU.Build.0 = Debug|Any CPU
40 | {1F1583AB-55FD-41B8-9B18-53D4F4B9C552}.Release|Any CPU.ActiveCfg = Release|Any CPU
41 | {1F1583AB-55FD-41B8-9B18-53D4F4B9C552}.Release|Any CPU.Build.0 = Release|Any CPU
42 | {14E3D312-9871-4784-B312-0345536B3D1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43 | {14E3D312-9871-4784-B312-0345536B3D1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
44 | {14E3D312-9871-4784-B312-0345536B3D1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
45 | {14E3D312-9871-4784-B312-0345536B3D1D}.Release|Any CPU.Build.0 = Release|Any CPU
46 | {D87C16F2-A31E-43DF-9657-854ADD3B39D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47 | {D87C16F2-A31E-43DF-9657-854ADD3B39D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
48 | {D87C16F2-A31E-43DF-9657-854ADD3B39D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
49 | {D87C16F2-A31E-43DF-9657-854ADD3B39D9}.Release|Any CPU.Build.0 = Release|Any CPU
50 | {E838EC9E-505D-4C34-9CF8-4AF754710CE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51 | {E838EC9E-505D-4C34-9CF8-4AF754710CE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
52 | {E838EC9E-505D-4C34-9CF8-4AF754710CE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
53 | {E838EC9E-505D-4C34-9CF8-4AF754710CE3}.Release|Any CPU.Build.0 = Release|Any CPU
54 | {477AE8D6-2D38-4B85-90A9-E869AAA9D1FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55 | {477AE8D6-2D38-4B85-90A9-E869AAA9D1FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
56 | {477AE8D6-2D38-4B85-90A9-E869AAA9D1FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
57 | {477AE8D6-2D38-4B85-90A9-E869AAA9D1FD}.Release|Any CPU.Build.0 = Release|Any CPU
58 | {62AFB42E-06B2-4DE3-98E5-7CE679D3CF56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
59 | {62AFB42E-06B2-4DE3-98E5-7CE679D3CF56}.Debug|Any CPU.Build.0 = Debug|Any CPU
60 | {62AFB42E-06B2-4DE3-98E5-7CE679D3CF56}.Release|Any CPU.ActiveCfg = Release|Any CPU
61 | {62AFB42E-06B2-4DE3-98E5-7CE679D3CF56}.Release|Any CPU.Build.0 = Release|Any CPU
62 | {9E73C78B-DBE2-4ED1-888F-6610F0E73E70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
63 | {9E73C78B-DBE2-4ED1-888F-6610F0E73E70}.Debug|Any CPU.Build.0 = Debug|Any CPU
64 | {9E73C78B-DBE2-4ED1-888F-6610F0E73E70}.Release|Any CPU.ActiveCfg = Release|Any CPU
65 | {9E73C78B-DBE2-4ED1-888F-6610F0E73E70}.Release|Any CPU.Build.0 = Release|Any CPU
66 | EndGlobalSection
67 | GlobalSection(SolutionProperties) = preSolution
68 | HideSolutionNode = FALSE
69 | EndGlobalSection
70 | EndGlobal
71 |
--------------------------------------------------------------------------------
/src/build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Release
6 | Any CPU
7 | $(MsBuildThisFileDirectory)..\bld\obj\$(MSBuildProjectName)\$(Platform)\$(Configuration)\
8 | $(MsBuildThisFileDirectory)..\bld\bin\$(MSBuildProjectName)\$(Platform)_$(Configuration)\
9 | $(MsBuildThisFileDirectory)..\bld\bin\DataModelGenerator\$(Platform)_$(Configuration)\
10 | v4.5.2
11 | 512
12 | true
13 | true
14 | false
15 | prompt
16 | 4
17 |
18 |
19 |
20 | true
21 | full
22 | false
23 | DEBUG;TRACE
24 |
25 |
26 | Any CPU
27 |
28 |
29 | Release
30 |
31 |
32 | pdbonly
33 | true
34 | TRACE
35 |
36 |
37 | x86
38 |
39 |
40 | x64
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------