Add fixer for "dotnet format" (#3879)

The .NET ecosystem has an official tool for formatting its files: `dotnet format`
This adds support for that tool to ALE.
This commit is contained in:
Jelte Fennema
2021-08-25 08:27:04 +02:00
committed by GitHub
parent f896744fee
commit d53a085096
7 changed files with 100 additions and 0 deletions

View File

@@ -90,6 +90,39 @@ g:ale_cs_csc_assemblies *g:ale_cs_csc_assemblies*
\]
<
===============================================================================
dotnet-format *ale-cs-dotnet-format*
Installation
-------------------------------------------------------------------------------
Installing .NET SDK should probably ensure that `dotnet` is in your `$PATH`.
For .NET 6 the `dotnet format` tool is already included in the .NET SDK. For
.NET 5 or below you will have to manually install it using the instructions
from listed in this repository: https://github.com/dotnet/format
Options
-------------------------------------------------------------------------------
g:ale_cs_dotnet_format_executable *g:ale_cs_dotnet_format_executable*
*b:ale_cs_dotnet_format_executable*
Type: |String|
Default: `'dotnet'`
This variable can be set to specify an absolute path to the
`dotnet` executable (or to specify an alternate executable).
g:ale_cs_dotnet_format_options *g:ale_cs_dotnet_format_options*
*b:ale_cs_dotnet_format_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to the `dotnet format`
fixer.
===============================================================================
mcs *ale-cs-mcs*

View File

@@ -66,6 +66,7 @@ Notes:
* `uncrustify`
* C#
* `csc`!!
* `dotnet-format`
* `mcs`
* `mcsc`!!
* `uncrustify`

View File

@@ -2681,6 +2681,7 @@ documented in additional help files.
uncrustify............................|ale-cpp-uncrustify|
c#......................................|ale-cs-options|
csc...................................|ale-cs-csc|
dotnet-format.........................|ale-cs-dotnet-format|
mcs...................................|ale-cs-mcs|
mcsc..................................|ale-cs-mcsc|
uncrustify............................|ale-cs-uncrustify|