EditorConfig Core library and command line utility written in C# for .NET/Mono http://editorconfig.org
C# F# Batchfile Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
packages added explicit net45 build for aspnetcore50, moved minimatcher to be … Feb 13, 2015
src
tests @ abb579e
.editorconfig
.gitignore
.gitmodules
CMakeLists.txt
EditorConfig.sln
LICENSE Update LICENSE Nov 21, 2016
README.md
build.bat updated build to pack choco and nuget Dec 1, 2014
sign.snk

README.md

EditorConfig .NET Core

The EditorConfig .NET coreprovides the same functionality as the EditorConfig C Core and EditorConfig Python Core.

Installation

The library exists on nuget under

nuget install editorconfig

The commandline tooling is uploaded to chocolatey under

cinst editorconfig.core

Usage

Usage as a library:

var parser = new EditorConfigParser();
var configuration = parser.Parse(fileName).First();
foreach (var kv in configuration.Properties)
{
    Console.WriteLine("{0}={1}", kv.Key, kv.Value);
}

Usage as a command line tool:

> editorconfig.exe

    Usage: editorconfig [OPTIONS] FILEPATH1 [FILEPATH2 FILEPATH3 ...]

    EditorConfig .NET Core Version 0.12

    FILEPATH can be a hyphen (-) if you want path(s) to be read from stdin.

    Options:

        -h, --help     output usage information
        -V, --version  output the version number
        -f <path>      Specify conf filename other than ".editorconfig"
        -b <version>   Specify version (used by devs to test compatibility)

Example:

> editorconfig.exe C:\Users\zoidberg\Documents\anatomy.md
charset=utf-8
insert_final_newline=true
end_of_line=lf
tab_width=8
trim_trailing_whitespace=sometimes

Development

Clone this repos and init the test submodule

git clone [email protected]:editorconfig/editorconfig-core-net.git
git submodule init
git submodule update

building in visual studio should just work (tm)

Building on the command line (will run all the unit tests too)

build

Release builds can be made using

build release X.X.X

Testing

We have several NUnit tests that you can run from visual studio or the build scripts.

If you want to run the official editorconfig tests you'll need to install CMAKE and call

cmake .

in the root of this repository once.

Afterwhich you can simply call

ctest .

To run the official editorconfig tests located in /tests right now we pass all but one related to utf-8 which fails when run from ctest . but when i run it directly from the commandline it succeeds.