diff --git a/.editorconfig b/.editorconfig
index e423218..8e58145 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -23,4 +23,4 @@ indent_size = 2
[*.json]
indent_style = space
-indent_size = 2
+indent_size = 4
diff --git a/EditorConfig.sln b/EditorConfig.sln
index 321baaa..736ace9 100644
--- a/EditorConfig.sln
+++ b/EditorConfig.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.30723.0
+# Visual Studio 14
+VisualStudioVersion = 14.0.22512.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorConfig.Core", "src\EditorConfig.Core\EditorConfig.Core.csproj", "{C33CF791-89D0-4ABE-B2B7-97E1F46A1319}"
EndProject
@@ -23,6 +23,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorConfig.Tests", "src\E
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorConfig.Core.NET45", "src\EditorConfig.Core.NET45\EditorConfig.Core.NET45.csproj", "{F22050E7-E2C3-47BC-8B06-5BFE163FF045}"
EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "EditorConfig.Core.ASPNET50", "src\EditorConfig.Core\EditorConfig.Core.ASPNET50.kproj", "{E7D90D82-D91C-4422-8EE3-74C149B76530}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -45,6 +47,10 @@ Global
{F22050E7-E2C3-47BC-8B06-5BFE163FF045}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F22050E7-E2C3-47BC-8B06-5BFE163FF045}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F22050E7-E2C3-47BC-8B06-5BFE163FF045}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E7D90D82-D91C-4422-8EE3-74C149B76530}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E7D90D82-D91C-4422-8EE3-74C149B76530}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E7D90D82-D91C-4422-8EE3-74C149B76530}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E7D90D82-D91C-4422-8EE3-74C149B76530}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/build/build.fsx b/build/build.fsx
index ed7f0ac..f46f20a 100644
--- a/build/build.fsx
+++ b/build/build.fsx
@@ -24,11 +24,12 @@ let toSingleExe = fun _ ->
let name = "editorconfig"
let outDir = "build\output\EditorConfig.App"
let inExe = sprintf "%s\editorconfig.exe" outDir
- let inDlls = sprintf "%s\EditorConfig.Core.dll %s\Minimatch.dll" outDir outDir
+ let inDlls = sprintf "%s\EditorConfig.Core.dll" outDir
let out = (ExecProcessAndReturnMessages(fun p ->
p.FileName <- sn
p.Arguments <- sprintf @"/target:winexe /out:build\output\%s.exe %s %s" name inExe inDlls
) (TimeSpan.FromMinutes 5.0))
+ out
Target "BuildApp" (fun _ ->
let binDirs = !! "src/**/bin/**"
@@ -46,6 +47,10 @@ Target "BuildApp" (fun _ ->
!! "src/**/*.csproj"
|> Seq.map(fun f -> (f, buildDir + directoryInfo(f).Name.Replace(".csproj", "")))
|> Seq.iter(fun (f,d) -> MSBuild d "Build" msbuildProperties (seq { yield f }) |> ignore)
+
+ !! "src/**/*.kproj"
+ |> Seq.map(fun f -> (f, buildDir + directoryInfo(f).Name.Replace(".kproj", "")))
+ |> Seq.iter(fun (f,d) -> MSBuild d "Build" msbuildProperties (seq { yield f }) |> ignore)
//does not seem to work, not a high priority
//toSingleExe()
@@ -133,7 +138,13 @@ let patchVersionInCode = fun _ ->
let updatedSource = regex_replace re (sprintf @"public static readonly string VersionString = ""%s""" patchedFileVersion) source
WriteStringToFile false file updatedSource
-
+let patchVersionInProjectJson = fun _ ->
+ let file = @"src\EditorConfig.Core\project.json"
+ let source = ReadFileAsString file
+ let re = @"""version"": ""[^""]+"""
+ let updatedSource = regex_replace re (sprintf @"""version"": ""%s""" patchedFileVersion) source
+ WriteStringToFile false file updatedSource
+
let chocoPack = fun _ ->
let choco = @"build\tools\chocolatey\tools\chocolateyInstall\chocolatey.cmd"
let spec = "build\chocolatey.nuspec"
@@ -197,6 +208,7 @@ Target "Version" (fun _ ->
)
patchVersionInCode()
+ patchVersionInProjectJson()
)
diff --git a/build/chocolatey.nuspec b/build/chocolatey.nuspec
index 98a8c52..1cd8bec 100644
--- a/build/chocolatey.nuspec
+++ b/build/chocolatey.nuspec
@@ -3,7 +3,7 @@
editorconfig.core
EditorConfig Core
- 0.12.0
+ 0.12.1
EditorConfig Team
Hong Xu, Martijn Laarman
Editorconig commandline tooling written in .NET
diff --git a/build/nuget.nuspec b/build/nuget.nuspec
index 932fcd1..3a129f1 100644
--- a/build/nuget.nuspec
+++ b/build/nuget.nuspec
@@ -15,6 +15,9 @@
http://editorconfig.org/logo.png
+
+
+
diff --git a/src/EditorConfig.App/Properties/AssemblyInfo.cs b/src/EditorConfig.App/Properties/AssemblyInfo.cs
index 0578933..307993f 100644
--- a/src/EditorConfig.App/Properties/AssemblyInfo.cs
+++ b/src/EditorConfig.App/Properties/AssemblyInfo.cs
@@ -2,13 +2,13 @@
using System.Reflection;
[assembly: AssemblyTitleAttribute("EditorConfig.App")]
-[assembly: AssemblyCopyrightAttribute("editorconfig.org 2014")]
+[assembly: AssemblyCopyrightAttribute("editorconfig.org 2015")]
[assembly: AssemblyDescriptionAttribute("A .NET implementation of the editorconfig tooling")]
[assembly: AssemblyCompanyAttribute("EditorConfig")]
[assembly: AssemblyConfigurationAttribute("Release")]
[assembly: AssemblyVersionAttribute("0.0.0")]
-[assembly: AssemblyFileVersionAttribute("0.12.0")]
-[assembly: AssemblyInformationalVersionAttribute("0.12.0")]
+[assembly: AssemblyFileVersionAttribute("0.12.1")]
+[assembly: AssemblyInformationalVersionAttribute("0.12.1")]
namespace System {
internal static class AssemblyVersionInformation {
internal const string Version = "0.0.0";
diff --git a/src/EditorConfig.Core.NET45/Properties/AssemblyInfo.cs b/src/EditorConfig.Core.NET45/Properties/AssemblyInfo.cs
index ff9b497..eb18e3e 100644
--- a/src/EditorConfig.Core.NET45/Properties/AssemblyInfo.cs
+++ b/src/EditorConfig.Core.NET45/Properties/AssemblyInfo.cs
@@ -1,36 +1,16 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
+//
+using System.Reflection;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("EditorConfig.Core.NET45")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("EditorConfig.Core.NET45")]
-[assembly: AssemblyCopyright("Copyright © 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("d4fc2924-b345-44a1-b360-821c1478ba50")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyTitleAttribute("EditorConfig.Core.NET45")]
+[assembly: AssemblyCopyrightAttribute("editorconfig.org 2015")]
+[assembly: AssemblyDescriptionAttribute("EditorConfig.Core.NET45")]
+[assembly: AssemblyCompanyAttribute("EditorConfig")]
+[assembly: AssemblyConfigurationAttribute("Release")]
+[assembly: AssemblyVersionAttribute("0.0.0")]
+[assembly: AssemblyFileVersionAttribute("0.12.1")]
+[assembly: AssemblyInformationalVersionAttribute("0.12.1")]
+namespace System {
+ internal static class AssemblyVersionInformation {
+ internal const string Version = "0.0.0";
+ }
+}
diff --git a/src/EditorConfig.Core/EditorConfig.Core.ASPNET50.kproj b/src/EditorConfig.Core/EditorConfig.Core.ASPNET50.kproj
new file mode 100644
index 0000000..260a7c5
--- /dev/null
+++ b/src/EditorConfig.Core/EditorConfig.Core.ASPNET50.kproj
@@ -0,0 +1,29 @@
+
+
+
+ 14.0
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+
+
+
+ e7d90d82-d91c-4422-8ee3-74c149b76530
+ EditorConfig.Core
+ ..\..\artifacts\obj\$(MSBuildProjectName)
+ ..\..\artifacts\bin\$(MSBuildProjectName)\
+
+
+ EditorConfig.Core
+
+
+ 2.0
+
+
+ True
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/EditorConfig.Core/EditorConfigFile.cs b/src/EditorConfig.Core/EditorConfigFile.cs
index 2c31df3..54be846 100644
--- a/src/EditorConfig.Core/EditorConfigFile.cs
+++ b/src/EditorConfig.Core/EditorConfigFile.cs
@@ -2,10 +2,8 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using System.Net;
using System.Text;
using System.Text.RegularExpressions;
-using System.Threading.Tasks;
namespace EditorConfig.Core
{
@@ -45,7 +43,8 @@ public EditorConfigFile(string file)
public void Parse(string file)
{
- var lines = File.ReadAllLines(file);
+ var lines = File.ReadLines(file);
+
var activeSection = this.Global;
foreach (var line in lines)
{
diff --git a/src/EditorConfig.Core/EditorConfigParser.cs b/src/EditorConfig.Core/EditorConfigParser.cs
index 93fdd0d..abed2dd 100644
--- a/src/EditorConfig.Core/EditorConfigParser.cs
+++ b/src/EditorConfig.Core/EditorConfigParser.cs
@@ -1,13 +1,9 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
-using System.Runtime.InteropServices;
-using System.Text;
using System.Text.RegularExpressions;
-using System.Threading.Tasks;
namespace EditorConfig.Core
{
@@ -19,7 +15,7 @@ public class EditorConfigParser
///
/// The current (and latest parser supported) version as string
///
- public static readonly string VersionString = "0.12.0";
+ public static readonly string VersionString = "0.12.1";
///
/// The current editorconfig version
@@ -140,7 +136,8 @@ private IEnumerable AllParentDirectories(string fullPath)
{
if (dir == null) yield break;
yield return dir;
- dir = Directory.GetParent(dir).FullName;
+ var dirInfo = new DirectoryInfo(dir);
+ dir = dirInfo.Parent.FullName;
} while (dir != root);
}
}
diff --git a/src/EditorConfig.Core/Properties/AssemblyInfo.cs b/src/EditorConfig.Core/Properties/AssemblyInfo.cs
index e34101d..68f5d47 100644
--- a/src/EditorConfig.Core/Properties/AssemblyInfo.cs
+++ b/src/EditorConfig.Core/Properties/AssemblyInfo.cs
@@ -2,13 +2,13 @@
using System.Reflection;
[assembly: AssemblyTitleAttribute("EditorConfig.Core")]
-[assembly: AssemblyCopyrightAttribute("editorconfig.org 2014")]
+[assembly: AssemblyCopyrightAttribute("editorconfig.org 2015")]
[assembly: AssemblyDescriptionAttribute("A .NET implementation of the core editorconfig library")]
[assembly: AssemblyCompanyAttribute("EditorConfig")]
[assembly: AssemblyConfigurationAttribute("Release")]
[assembly: AssemblyVersionAttribute("0.0.0")]
-[assembly: AssemblyFileVersionAttribute("0.12.0")]
-[assembly: AssemblyInformationalVersionAttribute("0.12.0")]
+[assembly: AssemblyFileVersionAttribute("0.12.1")]
+[assembly: AssemblyInformationalVersionAttribute("0.12.1")]
namespace System {
internal static class AssemblyVersionInformation {
internal const string Version = "0.0.0";
diff --git a/src/EditorConfig.Core/project.json b/src/EditorConfig.Core/project.json
new file mode 100644
index 0000000..6169512
--- /dev/null
+++ b/src/EditorConfig.Core/project.json
@@ -0,0 +1,26 @@
+{
+ "description": "Editorconfig library for .NET",
+ "authors": [ "Editorconfig Team" ],
+ "version": "0.12.1",
+ "dependencies": {
+ "System.Text.RegularExpressions": "4.0.10-beta-22416"
+ },
+ "code": [ "../EditorConfig.Core/*.cs" ],
+ "frameworks": {
+ "aspnet50": {
+ "dependencies": {
+ }
+ },
+ "aspnetcore50": {
+ "dependencies": {
+ "System.Text.RegularExpressions": "4.0.10-beta-22416",
+ "System.Runtime": "4.0.20-beta-22416",
+ "System.Linq": "4.0.0-beta-22416",
+ "System.IO": "4.0.0-beta-22416",
+ "System.IO.FileSystem": "4.0.0-beta-22416",
+ "System.Globalization.Extensions": "4.0.0-beta-22416",
+ "System.Diagnostics.Debug": "4.0.10-beta-22416"
+ }
+ }
+ }
+}
diff --git a/src/EditorConfig.Tests/Properties/AssemblyInfo.cs b/src/EditorConfig.Tests/Properties/AssemblyInfo.cs
index 10fd124..44eb7d4 100644
--- a/src/EditorConfig.Tests/Properties/AssemblyInfo.cs
+++ b/src/EditorConfig.Tests/Properties/AssemblyInfo.cs
@@ -2,13 +2,13 @@
using System.Reflection;
[assembly: AssemblyTitleAttribute("EditorConfig.Tests")]
-[assembly: AssemblyCopyrightAttribute("editorconfig.org 2014")]
+[assembly: AssemblyCopyrightAttribute("editorconfig.org 2015")]
[assembly: AssemblyDescriptionAttribute("EditorConfig.Tests")]
[assembly: AssemblyCompanyAttribute("EditorConfig")]
[assembly: AssemblyConfigurationAttribute("Release")]
[assembly: AssemblyVersionAttribute("0.0.0")]
-[assembly: AssemblyFileVersionAttribute("0.12.0")]
-[assembly: AssemblyInformationalVersionAttribute("0.12.0")]
+[assembly: AssemblyFileVersionAttribute("0.12.1")]
+[assembly: AssemblyInformationalVersionAttribute("0.12.1")]
namespace System {
internal static class AssemblyVersionInformation {
internal const string Version = "0.0.0";