editorconfig-tool.linux-x64 0.16.2

dotnet add package editorconfig-tool.linux-x64 --version 0.16.2
                    
NuGet\Install-Package editorconfig-tool.linux-x64 -Version 0.16.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="editorconfig-tool.linux-x64" Version="0.16.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="editorconfig-tool.linux-x64" Version="0.16.2" />
                    
Directory.Packages.props
<PackageReference Include="editorconfig-tool.linux-x64" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add editorconfig-tool.linux-x64 --version 0.16.2
                    
#r "nuget: editorconfig-tool.linux-x64, 0.16.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package editorconfig-tool.linux-x64@0.16.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=editorconfig-tool.linux-x64&version=0.16.2
                    
Install as a Cake Addin
#tool nuget:?package=editorconfig-tool.linux-x64&version=0.16.2
                    
Install as a Cake Tool

EditorConfig .NET Core

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

Installation

Library (NuGet):

dotnet add package editorconfig

CLI tool:

dotnet tool install --global editorconfig-tool

The tool ships as a native AOT binary for each supported platform. When you run dotnet tool install, the correct pre-compiled native binary is selected automatically — no .NET runtime required at invocation time:

Platform RID
Linux x64 linux-x64
Linux Arm64 linux-arm64
Windows x64 win-x64
Windows Arm64 win-arm64
macOS Apple Silicon osx-arm64

A framework-dependent fallback (any) is included for other platforms.

Usage

Library

// Recommended: caching and default filesystem
var parser = new EditorConfigParser();
var config = parser.Parse(fileName);
foreach (var kv in config.Properties)
    Console.WriteLine("{0}={1}", kv.Key, kv.Value);
Parsing many files efficiently

When processing many files in one run (e.g. a formatter or linter), reuse the same EditorConfigParser instance. The parser caches both compiled glob matchers and the resolved .editorconfig chain per directory — so the second and subsequent files in the same directory cost only a dictionary lookup plus glob matching, with zero traversal overhead.

var parser = new EditorConfigParser();

// All files share one parser instance; files in the same directory
// share one resolved chain automatically.
var results = parser.Parse(file1, file2, file3 /*, ... */);

For explicit control (e.g. grouping files by directory yourself):

var chain = parser.GetResolvedChain(file1);   // traverses once for this directory
var cfg1  = parser.Parse(file1, chain);
var cfg2  = parser.Parse(file2, chain);       // zero traversal — same directory
Injecting a file system

Pass an IFileSystem from System.IO.Abstractions when you need a testable or virtual file system:

// Caching is enabled automatically
var parser = new EditorConfigParser(myFileSystem);

When fileSystem is omitted the library uses new FileSystem() (the real disk).

Performance

The library is designed to be high-performance and allocation-light.

  • Zero-allocation glob matching — the match engine is a ref struct over ReadOnlySpan<char>, so matching produces no heap allocations.
  • Source-generated regexes — the INI parser uses [GeneratedRegex] on .NET 7+ for optimal regex throughput.
  • Per-directory chain cache.editorconfig files are resolved once per directory per parser instance. For a repository with thousands of source files, the traversal and File.Exists checks are paid at most once per unique directory.
  • File-content cacheEditorConfigFileCache (used by default) caches parsed files by path + modification time + size. Cache hits require only a single metadata stat with no file read.

Benchmark results on Apple M2 Pro · .NET 10 · Arm64:

Scenario Time Allocations
Single file, warm parser 1.3 μs 1.5 KB
50 files, same directory, warm parser 63 μs 82 KB
Glob match (pre-compiled, per match) 4.7 μs 0 B

Target frameworks

The library targets netstandard2.0, net462, and net10.0. All three targets are functionally equivalent. The net10.0 target enables additional performance features (source-generated regexes, AOT compatibility).

CLI tool

You can omit dotnet if installed as a global tool:

> dotnet editorconfig

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

    EditorConfig .NET Core Version 0.12

    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 anatomy.md
charset=utf-8
insert_final_newline=true
end_of_line=lf
tab_width=8
trim_trailing_whitespace=sometimes

Development

Clone the repository and initialise the conformance test submodule:

git clone git@github.com:editorconfig/editorconfig-core-net.git
git submodule init
git submodule update

Build:

dotnet build

Run unit tests (TUnit):

dotnet run --project src/EditorConfig.Tests -c Release

Run the upstream editorconfig conformance suite (requires CMake):

cmake .
ctest .

Run benchmarks (BenchmarkDotNet):

dotnet run -c Release --project benchmarks/EditorConfig.Benchmarks
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.16.2 55 6/1/2026
0.16.1 61 6/1/2026
0.16.0 49 6/1/2026