djseng / enforce-style

poc, enforce .editorconfig on build

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mkdir enforce-style
cd enforce-style
dotnet new console
dotnet new editorconfig
dotnet new gitignore
dotnet new tool-manifest
dotnet tool run dotnet-csharpier . --check
echo '	Console.WriteLine("Hello, World!"); // tab on this line, .editorconfig configure to use spaces' > Program.cs

Add

  <Target Name="PreBuild" BeforeTargets="PreBuildEvent">
    <Exec Command="dotnet tool run dotnet-csharpier . --check" />
  </Target>

to the enforce_style.csproj

dotnet build

About

poc, enforce .editorconfig on build


Languages

Language:C# 100.0%