Git Product home page Git Product logo

editorconfig-core-net's Introduction

EditorConfig .NET Core

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

Installation

The library exists on nuget as:

nuget install editorconfig

The .NET core tool exists under:

dotnet tool install editorconfig-tool

Usage

Usage as a library:

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

Usage as a command line tool:

You can omit dotnet if you install this as a global tool

> dotnet editorconfig-tool

    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:

> dotnet editorconfig-tool 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.

After which 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.

editorconfig-core-net's People

Contributors

adalon avatar coliff avatar kant avatar michalpetryka avatar mpdreamz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.