Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Github Issue 85 (Pull Request) followup:

 - Removed "df" file, appears to have been a commit comment artifact from some Git client.
 - Added "Contributors" section to all modified files
 - Set option defaults in command-line tool - as an external interface, it needs defaults to be explicitly maintained.
 - Minor null-reference safety issues
 - Commented serialization code a little to avoid future confusion
 - Switched to using Object Initializers instead of many separate statements to set up the Options object; no good reason, just feels cleaner.
  • Loading branch information...
commit 5ff3dab118e8244485a40d4d8333b605f746492d 1 parent 8403209
@TaoK authored
View
4 CHANGELOG.md
@@ -1,6 +1,10 @@
## Poor Man's T-SQL Formatter change log
+### Version 1.5.1
+
+* Github Issue #85: [Enhancement] Merged code cleanup changes by Timothy Klenke
+
### Version 1.4.4 (SSMS / Visual Studio Add-In only)
* Github Issue #79: [BugFix] Fix SSMS Add-In to work in unexpected languages [thanks Paulo Stradioti for the bug report]
View
32 PoorMansTSqlFormatterCmdLine/Program.cs
@@ -1,7 +1,10 @@
/*
Poor Man's T-SQL Formatter - a small free Transact-SQL formatting
library for .Net 2.0, written in C#.
-Copyright (C) 2011 Tao Klerks
+Copyright (C) 2011-2013 Tao Klerks
+
+Additional Contributors:
+ * Timothy Klenke, 2012
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@@ -37,18 +40,35 @@ class Program
static int Main(string[] args)
{
- var options = new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatterOptions();
- options.KeywordStandardization = true;
-
+ //formatter engine option defaults
+ var options = new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatterOptions
+ {
+ KeywordStandardization = true,
+ IndentString = "\t",
+ SpacesPerTab = 4,
+ MaxLineWidth = 999,
+ TrailingCommas = false,
+ SpaceAfterExpandedComma = false,
+ ExpandBetweenConditions = true,
+ ExpandBooleanExpressions = true,
+ ExpandCaseStatements = true,
+ ExpandCommaLists = true,
+ BreakJoinOnSections = false,
+ UppercaseKeywords = true
+ };
+
+ //bulk formatter options
bool allowParsingErrors = false;
- bool showUsageFriendly = false;
- bool showUsageError = false;
List<string> extensions = new List<string>();
bool backups = true;
bool recursiveSearch = false;
string outputFileOrFolder = null;
string uiLangCode = null;
+ //flow/tracking switches
+ bool showUsageFriendly = false;
+ bool showUsageError = false;
+
OptionSet p = new OptionSet()
.Add("is|indentString=", delegate(string v) { options.IndentString = v; })
.Add("st|spacesPerTab=", delegate(string v) { options.SpacesPerTab = int.Parse(v); })
View
43 PoorMansTSqlFormatterDemo/MainForm.cs
@@ -1,7 +1,10 @@
/*
Poor Man's T-SQL Formatter - a small free Transact-SQL formatting
library for .Net 2.0, written in C#.
-Copyright (C) 2011 Tao Klerks
+Copyright (C) 2011-2013 Tao Klerks
+
+Additional Contributors:
+ * Timothy Klenke, 2012
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@@ -160,30 +163,30 @@ private void SetFormatter()
PoorMansTSqlFormatterLib.Interfaces.ISqlTreeFormatter innerFormatter;
if (radio_Formatting_Standard.Checked)
{
- var options = new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatterOptions();
- options.IndentString = txt_Indent.Text;
- options.SpacesPerTab = int.Parse(txt_IndentWidth.Text);
- options.MaxLineWidth = int.Parse(txt_MaxWidth.Text);
- options.ExpandCommaLists = chk_ExpandCommaLists.Checked;
- options.TrailingCommas = chk_TrailingCommas.Checked;
- options.SpaceAfterExpandedComma = chk_SpaceAfterComma.Checked;
- options.ExpandBooleanExpressions = chk_ExpandBooleanExpressions.Checked;
- options.ExpandCaseStatements = chk_ExpandCaseStatements.Checked;
- options.ExpandBetweenConditions = chk_ExpandBetweenConditions.Checked;
- options.BreakJoinOnSections = chk_BreakJoinOnSections.Checked;
- options.UppercaseKeywords = chk_UppercaseKeywords.Checked;
- options.HTMLColoring = chk_Coloring.Checked;
- options.KeywordStandardization = chk_EnableKeywordStandardization.Checked;
-
- innerFormatter = new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatter(options);
+ innerFormatter = new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatter(new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatterOptions
+ {
+ IndentString = txt_Indent.Text,
+ SpacesPerTab = int.Parse(txt_IndentWidth.Text),
+ MaxLineWidth = int.Parse(txt_MaxWidth.Text),
+ ExpandCommaLists = chk_ExpandCommaLists.Checked,
+ TrailingCommas = chk_TrailingCommas.Checked,
+ SpaceAfterExpandedComma = chk_SpaceAfterComma.Checked,
+ ExpandBooleanExpressions = chk_ExpandBooleanExpressions.Checked,
+ ExpandCaseStatements = chk_ExpandCaseStatements.Checked,
+ ExpandBetweenConditions = chk_ExpandBetweenConditions.Checked,
+ BreakJoinOnSections = chk_BreakJoinOnSections.Checked,
+ UppercaseKeywords = chk_UppercaseKeywords.Checked,
+ HTMLColoring = chk_Coloring.Checked,
+ KeywordStandardization = chk_EnableKeywordStandardization.Checked
+ });
}
else if (radio_Formatting_Identity.Checked)
innerFormatter = new PoorMansTSqlFormatterLib.Formatters.TSqlIdentityFormatter(chk_IdentityColoring.Checked);
else
innerFormatter = new PoorMansTSqlFormatterLib.Formatters.TSqlObfuscatingFormatter(
- chk_RandomizeKeywordCase.Checked,
- chk_RandomizeColor.Checked,
- chk_RandomizeLineLength.Checked,
+ chk_RandomizeKeywordCase.Checked,
+ chk_RandomizeColor.Checked,
+ chk_RandomizeLineLength.Checked,
chk_PreserveComments.Checked,
chk_KeywordSubstitution.Checked
);
View
52 PoorMansTSqlFormatterLib/Formatters/TSqlStandardFormatter.cs
@@ -1,8 +1,11 @@
/*
Poor Man's T-SQL Formatter - a small free Transact-SQL formatting
library for .Net 2.0, written in C#.
-Copyright (C) 2011 Tao Klerks
+Copyright (C) 2011-2013 Tao Klerks
+Additional Contributors:
+ * Timothy Klenke, 2012
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@@ -16,8 +19,8 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
+*/
+
using System;
using System.Collections.Generic;
using System.Text;
@@ -34,8 +37,12 @@ public class TSqlStandardFormatter : Interfaces.ISqlTreeFormatter
public TSqlStandardFormatter() : this(new TSqlStandardFormatterOptions()) { }
public TSqlStandardFormatter(TSqlStandardFormatterOptions options)
- {
+ {
+ if (options == null)
+ throw new ArgumentNullException("options");
+
Options = options;
+
if (options.KeywordStandardization)
KeywordMapping = StandardKeywordRemapping.Instance;
ErrorOutputPrefix = Interfaces.MessagingConstants.FormatErrorDefaultMessage + Environment.NewLine;
@@ -43,31 +50,30 @@ public TSqlStandardFormatter(TSqlStandardFormatterOptions options)
[Obsolete("Use the constructor with the TSqlStandardFormatterOptions parameter")]
public TSqlStandardFormatter(string indentString, int spacesPerTab, int maxLineWidth, bool expandCommaLists, bool trailingCommas, bool spaceAfterExpandedComma, bool expandBooleanExpressions, bool expandCaseStatements, bool expandBetweenConditions, bool breakJoinOnSections, bool uppercaseKeywords, bool htmlColoring, bool keywordStandardization)
- {
- var options = new TSqlStandardFormatterOptions();
-
- options.IndentString = indentString;
- options.SpacesPerTab = spacesPerTab;
- options.MaxLineWidth = maxLineWidth;
- options.ExpandCommaLists = expandCommaLists;
- options.TrailingCommas = trailingCommas;
- options.SpaceAfterExpandedComma = spaceAfterExpandedComma;
- options.ExpandBooleanExpressions = expandBooleanExpressions;
- options.ExpandBetweenConditions = expandBetweenConditions;
- options.ExpandCaseStatements = expandCaseStatements;
- options.UppercaseKeywords = uppercaseKeywords;
- options.BreakJoinOnSections = breakJoinOnSections;
- options.HTMLColoring = htmlColoring;
- options.KeywordStandardization = keywordStandardization;
-
- Options = options;
+ {
+ Options = new TSqlStandardFormatterOptions
+ {
+ IndentString = indentString,
+ SpacesPerTab = spacesPerTab,
+ MaxLineWidth = maxLineWidth,
+ ExpandCommaLists = expandCommaLists,
+ TrailingCommas = trailingCommas,
+ SpaceAfterExpandedComma = spaceAfterExpandedComma,
+ ExpandBooleanExpressions = expandBooleanExpressions,
+ ExpandBetweenConditions = expandBetweenConditions,
+ ExpandCaseStatements = expandCaseStatements,
+ UppercaseKeywords = uppercaseKeywords,
+ BreakJoinOnSections = breakJoinOnSections,
+ HTMLColoring = htmlColoring,
+ KeywordStandardization = keywordStandardization
+ };
if (keywordStandardization)
KeywordMapping = StandardKeywordRemapping.Instance;
ErrorOutputPrefix = Interfaces.MessagingConstants.FormatErrorDefaultMessage + Environment.NewLine;
}
- public TSqlStandardFormatterOptions Options { get; set; }
+ public TSqlStandardFormatterOptions Options { get; private set; }
public IDictionary<string, string> KeywordMapping = new Dictionary<string, string>();
View
64 PoorMansTSqlFormatterLib/Formatters/TSqlStandardFormatterOptions.cs
@@ -3,6 +3,9 @@
library for .Net 2.0, written in C#.
Copyright (C) 2011 Tao Klerks
+Additional Contributors:
+ * Timothy Klenke, 2012
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@@ -16,14 +19,10 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
+*/
+
using System;
using System.Collections.Generic;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Xml;
-using PoorMansTSqlFormatterLib.Interfaces;
using System.Linq;
namespace PoorMansTSqlFormatterLib.Formatters
@@ -45,12 +44,18 @@ public TSqlStandardFormatterOptions()
BreakJoinOnSections = false;
HTMLColoring = false;
KeywordStandardization = false;
- }
+ }
+
+ //Doesn't particularly need to be lazy-loaded, and doesn't need to be threadsafe.
+ private static readonly TSqlStandardFormatterOptions _defaultOptions = new TSqlStandardFormatterOptions();
public TSqlStandardFormatterOptions(string serializedString) : this() {
- if (string.IsNullOrEmpty(serializedString)) return;
-
+ if (string.IsNullOrEmpty(serializedString))
+ return;
+
+ //PLEASE NOTE: This is not reusable/general-purpose key-value serialization: it does not handle commas in data.
+ // For now, this is used in the Test library only.
foreach (string kvp in serializedString.Split(','))
{
string[] splitPair = kvp.Split('=');
@@ -73,26 +78,27 @@ public TSqlStandardFormatterOptions()
else throw new ArgumentException("Unknown option: " + key);
}
- }
-
- public string ToSerializedString() {
- var overrides = new Dictionary<string, string>();
-
- var defaultOptions = new TSqlStandardFormatterOptions();
-
- if (IndentString != defaultOptions.IndentString) overrides.Add("IndentString", IndentString);
- if (SpacesPerTab != defaultOptions.SpacesPerTab) overrides.Add("SpacesPerTab", SpacesPerTab.ToString());
- if (MaxLineWidth != defaultOptions.MaxLineWidth) overrides.Add("MaxLineWidth", MaxLineWidth.ToString());
- if (ExpandCommaLists != defaultOptions.ExpandCommaLists) overrides.Add("ExpandCommaLists", ExpandCommaLists.ToString());
- if (TrailingCommas != defaultOptions.TrailingCommas) overrides.Add("TrailingCommas", TrailingCommas.ToString());
- if (SpaceAfterExpandedComma != defaultOptions.SpaceAfterExpandedComma) overrides.Add("SpaceAfterExpandedComma", SpaceAfterExpandedComma.ToString());
- if (ExpandBooleanExpressions != defaultOptions.ExpandBooleanExpressions) overrides.Add("ExpandBooleanExpressions", ExpandBooleanExpressions.ToString());
- if (ExpandBetweenConditions != defaultOptions.ExpandBetweenConditions) overrides.Add("ExpandBetweenConditions", ExpandBetweenConditions.ToString());
- if (ExpandCaseStatements != defaultOptions.ExpandCaseStatements) overrides.Add("ExpandCaseStatements", ExpandCaseStatements.ToString());
- if (UppercaseKeywords != defaultOptions.UppercaseKeywords) overrides.Add("UppercaseKeywords", UppercaseKeywords.ToString());
- if (BreakJoinOnSections != defaultOptions.BreakJoinOnSections) overrides.Add("BreakJoinOnSections", BreakJoinOnSections.ToString());
- if (HTMLColoring != defaultOptions.HTMLColoring) overrides.Add("HTMLColoring", HTMLColoring.ToString());
- if (KeywordStandardization != defaultOptions.KeywordStandardization) overrides.Add("KeywordStandardization", KeywordStandardization.ToString());
+ }
+
+ //PLEASE NOTE: This is not reusable/general-purpose key-value serialization: it does not handle commas in data.
+ // For now, this is used in the Test library only.
+ public string ToSerializedString()
+ {
+ var overrides = new Dictionary<string, string>();
+
+ if (IndentString != _defaultOptions.IndentString) overrides.Add("IndentString", IndentString);
+ if (SpacesPerTab != _defaultOptions.SpacesPerTab) overrides.Add("SpacesPerTab", SpacesPerTab.ToString());
+ if (MaxLineWidth != _defaultOptions.MaxLineWidth) overrides.Add("MaxLineWidth", MaxLineWidth.ToString());
+ if (ExpandCommaLists != _defaultOptions.ExpandCommaLists) overrides.Add("ExpandCommaLists", ExpandCommaLists.ToString());
+ if (TrailingCommas != _defaultOptions.TrailingCommas) overrides.Add("TrailingCommas", TrailingCommas.ToString());
+ if (SpaceAfterExpandedComma != _defaultOptions.SpaceAfterExpandedComma) overrides.Add("SpaceAfterExpandedComma", SpaceAfterExpandedComma.ToString());
+ if (ExpandBooleanExpressions != _defaultOptions.ExpandBooleanExpressions) overrides.Add("ExpandBooleanExpressions", ExpandBooleanExpressions.ToString());
+ if (ExpandBetweenConditions != _defaultOptions.ExpandBetweenConditions) overrides.Add("ExpandBetweenConditions", ExpandBetweenConditions.ToString());
+ if (ExpandCaseStatements != _defaultOptions.ExpandCaseStatements) overrides.Add("ExpandCaseStatements", ExpandCaseStatements.ToString());
+ if (UppercaseKeywords != _defaultOptions.UppercaseKeywords) overrides.Add("UppercaseKeywords", UppercaseKeywords.ToString());
+ if (BreakJoinOnSections != _defaultOptions.BreakJoinOnSections) overrides.Add("BreakJoinOnSections", BreakJoinOnSections.ToString());
+ if (HTMLColoring != _defaultOptions.HTMLColoring) overrides.Add("HTMLColoring", HTMLColoring.ToString());
+ if (KeywordStandardization != _defaultOptions.KeywordStandardization) overrides.Add("KeywordStandardization", KeywordStandardization.ToString());
if (overrides.Count == 0) return string.Empty;
return string.Join(",", overrides.Select((kvp) => kvp.Key + "=" + kvp.Value).ToArray());
View
35 PoorMansTSqlFormatterPluginShared/Utils.cs
@@ -1,7 +1,10 @@
/*
Poor Man's T-SQL Formatter - a small free Transact-SQL formatting
library for .Net 2.0, written in C#.
-Copyright (C) 2011 Tao Klerks
+Copyright (C) 2011-2013 Tao Klerks
+
+Additional Contributors:
+ * Timothy Klenke, 2012
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@@ -28,22 +31,22 @@ public static class Utils
{
public static PoorMansTSqlFormatterLib.SqlFormattingManager GetFormattingManager(ISqlSettings settings)
{
- var options = new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatterOptions();
- options.IndentString = settings.IndentString;
- options.SpacesPerTab = settings.SpacesPerTab;
- options.MaxLineWidth = settings.MaxLineWidth;
- options.ExpandCommaLists = settings.ExpandCommaLists;
- options.TrailingCommas = settings.TrailingCommas;
- options.SpaceAfterExpandedComma = settings.SpaceAfterExpandedComma;
- options.ExpandBooleanExpressions = settings.ExpandBooleanExpressions;
- options.ExpandCaseStatements = settings.ExpandCaseStatements;
- options.ExpandBetweenConditions = settings.ExpandBetweenConditions;
- options.BreakJoinOnSections = settings.BreakJoinOnSections;
- options.UppercaseKeywords = settings.UppercaseKeywords;
- options.KeywordStandardization = settings.KeywordStandardization;
+ var formatter = new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatter(new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatterOptions
+ {
+ IndentString = settings.IndentString,
+ SpacesPerTab = settings.SpacesPerTab,
+ MaxLineWidth = settings.MaxLineWidth,
+ ExpandCommaLists = settings.ExpandCommaLists,
+ TrailingCommas = settings.TrailingCommas,
+ SpaceAfterExpandedComma = settings.SpaceAfterExpandedComma,
+ ExpandBooleanExpressions = settings.ExpandBooleanExpressions,
+ ExpandCaseStatements = settings.ExpandCaseStatements,
+ ExpandBetweenConditions = settings.ExpandBetweenConditions,
+ BreakJoinOnSections = settings.BreakJoinOnSections,
+ UppercaseKeywords = settings.UppercaseKeywords,
+ KeywordStandardization = settings.KeywordStandardization
+ });
- var formatter = new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatter(options);
-
ResourceManager _generalResourceManager = new ResourceManager("PoorMansTSqlFormatterPluginShared.GeneralLanguageContent", Assembly.GetExecutingAssembly());
formatter.ErrorOutputPrefix = _generalResourceManager.GetString("ParseErrorWarningPrefix") + System.Environment.NewLine;
var formattingManager = new PoorMansTSqlFormatterLib.SqlFormattingManager(formatter);
View
324 PoorMansTSqlFormatterTest/PoorMansTSqlFormatterTests.csproj
@@ -1,169 +1,169 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{FBBF4CE8-C24D-4A43-9D8C-B54B2E7E3FB7}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>PoorMansTSqlFormatterTests</RootNamespace>
- <AssemblyName>PoorMansTSqlFormatterTests</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <StartupObject>PoorMansTSqlFormatterTests.Program</StartupObject>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="nunit-gui-runner, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>References\NUnit\nunit-gui-runner.dll</HintPath>
- </Reference>
- <Reference Include="nunit.core, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>References\NUnit\nunit.core.dll</HintPath>
- </Reference>
- <Reference Include="nunit.core.interfaces, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>References\NUnit\nunit.core.interfaces.dll</HintPath>
- </Reference>
- <Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>References\NUnit\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="nunit.uiexception, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>References\NUnit\nunit.uiexception.dll</HintPath>
- </Reference>
- <Reference Include="nunit.uikit, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>References\NUnit\nunit.uikit.dll</HintPath>
- </Reference>
- <Reference Include="nunit.util, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>References\NUnit\nunit.util.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.XML" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="ParserTests.cs" />
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="TSqlIdentityFormatterTests.cs" />
- <Compile Include="TSqlObfuscatingFormatterTests.cs" />
- <Compile Include="TSqlStandardFormatterOptionsTests.cs" />
- <Compile Include="TSqlStandardFormatterTests.cs" />
- <Compile Include="Utils.cs" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="Data\InputSql\10_SetOperators_Union.txt" />
- <Content Include="Data\InputSql\11_MSAccess_Pasted.txt" />
- <Content Include="Data\InputSql\12_NestedIfElse.txt" />
- <Content Include="Data\InputSql\14_CommentPositioning.txt" />
- <Content Include="Data\InputSql\15_NestedComments.txt" />
- <Content Include="Data\InputSql\16_CurrencyParsingStrangeness.txt" />
- <Content Include="Data\InputSql\17_Cursors.txt" />
- <Content Include="Data\InputSql\18_BulkInsert.txt" />
- <Content Include="Data\InputSql\01_SimpleTypes_StrangeRules.txt" />
- <Content Include="Data\InputSql\20_Joins.txt" />
- <Content Include="Data\InputSql\02_Random_INVALID.txt" />
- <Content Include="Data\InputSql\03_SimpleSelect_MS.txt" />
- <Content Include="Data\InputSql\04_MiscProceduralSample_Unstructured.txt" />
- <Content Include="Data\InputSql\05_ComplexDDL.txt" />
- <Content Include="Data\InputSql\06_CTE_Sample_MS.txt" />
- <Content Include="Data\InputSql\07_ServerTakeoverSample_Brent_Ozar.txt" />
- <Content Include="Data\InputSql\08_ComplexBackupDDL_Ola_Hallengren.txt" />
- <Content Include="Data\InputSql\09_Xml_Selection_Function.txt" />
- <Content Include="Data\InputSql\19_DMLTrigger.txt" />
- <Content Include="Data\InputSql\13_NestedBooleanExpressions.txt" />
- <Content Include="Data\InputSql\23_ReparsingInconsistency.txt" />
- <Content Include="Data\InputSql\21_DDL_Permissions.txt" />
- <Content Include="Data\InputSql\22_DDL_WithClauses.txt" />
- <Content Include="Data\InputSql\24_InsertsAndOutputs.txt" />
- <Content Include="Data\InputSql\25_Merges.txt" />
- <Content Include="Data\InputSql\26_DataTypesAndSynonyms.txt" />
- <Content Include="Data\InputSql\27_OtherSqlFlavourSupport.txt" />
- <Content Include="Data\ParsedSql\01_SimpleTypes_StrangeRules.txt" />
- <Content Include="Data\ParsedSql\03_SimpleSelect_MS.txt" />
- <Content Include="Data\ParsedSql\04_MiscProceduralSample_Unstructured.txt" />
- <Content Include="Data\ParsedSql\05_ComplexDDL.txt" />
- <Content Include="Data\ParsedSql\06_CTE_Sample_MS.txt" />
- <Content Include="Data\ParsedSql\07_ServerTakeoverSample_Brent_Ozar.txt" />
- <Content Include="Data\ParsedSql\08_ComplexBackupDDL_Ola_Hallengren.txt" />
- <Content Include="Data\ParsedSql\10_SetOperators_Union.txt" />
- <Content Include="Data\ParsedSql\12_NestedIfElse.txt" />
- <Content Include="Data\ParsedSql\14_CommentPositioning.txt" />
- <Content Include="Data\ParsedSql\15_NestedComments.txt" />
- <Content Include="Data\ParsedSql\16_CurrencyParsingStrangeness.txt" />
- <Content Include="Data\ParsedSql\17_Cursors.txt" />
- <Content Include="Data\ParsedSql\19_DMLTrigger.txt" />
- <Content Include="Data\ParsedSql\20_Joins.txt" />
- <Content Include="Data\ParsedSql\21_DDL_Permissions.txt" />
- <Content Include="Data\ParsedSql\22_DDL_WithClauses.txt" />
- <Content Include="Data\ParsedSql\24_InsertsAndOutputs.txt" />
- <Content Include="Data\ParsedSql\25_Merges.txt" />
- <Content Include="Data\ParsedSql\26_DataTypesAndSynonyms.txt" />
- <Content Include="Data\ParsedSql\11_MSAccess_Pasted.txt" />
- <Content Include="Data\ParsedSql\27_OtherSqlFlavourSupport.txt" />
- <Content Include="Data\StandardFormatSql\01_SimpleTypes_StrangeRules.txt" />
- <Content Include="Data\StandardFormatSql\03_SimpleSelect_MS.txt" />
- <Content Include="Data\StandardFormatSql\04_MiscProceduralSample_Unstructured.txt" />
- <Content Include="Data\StandardFormatSql\05_ComplexDDL.txt" />
- <Content Include="Data\StandardFormatSql\06_CTE_Sample_MS.txt" />
- <Content Include="Data\StandardFormatSql\07_ServerTakeoverSample_Brent_Ozar.txt" />
- <Content Include="Data\StandardFormatSql\08_ComplexBackupDDL_Ola_Hallengren%28TrailingCommas=true,IndentString= ,BreakJoinOnSections=true%29.txt" />
- <Content Include="Data\StandardFormatSql\08_ComplexBackupDDL_Ola_Hallengren.txt" />
- <Content Include="Data\StandardFormatSql\10_SetOperators_Union.txt" />
- <Content Include="Data\StandardFormatSql\11_MSAccess_Pasted.txt" />
- <Content Include="Data\StandardFormatSql\12_NestedIfElse.txt" />
- <Content Include="Data\StandardFormatSql\14_CommentPositioning.txt" />
- <Content Include="Data\StandardFormatSql\15_NestedComments.txt" />
- <Content Include="Data\StandardFormatSql\16_CurrencyParsingStrangeness.txt" />
- <Content Include="Data\StandardFormatSql\17_Cursors.txt" />
- <Content Include="Data\StandardFormatSql\19_DMLTrigger.txt" />
- <Content Include="Data\StandardFormatSql\20_Joins.txt" />
- <Content Include="Data\StandardFormatSql\21_DDL_Permissions.txt" />
- <Content Include="Data\StandardFormatSql\22_DDL_WithClauses.txt" />
- <Content Include="Data\StandardFormatSql\24_InsertsAndOutputs.txt" />
- <Content Include="Data\StandardFormatSql\25_Merges.txt" />
- <Content Include="Data\StandardFormatSql\26_DataTypesAndSynonyms.txt" />
- <Content Include="Data\StandardFormatSql\04_MiscProceduralSample_Unstructured%28ExpandCommaLists=false,MaxLineWidth=60,SpacesPerTab=8%29.txt" />
- <Content Include="Data\StandardFormatSql\07_ServerTakeoverSample_Brent_Ozar%28SpaceAfterExpandedComma=true,ExpandBooleanExpressions=false,ExpandBetweenConditions=false,ExpandCaseStatements=false%29.txt" />
- <Content Include="Data\StandardFormatSql\06_CTE_Sample_MS%28UppercaseKeywords=false%29.txt" />
- <Content Include="Data\StandardFormatSql\14_CommentPositioning%28TrailingCommas=True%29.txt" />
- <Content Include="Data\StandardFormatSql\27_OtherSqlFlavourSupport.txt" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\PoorMansTSqlFormatterLib\PoorMansTSqlFormatterLib.csproj">
- <Project>{ADBDFDCA-CAB6-4569-9151-0BD42E65B400}</Project>
- <Name>PoorMansTSqlFormatterLib</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{FBBF4CE8-C24D-4A43-9D8C-B54B2E7E3FB7}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>PoorMansTSqlFormatterTests</RootNamespace>
+ <AssemblyName>PoorMansTSqlFormatterTests</AssemblyName>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <StartupObject>PoorMansTSqlFormatterTests.Program</StartupObject>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="nunit-gui-runner, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>References\NUnit\nunit-gui-runner.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.core, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>References\NUnit\nunit.core.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.core.interfaces, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>References\NUnit\nunit.core.interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>References\NUnit\nunit.framework.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.uiexception, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>References\NUnit\nunit.uiexception.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.uikit, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>References\NUnit\nunit.uikit.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.util, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>References\NUnit\nunit.util.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.XML" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="ParserTests.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="TSqlIdentityFormatterTests.cs" />
+ <Compile Include="TSqlObfuscatingFormatterTests.cs" />
+ <Compile Include="TSqlStandardFormatterOptionsTests.cs" />
+ <Compile Include="TSqlStandardFormatterTests.cs" />
+ <Compile Include="Utils.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Data\InputSql\10_SetOperators_Union.txt" />
+ <Content Include="Data\InputSql\11_MSAccess_Pasted.txt" />
+ <Content Include="Data\InputSql\12_NestedIfElse.txt" />
+ <Content Include="Data\InputSql\14_CommentPositioning.txt" />
+ <Content Include="Data\InputSql\15_NestedComments.txt" />
+ <Content Include="Data\InputSql\16_CurrencyParsingStrangeness.txt" />
+ <Content Include="Data\InputSql\17_Cursors.txt" />
+ <Content Include="Data\InputSql\18_BulkInsert.txt" />
+ <Content Include="Data\InputSql\01_SimpleTypes_StrangeRules.txt" />
+ <Content Include="Data\InputSql\20_Joins.txt" />
+ <Content Include="Data\InputSql\02_Random_INVALID.txt" />
+ <Content Include="Data\InputSql\03_SimpleSelect_MS.txt" />
+ <Content Include="Data\InputSql\04_MiscProceduralSample_Unstructured.txt" />
+ <Content Include="Data\InputSql\05_ComplexDDL.txt" />
+ <Content Include="Data\InputSql\06_CTE_Sample_MS.txt" />
+ <Content Include="Data\InputSql\07_ServerTakeoverSample_Brent_Ozar.txt" />
+ <Content Include="Data\InputSql\08_ComplexBackupDDL_Ola_Hallengren.txt" />
+ <Content Include="Data\InputSql\09_Xml_Selection_Function.txt" />
+ <Content Include="Data\InputSql\19_DMLTrigger.txt" />
+ <Content Include="Data\InputSql\13_NestedBooleanExpressions.txt" />
+ <Content Include="Data\InputSql\23_ReparsingInconsistency.txt" />
+ <Content Include="Data\InputSql\21_DDL_Permissions.txt" />
+ <Content Include="Data\InputSql\22_DDL_WithClauses.txt" />
+ <Content Include="Data\InputSql\24_InsertsAndOutputs.txt" />
+ <Content Include="Data\InputSql\25_Merges.txt" />
+ <Content Include="Data\InputSql\26_DataTypesAndSynonyms.txt" />
+ <Content Include="Data\InputSql\27_OtherSqlFlavourSupport.txt" />
+ <Content Include="Data\ParsedSql\01_SimpleTypes_StrangeRules.txt" />
+ <Content Include="Data\ParsedSql\03_SimpleSelect_MS.txt" />
+ <Content Include="Data\ParsedSql\04_MiscProceduralSample_Unstructured.txt" />
+ <Content Include="Data\ParsedSql\05_ComplexDDL.txt" />
+ <Content Include="Data\ParsedSql\06_CTE_Sample_MS.txt" />
+ <Content Include="Data\ParsedSql\07_ServerTakeoverSample_Brent_Ozar.txt" />
+ <Content Include="Data\ParsedSql\08_ComplexBackupDDL_Ola_Hallengren.txt" />
+ <Content Include="Data\ParsedSql\10_SetOperators_Union.txt" />
+ <Content Include="Data\ParsedSql\12_NestedIfElse.txt" />
+ <Content Include="Data\ParsedSql\14_CommentPositioning.txt" />
+ <Content Include="Data\ParsedSql\15_NestedComments.txt" />
+ <Content Include="Data\ParsedSql\16_CurrencyParsingStrangeness.txt" />
+ <Content Include="Data\ParsedSql\17_Cursors.txt" />
+ <Content Include="Data\ParsedSql\19_DMLTrigger.txt" />
+ <Content Include="Data\ParsedSql\20_Joins.txt" />
+ <Content Include="Data\ParsedSql\21_DDL_Permissions.txt" />
+ <Content Include="Data\ParsedSql\22_DDL_WithClauses.txt" />
+ <Content Include="Data\ParsedSql\24_InsertsAndOutputs.txt" />
+ <Content Include="Data\ParsedSql\25_Merges.txt" />
+ <Content Include="Data\ParsedSql\26_DataTypesAndSynonyms.txt" />
+ <Content Include="Data\ParsedSql\11_MSAccess_Pasted.txt" />
+ <Content Include="Data\ParsedSql\27_OtherSqlFlavourSupport.txt" />
+ <Content Include="Data\StandardFormatSql\01_SimpleTypes_StrangeRules.txt" />
+ <Content Include="Data\StandardFormatSql\03_SimpleSelect_MS.txt" />
+ <Content Include="Data\StandardFormatSql\04_MiscProceduralSample_Unstructured.txt" />
+ <Content Include="Data\StandardFormatSql\05_ComplexDDL.txt" />
+ <Content Include="Data\StandardFormatSql\06_CTE_Sample_MS.txt" />
+ <Content Include="Data\StandardFormatSql\07_ServerTakeoverSample_Brent_Ozar.txt" />
+ <Content Include="Data\StandardFormatSql\08_ComplexBackupDDL_Ola_Hallengren%28TrailingCommas=true,IndentString= ,BreakJoinOnSections=true%29.txt" />
+ <Content Include="Data\StandardFormatSql\08_ComplexBackupDDL_Ola_Hallengren.txt" />
+ <Content Include="Data\StandardFormatSql\10_SetOperators_Union.txt" />
+ <Content Include="Data\StandardFormatSql\11_MSAccess_Pasted.txt" />
+ <Content Include="Data\StandardFormatSql\12_NestedIfElse.txt" />
+ <Content Include="Data\StandardFormatSql\14_CommentPositioning.txt" />
+ <Content Include="Data\StandardFormatSql\15_NestedComments.txt" />
+ <Content Include="Data\StandardFormatSql\16_CurrencyParsingStrangeness.txt" />
+ <Content Include="Data\StandardFormatSql\17_Cursors.txt" />
+ <Content Include="Data\StandardFormatSql\19_DMLTrigger.txt" />
+ <Content Include="Data\StandardFormatSql\20_Joins.txt" />
+ <Content Include="Data\StandardFormatSql\21_DDL_Permissions.txt" />
+ <Content Include="Data\StandardFormatSql\22_DDL_WithClauses.txt" />
+ <Content Include="Data\StandardFormatSql\24_InsertsAndOutputs.txt" />
+ <Content Include="Data\StandardFormatSql\25_Merges.txt" />
+ <Content Include="Data\StandardFormatSql\26_DataTypesAndSynonyms.txt" />
+ <Content Include="Data\StandardFormatSql\04_MiscProceduralSample_Unstructured%28ExpandCommaLists=false,MaxLineWidth=60,SpacesPerTab=8%29.txt" />
+ <Content Include="Data\StandardFormatSql\07_ServerTakeoverSample_Brent_Ozar%28SpaceAfterExpandedComma=true,ExpandBooleanExpressions=false,ExpandBetweenConditions=false,ExpandCaseStatements=false%29.txt" />
+ <Content Include="Data\StandardFormatSql\06_CTE_Sample_MS%28UppercaseKeywords=false%29.txt" />
+ <Content Include="Data\StandardFormatSql\14_CommentPositioning%28TrailingCommas=True%29.txt" />
+ <Content Include="Data\StandardFormatSql\27_OtherSqlFlavourSupport.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\PoorMansTSqlFormatterLib\PoorMansTSqlFormatterLib.csproj">
+ <Project>{ADBDFDCA-CAB6-4569-9151-0BD42E65B400}</Project>
+ <Name>PoorMansTSqlFormatterLib</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
- -->
+ -->
</Project>
View
14 PoorMansTSqlFormatterTest/TSqlObfuscatingFormatterTests.cs
@@ -1,7 +1,10 @@
/*
Poor Man's T-SQL Formatter - a small free Transact-SQL formatting
library for .Net 2.0, written in C#.
-Copyright (C) 2011 Tao Klerks
+Copyright (C) 2011-2013 Tao Klerks
+
+Additional Contributors:
+ * Timothy Klenke, 2012
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@@ -44,10 +47,11 @@ public TSqlObfuscatingFormatterTests()
{
_tokenizer = new TSqlStandardTokenizer();
_parser = new TSqlStandardParser();
- var options = new TSqlStandardFormatterOptions();
- options.TrailingCommas = true;
- options.KeywordStandardization = true;
- _standardFormatter = new TSqlStandardFormatter(options);
+ _standardFormatter = new TSqlStandardFormatter(new TSqlStandardFormatterOptions
+ {
+ TrailingCommas = true,
+ KeywordStandardization = true
+ });
_obfuscatingFormatter = new TSqlObfuscatingFormatter();
}
View
57 PoorMansTSqlFormatterTest/TSqlStandardFormatterOptionsTests.cs
@@ -1,4 +1,27 @@
-using System;
+/*
+Poor Man's T-SQL Formatter - a small free Transact-SQL formatting
+library for .Net 2.0, written in C#.
+Copyright (C) 2011-2013 Tao Klerks
+
+Additional Contributors:
+ * Timothy Klenke, 2012
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
@@ -75,21 +98,23 @@ public void Options_Deserialize_OverrideAll()
[Test]
public void Options_Deserialize_RoundTrip()
- {
- var expected = new TSqlStandardFormatterOptions();
- expected.IndentString = " ";
- expected.SpacesPerTab = 2;
- expected.MaxLineWidth = 100;
- expected.ExpandCommaLists = false;
- expected.TrailingCommas = true;
- expected.SpaceAfterExpandedComma = true;
- expected.ExpandBooleanExpressions = false;
- expected.ExpandCaseStatements = false;
- expected.ExpandBetweenConditions = false;
- expected.BreakJoinOnSections = true;
- expected.UppercaseKeywords = false;
- expected.HTMLColoring = true;
- expected.KeywordStandardization = true;
+ {
+ var expected = new TSqlStandardFormatterOptions
+ {
+ IndentString = " ",
+ SpacesPerTab = 2,
+ MaxLineWidth = 100,
+ ExpandCommaLists = false,
+ TrailingCommas = true,
+ SpaceAfterExpandedComma = true,
+ ExpandBooleanExpressions = false,
+ ExpandCaseStatements = false,
+ ExpandBetweenConditions = false,
+ BreakJoinOnSections = true,
+ UppercaseKeywords = false,
+ HTMLColoring = true,
+ KeywordStandardization = true
+ };
var serializedString = expected.ToSerializedString();
View
7 PoorMansTSqlFormatterTest/TSqlStandardFormatterTests.cs
@@ -2,6 +2,9 @@
Poor Man's T-SQL Formatter - a small free Transact-SQL formatting
library for .Net 2.0, written in C#.
Copyright (C) 2011 Tao Klerks
+
+Additional Contributors:
+ * Timothy Klenke, 2012
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@@ -16,8 +19,8 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
+*/
+
using System;
using System.Text;
using NUnit.Framework;
View
7 PoorMansTSqlFormatterTest/Utils.cs
@@ -2,6 +2,9 @@
Poor Man's T-SQL Formatter - a small free Transact-SQL formatting
library for .Net 2.0, written in C#.
Copyright (C) 2011 Tao Klerks
+
+Additional Contributors:
+ * Timothy Klenke, 2012
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@@ -16,8 +19,8 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
+*/
+
using System;
using System.Collections.Generic;
using System.IO;
View
36 PoorMansTSqlFormatterWebDemo/FormatterService.asmx.cs
@@ -1,7 +1,10 @@
/*
Poor Man's T-SQL Formatter - a small free Transact-SQL formatting
library for .Net 2.0, written in C#.
-Copyright (C) 2011 Tao Klerks
+Copyright (C) 2011-2013 Tao Klerks
+
+Additional Contributors:
+ * Timothy Klenke, 2012
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@@ -91,22 +94,23 @@ bool enableKeywordSubstitution
PoorMansTSqlFormatterLib.Interfaces.ISqlTreeFormatter formatter = null;
if (reFormat)
{
- var options = new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatterOptions();
- options.IndentString = indent;
- options.SpacesPerTab = spacesPerTab;
- options.MaxLineWidth = maxLineWidth;
- options.ExpandCommaLists = expandCommaLists;
- options.TrailingCommas = trailingCommas;
- options.SpaceAfterExpandedComma = spaceAfterExpandedComma;
- options.ExpandBooleanExpressions = expandBooleanExpressions;
- options.ExpandCaseStatements = expandCaseStatements;
- options.ExpandBetweenConditions = expandBetweenConditions;
- options.BreakJoinOnSections = breakJoinOnSections;
- options.UppercaseKeywords = uppercaseKeywords;
- options.HTMLColoring = coloring;
- options.KeywordStandardization = keywordStandardization;
+ formatter = new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatter(new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatterOptions
+ {
+ IndentString = indent,
+ SpacesPerTab = spacesPerTab,
+ MaxLineWidth = maxLineWidth,
+ ExpandCommaLists = expandCommaLists,
+ TrailingCommas = trailingCommas,
+ SpaceAfterExpandedComma = spaceAfterExpandedComma,
+ ExpandBooleanExpressions = expandBooleanExpressions,
+ ExpandCaseStatements = expandCaseStatements,
+ ExpandBetweenConditions = expandBetweenConditions,
+ BreakJoinOnSections = breakJoinOnSections,
+ UppercaseKeywords = uppercaseKeywords,
+ HTMLColoring = coloring,
+ KeywordStandardization = keywordStandardization
+ });
- formatter = new PoorMansTSqlFormatterLib.Formatters.TSqlStandardFormatter(options);
}
else if (obfuscate)
formatter = new PoorMansTSqlFormatterLib.Formatters.TSqlObfuscatingFormatter(
View
4 README.md
@@ -79,6 +79,10 @@ This project uses several external libraries:
available from the [notepad++ plugin development forum](https://sourceforge.net/projects/notepad-plus/forums/forum/482781).
* ILRepack, by François Valdy, for assembly-merging, available from the [github project page](https://github.com/gluck/il-repack).
+Special thanks to contributors that have given their time to make this library better:
+
+* Timothy Klenke
+
Many of the features in this project result from feedback by multiple people, including
but not limited to:
View
975 df
@@ -1,975 +0,0 @@
-commit e2d7f756dab5dae76a82c50f4471f5922e606b23
-Author: Timothy Klenke <timothy.klenke@gmail.com>
-Date: Wed Nov 7 00:14:34 2012 -0700
-
- Changed option properties to an Options class
-
- The constructor for TSqlStandardFormatter took a dozen boolean
- parameters for all the options. This is difficult to read and not very
- extensible (difficult to add or change supported options).
-
-commit 8dc0b90f96037cff8ab19d4b1719bb1bfd1d1b20
-Author: Timothy Klenke <timothy.klenke@gmail.com>
-Date: Tue Nov 6 23:24:29 2012 -0700
-
- Removed debug break statement
-
-commit 176bd8b7c1255234c45bcd2db73b480f860a4668
-Author: Timothy Klenke <timothy.klenke@gmail.com>
-Date: Tue Nov 6 23:23:07 2012 -0700
-
- no changes
-
- I'm a Get & GitHub noob. No actual changes in this files. GH4W just
- marked them as changed as soon I forked from GH. (Maybe a new line
- formatting issue ?!?)
-
-commit 8622a091a573e091e8b8f8db1877b108e56b38de
-Author: TaoK <tao@klerks.biz>
-Date: Sun Sep 9 13:52:55 2012 -0400
-
- Github Issue #75: Add parse error highlighting in HTML output
-
-commit 1f5b45931df6050993e5aac3317a5af2a8a66480
-Author: TaoK <tao@klerks.biz>
-Date: Sun Sep 9 05:58:15 2012 -0400
-
- Github Issue #70: Finally removed System.Web dependency, so the library can be used
- in Silverlight, .Net 3.5 Client Profile, and .Net 4.0 Client Profile (and probably
- other contexts I don't know about)
-
-commit 95376635be1b33c0c21734de973667de6e958b3e
-Author: TaoK <tao@klerks.biz>
-Date: Sun Sep 2 16:49:05 2012 -0400
-
- Insignificant VB6 reference changes
-
-commit 1c58285196988c147d63775ceb2c30475423c7c7
-Author: TaoK <tao@klerks.biz>
-Date: Sun Sep 2 15:22:00 2012 -0400
-
- Publishing instructions update
-
-commit c04ff6ec68ffe6750600bc367e6f38637f502f70
-Author: TaoK <tao@klerks.biz>
-Date: Sun Sep 2 14:55:17 2012 -0400
-
- Updated winmerge plugin packaging instructions
-
-commit 3339cd0cd5aaeae64fb3270b69220688c2fddfcc
-Author: TaoK <tao@klerks.biz>
-Date: Sun Sep 2 14:29:06 2012 -0400
-
- Prepare for version 1.4.1
-
-commit c87bc88825832655d368f932d9f342f243f883b0
-Author: TaoK <tao@klerks.biz>
-Date: Sun Sep 2 13:35:03 2012 -0400
-
- GitHub Issue #55: OUTPUT args to proc declaration without parens
-
-commit 065dea2e53cb490b33f840d54630a7c359fe07c4
-Author: TaoK <tao@klerks.biz>
-Date: Sun Sep 2 13:18:06 2012 -0400
-
- Github Issue #73: Correct parsing & formatting of OPTION clauses
-
-commit 51135caf7a64f359fd6eebecfef75e991c4980eb
-Author: TaoK <tao@klerks.biz>
-Date: Sun Sep 2 12:56:03 2012 -0400
-
- Github Issue #74: parsing context in variable initializers.
-
- Added 2 new Xml elements, "DDLDeclareBlock" and "EqualsSign".
-
-commit dc59a9a5e8649947e3a5f1413c25b3d2d7b4e5f1
-Author: TaoK <tao@klerks.biz>
-Date: Sun Sep 2 10:08:41 2012 -0400
-
- Another Git EOL conversion issue
-
-commit 44174dbe4933214c669f78a9dd3534a4b453bc02
-Author: TaoK <tao@klerks.biz>
-Date: Sun Sep 2 09:33:39 2012 -0400
-
- Replaced ILMerge with ILRepack, the open-source equivalent.
-
- Major benefit: building from scratch, on a new machine, just
- got that little bit easier.
-
-commit 49e801e0baaf3eeed01e62eb1d649184c31f6344
-Author: TaoK <tao@klerks.biz>
-Date: Sun Sep 2 08:00:04 2012 -0400
-
- Git EOL conversions bit me again somewhere along the line
-
-commit c331db958f2f58a46d76ca434ea4607a91bd8635
-Author: TaoK <tao@klerks.biz>
-Date: Sun Sep 2 07:55:58 2012 -0400
-
- Build Environment fixes
-
-commit 1d6dea5b44b1956bc030730f5239fef5cc9bc423
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jul 8 15:43:53 2012 -0400
-
- Commandline examples fix
-
-commit d720edc732728f5f7c24ef19b8b13cf35e470803
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jun 17 10:36:11 2012 -0400
-
- GitHub Issue 52: space-indent saving issue in plugins
-
-commit 79e3e3e3de6c88fb197c1465246dd7f23a4149c7
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jun 17 10:17:26 2012 -0400
-
- GitHub Issue 48: SSMS 2012 install fix
-
-commit f1a3379406f34218753828d4e46d442f75e0eb9f
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jun 17 09:50:37 2012 -0400
-
- Misc parse error message handling fix (localization)
-
-commit 1328c866c99d2d3615b33b5100e7fde0cec8e3c7
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jun 17 09:48:02 2012 -0400
-
- GitHub Issue 54: Support for double-pipe string concatenation operator
-
-commit 771b80ddcbcb42fdd59871fc1d3242a8cceda287
-Author: Tao Klerks <tao@klerks.biz>
-Date: Mon May 7 04:11:59 2012 -0300
-
- escape asterisks in comment-positioning issue example
-
-commit d48993d46075a33f7664aa9a1595e35112252e6c
-Author: TaoK <tao@klerks.biz>
-Date: Mon Mar 12 10:58:49 2012 -0400
-
- Web service update for obfuscation options
-
-commit 789192b4cdc31ff5277149576ee6478a91f488c9
-Author: TaoK <tao@klerks.biz>
-Date: Mon Mar 12 07:00:47 2012 -0400
-
- Updated changelog for release
-
-commit 59c5c02e61478cce7a75817819193f555384a81d
-Author: Tao Klerks via Amanuens <git@amanuens.com>
-Date: Mon Mar 12 10:03:06 2012 +0000
-
- Committed translation (es, fr).
-
-commit 54f2c23cfaa523d052997cd8877724a43038ffca
-Author: TaoK <tao@klerks.biz>
-Date: Mon Mar 12 05:36:35 2012 -0400
-
- Version 1.3.1, almost ready to release
-
-commit 9fcedbde14335da8661d9bfa10f2fab0ff7b72e5
-Author: TaoK <tao@klerks.biz>
-Date: Mon Mar 12 05:21:32 2012 -0400
-
- Github issue 23: SSMS 2012 ("Denali") support
-
-commit 65eb3b32e3104fd982ddff852a4b01305655d229
-Author: TaoK <tao@klerks.biz>
-Date: Sun Mar 11 07:00:05 2012 -0400
-
- Github issue 39: Library can't be used in .Net 3.5 projects
- because of the dependency on Linqbridge. Need a separate library
- for .Net 3.5 and later.
-
-commit 7c21c86a1feec73b3e9d6a7407c1c59d756e7397
-Author: TaoK <tao@klerks.biz>
-Date: Sat Mar 10 14:31:23 2012 -0500
-
- Github issue 37: Key binding fails in non-english versions of SSMS
-
-commit 165e8d5089f94e25a80c3b2c1643b632ad7bdf37
-Author: TaoK <tao@klerks.biz>
-Date: Sat Mar 10 13:09:23 2012 -0500
-
- Github Issue 40: incorrectly treating "ON" keyword as join indicator when used in WITH clause parens
-
-commit 2381ea14d3ce1ff3c0adeba82d578f09cd15111d
-Author: TaoK <tao@klerks.biz>
-Date: Sat Mar 10 13:08:47 2012 -0500
-
- test cleanup - forgot the modified parse tree for comment positioning
-
-commit 4ac27010b37ac2d6d1e3ad6f63c4a3300345d3c4
-Author: TaoK <tao@klerks.biz>
-Date: Sun Feb 26 10:54:58 2012 -0500
-
- Add notepad++ autosave file exception
-
-commit a261b488d00f88d20f1fb4b4be4163beb24d9083
-Author: TaoK <tao@klerks.biz>
-Date: Thu Feb 23 06:39:06 2012 -0500
-
- Github Issue 38: [Bugfix] Comment-positioning bugs, one of which
- could result in invalid output SQL!
-
-commit 9cce4fbc4e98d072b0d3c24ee4c4f47b1791901c
-Author: TaoK <tao@klerks.biz>
-Date: Sun Feb 5 12:15:27 2012 -0500
-
- GitHub Issue 36: initial support for [noformat][/noformat] and [minify][/minify] tags
-
-commit f30c6fee4962947d57bb65eea0a08ffc9b678aa0
-Author: TaoK <tao@klerks.biz>
-Date: Sun Feb 5 09:25:22 2012 -0500
-
- More obfuscation options
-
-commit e307c9e5fab1154a6f219ebefadeaa728be62512
-Author: Tao Klerks via Amanuens <git@amanuens.com>
-Date: Mon Jan 30 10:03:39 2012 +0000
-
- Committed translation (es, fr).
-
-commit 1e18485e935c56c2ead2ac096fbdaf9fbf394d40
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jan 30 04:50:22 2012 -0500
-
- v1.2.2: Introduced Obfuscating Formatter
-
-commit 69975ac2fb578b3480a87c86f830a2ab233e032c
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jan 30 04:35:09 2012 -0500
-
- Corrections to number and binary casing
-
-commit 5a1bc825014ce69c3e3d3e27ff0292746699aa46
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jan 30 04:34:03 2012 -0500
-
- Introduced new Parse Tree Node Type "AlphaOperator"
-
-commit 2b947eb8cc8715031213bf57e9cb0723419492f5
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jan 30 02:55:19 2012 -0500
-
- force "e" in scientific notation constants and "x" in binary constants to lowercase
-
-commit 6f3472f2a53c89db247870dd4c7ab04aa3e6fbde
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jan 30 02:53:59 2012 -0500
-
- Refactoring only, no functional changes
-
-commit 396b035b330f245273e24366622538796bb24e57
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jan 29 17:00:24 2012 -0500
-
- IDE auto-indenting changes
-
-commit 44ab80e50f2cdc9c15253fb4c741bc4ff63f14a4
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jan 29 15:23:34 2012 -0500
-
- more acknowledgements
-
-commit 1c7c77298d48d3ce310a257b11fff049a454d04f
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jan 29 15:01:11 2012 -0500
-
- Corrected file encoding to UTF-8, added credits
-
-commit 6a83a2f44a6265848478ff35bd322c022fe16d70
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jan 29 14:30:37 2012 -0500
-
- more markdown fixes
-
-commit c4ac2ee3468a9a8c3467c2dccd4e734b1e63eb98
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jan 29 14:21:22 2012 -0500
-
- Attempt to fix broken markdown content
-
-commit 5ff19c393d6c5509012340cbf0e238259382a12a
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jan 29 14:15:10 2012 -0500
-
- Converted some project docs from hand-formatted text to Markdown
-
-commit 32eeb01d27eb8777e0752a9ad5f741e6f7bc3eeb
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jan 29 13:33:31 2012 -0500
-
- Version update for release: v1.2.1
-
-commit 78ff622b76b29d6d7b105d22e0bc898e0521ee6d
-Author: TaoK <tao@klerks.biz>
-Date: Fri Jan 27 20:20:16 2012 -0500
-
- Completed Notepad++ plugin(?)
-
-commit b4c37b2de16ca3e5e4c9a9bdb0363f2861dffdae
-Author: TaoK <tao@klerks.biz>
-Date: Fri Jan 27 18:04:59 2012 -0500
-
- Added per-config-flag tests
-
-commit f4a3370f2125696eb5c58683e5aa720d3eb2d1ee
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jan 23 18:53:43 2012 -0500
-
- Notepad++ plugin fully functional, with settings stored in correct place.
-
-commit 7af1e0c9452197348741695f763de0a3575b47ce
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jan 23 16:47:45 2012 -0500
-
- Added Formatting Options management to Notepad++ plugin
-
-commit 319e61769b48e83adbca09957ef8f3f4a240b61f
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jan 23 05:25:11 2012 -0500
-
- Moved plugin-related Settings and About forms into separate project for sharing across plugins
-
-commit a73ee8711fff04a6295cb918e6a6c32bb542f94b
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jan 23 05:02:15 2012 -0500
-
- Missing error message for cmdline
-
-commit 2f9fdb37a6751916a0e9f6eac4d6b792d24e1de0
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jan 22 18:46:49 2012 -0500
-
- Github Issue 26: Added "TestCaseSource" functionality for better tracking
- of detailed test cases.
-
-commit 3a03fdfa0f838e7469c1f5d37a708d219be37d1f
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jan 22 17:37:46 2012 -0500
-
- GitHib Issue 26 Prerequisites: Switched to NUnit instead of MS Testing Framework
-
-commit 35b5ca55c4a55913b2df059f7984cbdcb7450c21
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jan 22 16:56:52 2012 -0500
-
- Github Issue 32: support unix pipeline input and output
-
-commit cba8c3a14d3e3b391719d3b2674a20348ceef1d5
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jan 22 15:51:19 2012 -0500
-
- Cmdline utility language casing sensitivity bug
-
-commit 1688a3afb46331e14fa458a021d0120f4d09e884
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jan 22 05:23:43 2012 -0500
-
- Cmdline Error Messaging fix
-
-commit 6eb6c75d402723ad92178d7fdf79f8da95b69c10
-Author: TaoK <tao@klerks.biz>
-Date: Sat Jan 21 17:43:59 2012 -0500
-
- Translation bugfix + more version tracking for v1.1.1
-
-commit a5372591aba5ecc266cefbdc6387990f0e3b3d0b
-Author: TaoK <tao@klerks.biz>
-Date: Sat Jan 21 16:31:07 2012 -0500
-
- More misc versioning consistency
-
-commit aacc15085d53651b1952f579df068f7b8800e441
-Author: TaoK <tao@klerks.biz>
-Date: Sat Jan 21 16:30:48 2012 -0500
-
- Bugfix on translation/messaging in Cmdline Formatter
-
-commit 7330b5f65fa36a4e3dafea253ea1241e34a9056a
-Author: TaoK <tao@klerks.biz>
-Date: Sat Jan 21 16:06:05 2012 -0500
-
- Versioning
-
- Ensuring that all product versions are correct/consistent for next release.
-
-commit a17a9f8af4f922a48422946a79f865e957015ee2
-Author: TaoK <tao@klerks.biz>
-Date: Sat Jan 21 15:00:44 2012 -0500
-
- WITH clause breaking
-
-commit cf0ee0afd6bfb925da70a87b54821f8454332146
-Author: TaoK <tao@klerks.biz>
-Date: Sat Jan 21 14:59:58 2012 -0500
-
- Minor language fixes
-
-commit 4339c1672112cb35ac9e30b1a736674fa72018b4
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jan 16 14:36:45 2012 -0500
-
- Notepad++ plugin stuff - in progress
-
-commit e890e60e0a2169400c5df6eeae489eb9c6aac21a
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jan 16 14:36:22 2012 -0500
-
- GitHub Issue 33: Culture-specific uppercasing
-
-commit c5302e02643db78aada951de4fd6875d759a2104
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jan 16 14:34:48 2012 -0500
-
- Misc build/bugfixes
-
-commit a2235fe155fbd8b3f20e63125fcf66bff1c1e1aa
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jan 16 14:34:09 2012 -0500
-
- Translation fixes
-
-commit 70538e37b3057bb3657ea195833b022774df7dfe
-Author: TaoK <tao@klerks.biz>
-Date: Thu Dec 29 07:06:31 2011 -0500
-
- More translation fixes, first draft of Notepad++ plugin
-
-commit 288c8fb3ec01914078ba62a505f465ed98adf8c2
-Author: Tao Klerks via Amanuens <git@amanuens.com>
-Date: Fri Nov 25 22:19:23 2011 +0000
-
- Committed translation (es, fr).
-
-commit 243fbd953daeb9832be924f5387a97910613c4d3
-Author: TaoK <tao@klerks.biz>
-Date: Mon Oct 17 04:58:57 2011 -0400
-
- Internationalization: Programming and build process changes complete (now need to translate!)
-
-commit c10083197b53aadfece9863a2f64ba537b4ff86f
-Author: TaoK <tao@klerks.biz>
-Date: Thu Oct 13 04:08:43 2011 -0400
-
- Starting to Internationalize
-
-commit 88c6d5adf5c305487505b43de542639eed942162
-Author: TaoK <tao@klerks.biz>
-Date: Thu Oct 13 03:42:36 2011 -0400
-
- GitHub Issue 25: Settings persistence in winforms demo (is it still a demo?)
-
-commit 83271a90955988e1eddbe68d90056809807d9732
-Author: TaoK <tao@klerks.biz>
-Date: Tue Oct 11 05:26:26 2011 -0400
-
- GitHub Issue 22 (test case only - fix already done)
-
-commit 2bcfef929cfa49e6ebeccd82a8e866fd8ba305f9
-Author: TaoK <tao@klerks.biz>
-Date: Tue Oct 11 05:12:49 2011 -0400
-
- GitHub Issue 24: HTMLEncoding was missing/wrong
-
-commit 2e0709a8627dcf82d1f631718dced6513b682e0a
-Author: TaoK <tao@klerks.biz>
-Date: Tue Oct 11 04:56:14 2011 -0400
-
- GitHub Issue 19: Parsing/indenting join ON sections
-
-commit b472c0241772e5f9556d5b00266c4646f41c79e7
-Author: TaoK <tao@klerks.biz>
-Date: Sun Oct 9 16:46:48 2011 -0400
-
- GitHub Issue 18: Comments sometimes misplaced
-
- Corrected comment-placing code in standard formatter to better respect
- line breaks in the original SQL.
-
-commit 105cea30507fd794a120eca22944a218dd492ee3
-Author: TaoK <tao@klerks.biz>
-Date: Sun Oct 9 14:31:52 2011 -0400
-
- GitHub Issue 21: AllowParsingErrors flag in Cmdline Utility
-
-commit c6b6dbf2507f3c7c2feb81d3c0ff7c563e0a4d9b
-Author: TaoK <tao@klerks.biz>
-Date: Sun Oct 9 09:08:03 2011 -0400
-
- Github Issue 22: Non-first CTE "AS" clause indenting
-
-commit 3bdb657ba9aa23bcc92b0a889a57c73786572dd5
-Author: TaoK <tao@klerks.biz>
-Date: Sun Oct 9 08:38:09 2011 -0400
-
- Soft-coded parsing error message
-
- Soft-coded parsing error message in the library: first step to
- localization. (this parse error message was the only locale- or
- language-specific thing in the library, afaik).
-
-commit 2f5adbd29cf907a06ae2acb48a3bc90cbc9244a9
-Author: TaoK <tao@klerks.biz>
-Date: Thu Aug 25 15:24:39 2011 -0400
-
- v1.0.1 Final (?) - minor fixes and more tests
-
-commit a8357f1465e993a147291952df8a35a144b66427
-Author: TaoK <tao@klerks.biz>
-Date: Thu Aug 18 03:42:09 2011 -0400
-
- v1.0.1: Forgot Geography...
-
-commit 9ab41663008bd3b0d8ea6756b40c4db252d6a70d
-Author: TaoK <tao@klerks.biz>
-Date: Thu Aug 18 03:28:56 2011 -0400
-
- more work towards v1.0.1: Data Type Handling fixes
-
- - Corrected handling of AS in stored procedure argument data type specification
- - Added handling of ISO data type synonyms, with keyword consistency correction to Sql Server datatypes
- - Added missing SQL Server 2008 datatypes, Date/Time-related and HierarchyID
-
-commit bfdfe8ad0dcc61b6941300ba6957aa923b02890b
-Author: TaoK <tao@klerks.biz>
-Date: Thu Aug 11 03:23:41 2011 -0400
-
- Final testing for v1.0.1
-
- - Added handling for multiple CTEs in one statement
-
-commit d76fd4535c5d1582a33bee3b734f6cb09f803208
-Author: TaoK <tao@klerks.biz>
-Date: Wed Aug 10 04:10:39 2011 -0400
-
- Major steps towards v1.0.1
-
- - MERGE support
- - OUTPUT support
- - INSERT ... EXEC support
-
-commit 0b588ef3aacfcc6dda9952583cf347952d83f1af
-Author: TaoK <tao@klerks.biz>
-Date: Mon Aug 1 02:21:30 2011 -0400
-
- v0.9.13: Forgot to set version numbers...
-
-commit 231de8d74021145c004de8cd7be6242bc3ba3bc7
-Author: TaoK <tao@klerks.biz>
-Date: Mon Aug 1 02:05:41 2011 -0400
-
- v0.9.13 - missed the changelog
-
-commit 9727fded6c00d607295498ce459ba161979b937a
-Author: TaoK <tao@klerks.biz>
-Date: Mon Aug 1 02:05:22 2011 -0400
-
- v0.9.13 final(?):
-
- - Misc fixes and enhancements in prev week
- - general DDL "WITH" clause handling
- - Keyword standardization
-
-commit 97a68996f9e7c135afae73d908047624806bc0d9
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jul 24 14:54:25 2011 -0400
-
- early steps towards v0.9.13 (see changelog)
-
-commit d39bac64b510aaf579404791a58fa7184d366fa4
-Author: TaoK <tao@klerks.biz>
-Date: Sat Jul 16 18:57:20 2011 -0400
-
- Typo / fix: single-line comments were getting multiline comment endings
-
-commit fe5fe961e26a7d93dff303eeeed26e0fbde68425
-Author: TaoK <tao@klerks.biz>
-Date: Sat Jul 16 18:24:33 2011 -0400
-
- v0.9.12 - missed some files apparently, forgot to rescan in git gui.
-
-commit 7f2ecf8143554f07113bfee683def62f6b538bf3
-Author: TaoK <tao@klerks.biz>
-Date: Sat Jul 16 18:22:48 2011 -0400
-
- v0.9.12 final
-
- Added width-based wrapping, added colorizing-only option, propagated
- new settings across all components/apps.
-
-commit 440b7ff4c273ff0174b91f4be4baca70eff49215
-Author: TaoK <tao@klerks.biz>
-Date: Sat Jul 16 11:17:56 2011 -0400
-
- Corrected user error messages on file- and folder-writing exceptions
-
-commit 4c58d558cb1c9c169f179e29c3a349cb2a527557
-Author: TaoK <tao@klerks.biz>
-Date: Sat Jul 16 09:08:42 2011 -0400
-
- Significant steps towards 0.9.12.
-
- Miscellaneous bugfixes, a couple of display/indenting
- enhancements, and a minor improvement to cmdline output
- parameter.
-
-commit a502460233e21125b0fea9cdf78f447e0d04ffec
-Author: TaoK <tao@klerks.biz>
-Date: Tue Jul 12 03:39:48 2011 -0400
-
- Formatter refactoring largely complete and working, comma spacing fix
- implemented but not yet optional.
-
-commit 4159d12d0edff914aa2f9f20600daf46df654ae3
-Merge: 30e4d77 8f1ca9b
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jul 10 16:42:16 2011 -0400
-
- Merge branch 'master' into parser-refactoring
-
-commit 8f1ca9b522b0a2bd75aaf303c7e41580aa837bb1
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jul 10 16:32:27 2011 -0400
-
- Missed a version increment
-
-commit 7717a3d1fe2e9bdcccf5bb99fc7ab7bb96a2dcd9
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jul 10 16:14:54 2011 -0400
-
- Update docs
-
-commit 32c5fdf84339e53aa283b223d6e9a4bc02b56156
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jul 10 16:06:06 2011 -0400
-
- Added output file parameter and general return code
- functionality to the CmdLine utility, for general use
- by external calling programs.
-
-commit 32535a8abf41a97aa5834d4fb1ed2f06143dea74
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jul 10 14:01:11 2011 -0400
-
- Added setup project for WinMerge plugin - direct file
- copying wasn't working. Asking users to run regasm would
- have been difficult, so setup project takes care of
- COM registration and guesses location of WinMerge
-
-commit 280351d4806e4728432a2a6a310b3b44633833b7
-Author: TaoK <tao@klerks.biz>
-Date: Sun Jul 10 11:58:04 2011 -0400
-
- v0.9.11 - added WinMerge Plugin
-
-commit 30e4d77da1377071429905e0dd04007b3a28edea
-Author: TaoK <tao@klerks.biz>
-Date: Sat Jul 9 04:19:04 2011 -0400
-
- Initial checkin of in-progress parser and formatter refactoring
-
-commit 73ab8c4efeb72dab4787d909d5610a4b3af55bd8
-Author: TaoK <tao@klerks.biz>
-Date: Thu Jun 9 03:58:26 2011 -0400
-
- v0.9.10: misc minor fixes, see changelog.
-
-commit 435c22b1d4303d7ff00245ce2aa01b3886614d7b
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jun 6 18:45:54 2011 -0400
-
- v0.9.9 bug credit + webservice fix
-
-commit 69e8e43c6535ddb5d56030a43dc38717c89faa84
-Author: TaoK <tao@klerks.biz>
-Date: Mon Jun 6 18:16:54 2011 -0400
-
- v0.9.9: (Data) Trigger handling, trailing semicolon handling, SSMS 2008 fix
-
-commit 15cab2a1bc8b9ad4a2c15e65925aaa9f90fdb729
-Author: TaoK <tao@klerks.biz>
-Date: Sun May 29 17:27:50 2011 -0400
-
- Added more Transaction Statement aliases
-
-commit 5c5a15d10aa559938f69b7f3dd00bc4e1389ac9c
-Author: TaoK <tao@klerks.biz>
-Date: Sun May 29 17:19:31 2011 -0400
-
- BULK INSERT support
-
-commit 4e7468c7a4706a39895e6092495f0bd80f942e47
-Author: TaoK <tao@klerks.biz>
-Date: Sun May 29 16:50:43 2011 -0400
-
- Avoiding deployment binary checkin
-
-commit 54e9d422301061d114bcc83f26d416a0e4c0816b
-Author: TaoK <tao@klerks.biz>
-Date: Sun May 29 16:48:05 2011 -0400
-
- For keyword fix
-
-commit 024a2a9a1bfe0bffa0a0135a150981ad7c3092b0
-Author: TaoK <tao@klerks.biz>
-Date: Sun May 29 16:37:45 2011 -0400
-
- Cursor support, versioning info in CmdLine utility, misc fixes
-
-commit 9fcb85bdb21322cbdc82e9a0db46ca62c48f94ee
-Author: TaoK <tao@klerks.biz>
-Date: Mon May 23 04:09:06 2011 -0400
-
- Minor changes with Mono testing
-
-commit 4f9f0ec978b60faab183a2765854f8e6eef709ed
-Author: TaoK <tao@klerks.biz>
-Date: Sun May 22 12:08:41 2011 -0400
-
- Minor change to web service, to support formatting options
-
-commit ffbf688d3aee1b13701b962c5b37556fb5c4b528
-Author: TaoK <tao@klerks.biz>
-Date: Sun May 22 11:50:01 2011 -0400
-
- Added About / License button to Demo app, merged it into single EXE.
-
-commit 18ab94b8c14db4a3b7bc96e183f989ea855fa12b
-Author: TaoK <tao@klerks.biz>
-Date: Sat May 21 19:55:04 2011 -0400
-
- v0.9.8 - many parsing enhancements and more precise formatting,
- especially around T-SQL number formatting edge cases. See changelog
- for detail.
-
-commit 2432bfbc1557579e92c73a06dd55c7f4c4e6fb72
-Author: TaoK <tao@klerks.biz>
-Date: Thu May 19 18:49:32 2011 -0400
-
- Improved comment positioning, implemented nested comment parsing
-
-commit 465ac22c6f16067b5f2d9bc7796a165b4caa2702
-Author: TaoK <tao@klerks.biz>
-Date: Wed May 18 02:28:08 2011 -0400
-
- v0.9.8 - misc parsing fixes and minor enhancements
-
-commit 2640a771ecc2ad64363209c344dbe5d6df1ce1b0
-Author: TaoK <tao@klerks.biz>
-Date: Mon May 16 16:20:42 2011 -0400
-
- v0.9.7 - added command-line formatting program, fixed GOTO handling
-
-commit 98c7f271f47be281e60ee21dca70efbc83f2baaa
-Author: TaoK <tao@klerks.biz>
-Date: Sun May 15 17:41:16 2011 -0400
-
- V 0.9.6 - SSMS Addin completed
-
-commit a67b640b9dda8b0d985b22efc9f7ab02902fac9f
-Author: TaoK <tao@klerks.biz>
-Date: Thu May 12 03:46:45 2011 -0400
-
- First round of fixes to SSMS Add-in
-
-commit 6efc5196f82dea9e4df72c597c51ee1ebf609cf1
-Author: TaoK <tao@klerks.biz>
-Date: Wed May 11 03:59:55 2011 -0400
-
- Extremely basic / rough SSMS integration
-
-commit 9e6f6c8f273a60a8962ef8f0dee19247f406b6cf
-Author: TaoK <tao@klerks.biz>
-Date: Wed May 4 17:03:28 2011 -0400
-
- Better DDL formatting (break on RETURNS keyword)
-
-commit edb56070897a95d6f5be3de1957181709a4342b3
-Author: TaoK <tao@klerks.biz>
-Date: Wed May 4 17:02:42 2011 -0400
-
- Consolas is pretty ugly without cleartype - better to let
- the OS/browser select the best monospace.
-
-commit 7ab1bb1b170491d7baee877d860c097b25262af8
-Author: TaoK <tao@klerks.biz>
-Date: Tue May 3 17:46:33 2011 -0400
-
- Version 0.9.5: cleaned up HTML delivery / wrapper, Added CTE handling,
- Added grouping of DECLARE and SET statements.
-
-commit a48c9eb89e472c8dd006960a405752f6ae40a63c
-Author: TaoK <tao@klerks.biz>
-Date: Mon May 2 18:00:01 2011 -0400
-
- keep track of latest change
-
-commit 988b2ed8682cc7d5289b64a0768a0277036c49f1
-Merge: 85ef2f7 0c87003
-Author: TaoK <tao@klerks.biz>
-Date: Mon May 2 17:57:10 2011 -0400
-
- Merge branch 'Parse-CTE'
-
-commit 0c87003d2cb4cef8e953e1cb547ba3c168cb3f9b
-Author: TaoK <tao@klerks.biz>
-Date: Mon May 2 17:56:17 2011 -0400
-
- Completing CTE-parsing enhancement
-
-commit 85ef2f77e4a772acfbdcc32bf32ddcdddc2efd9a
-Author: TaoK <tao@klerks.biz>
-Date: Mon May 2 17:30:55 2011 -0400
-
- Line breaks fix
-
-commit ccc74f993ddeef1562616636144d1e293729a7b8
-Author: TaoK <tao@klerks.biz>
-Date: Mon May 2 17:19:01 2011 -0400
-
- Fixed Line endings
-
-commit b7df0a8354e422570d337f0475669e42a3f30550
-Author: TaoK <tao@klerks.biz>
-Date: Mon May 2 17:15:10 2011 -0400
-
- Checking in initial CTE parsing approach
-
-commit 84146d7a1d87724e53445d7c9dcf4a63fc220b2a
-Author: TaoK <tao@klerks.biz>
-Date: Mon May 2 03:16:46 2011 -0400
-
- Moved HTML page code into formatter, to avoid code duplication
- and simplify web service usage. (will move elsewhere later)
-
-commit d6b4f7bedc02ce1bf59acb16dd1f49609c216aa7
-Author: TaoK <tao@klerks.biz>
-Date: Sun May 1 18:32:51 2011 -0400
-
- Version 0.9.4 - colorized output
-
-commit 498a83cc9fc16c3b7e100010c089b92711b225d3
-Author: TaoK <tao@klerks.biz>
-Date: Sat Apr 30 21:03:24 2011 -0400
-
- Readme update for latest status
-
-commit 8ec6a1b3d618132116219cb898934f0e474a5601
-Author: TaoK <tao@klerks.biz>
-Date: Sat Apr 30 20:52:08 2011 -0400
-
- Version 0.9.3 - Keyword case + misc enhancements + refactoring
-
-commit c43a11eb3407b5e9a183f6cac0983e48d1cdd725
-Author: TaoK <tao@klerks.biz>
-Date: Sat Apr 30 15:28:32 2011 -0400
-
- Changelog Update
-
-commit 099bd3ae51c4bd7aa3f824bce19bf0ccd77a4ee5
-Author: TaoK <tao@klerks.biz>
-Date: Sat Apr 30 15:21:28 2011 -0400
-
- Refactored Tokenizer to output a list instead of an Xml Document
-
-commit 11911a90b9dcff8f5127cf926842d9f9efe464e4
-Author: TaoK <tao@klerks.biz>
-Date: Sat Apr 30 13:11:24 2011 -0400
-
- Beginning Tokenization Structure change
-
-commit 60916319c42a6b40cd091703cd0b9de065549a6f
-Author: TaoK <tao@klerks.biz>
-Date: Fri Apr 29 03:24:26 2011 -0400
-
- More minor parsing / formatting fixes
-
-commit 1119b908a4b8682d506a4424bf51d75a7b914b88
-Author: TaoK <tao@klerks.biz>
-Date: Fri Apr 29 03:10:20 2011 -0400
-
- Misc formatting enhancements, added test samples
-
-commit 825cccb83000e8a29ae082baeda2092502922bc8
-Author: TaoK <tao@klerks.biz>
-Date: Thu Apr 28 04:29:17 2011 -0400
-
- Update docs
-
-commit 5ce5dd3c42a560b9f92e99925da43cacd72bfe51
-Author: TaoK <tao@klerks.biz>
-Date: Thu Apr 28 04:28:33 2011 -0400
-
- V0.9.2 - added case statement handling
-
-commit afbba7b48b939da30aeb45897fe5e9262da6f852
-Author: TaoK <tao@klerks.biz>
-Date: Thu Apr 28 03:04:22 2011 -0400
-
- More keywords, support for derived tables
-
-commit aee57b188f802adda4d3c5820072a6fdfd8f932e
-Author: TaoK <tao@klerks.biz>
-Date: Wed Apr 27 04:52:23 2011 -0400
-
- V9.1 - minor fixes/enhancements
-
-commit 7255fbc0359a8209c276653270c4e855d6d649e3
-Author: TaoK <tao@klerks.biz>
-Date: Tue Apr 26 03:39:31 2011 -0400
-
- Publishability changes to web service config
-
-commit 1ee65c2a65d88187d10f3381eb6ac501fa9ef2b2
-Author: TaoK <tao@klerks.biz>
-Date: Mon Apr 25 15:21:51 2011 -0400
-
- Added demo web service, corrected linking on a sample
-
-commit 7caed9e0185991960f6cd430d9509f582820dc58
-Author: TaoK <tao@klerks.biz>
-Date: Mon Apr 25 13:19:43 2011 -0400
-
- Prepped for initial "release" to github
-
- Added tests, updated todo lists, added changelog, added boolean expansion,
- resized demo window, updated version numbers, corrected CASE statement
- output error.
-
-commit 3b7c0f033ddd293303a92e49a3843fdbc39cdd9d
-Author: TaoK <tao@klerks.biz>
-Date: Mon Apr 25 11:22:48 2011 -0400
-
- Revised Indenting
-
-commit fae52cede7d45d1363911030145deb79e8a24c9d
-Author: TaoK <tao@klerks.biz>
-Date: Sun Apr 24 03:22:57 2011 -0400
-
- First formatting options, first list formatting
-
-commit 47385851581f8d3e4718cf985bcc88b5cbd24d4b
-Author: TaoK <tao@klerks.biz>
-Date: Sat Apr 23 06:15:09 2011 -0400
-
- V0.8.5: Clause handling complete
-
-commit 9b35a607a29270b30c52a836233bfa3b239e2a82
-Author: TaoK <tao@klerks.biz>
-Date: Fri Apr 22 18:17:00 2011 -0400
-
- Initial Partial "Clause" handling
-
-commit 97fd6da5bc73d56cfab0d5b468a94eac7c055fb6
-Author: TaoK <tao@klerks.biz>
-Date: Fri Apr 22 12:36:08 2011 -0400
-
- Initial Commit
-
- Initial commit - most parsing features and some formatting features
- in place, major remaining part is the handling of clauses within
- statements - where clauses, join clauses, etc.
Please sign in to comment.
Something went wrong with that request. Please try again.