2017-09-25 10:54:50 +00:00
|
|
|
===============================================================================
|
|
|
|
ALE C# Integration *ale-cs-options*
|
|
|
|
|
|
|
|
|
2018-10-29 09:41:50 +00:00
|
|
|
In addition to the linters that are provided with ALE, C# code can be checked
|
|
|
|
with the OmniSharp plugin. See here: https://github.com/OmniSharp/omnisharp-vim
|
|
|
|
|
|
|
|
|
2022-11-25 13:16:16 +00:00
|
|
|
===============================================================================
|
|
|
|
clang-format *ale-cs-clangformat*
|
|
|
|
|
|
|
|
See |ale-c-clangformat| for information about the available options.
|
|
|
|
Note that the C options are also used for C#.
|
|
|
|
|
|
|
|
|
2019-07-02 07:18:17 +00:00
|
|
|
===============================================================================
|
|
|
|
csc *ale-cs-csc*
|
|
|
|
|
|
|
|
The |ale-cs-csc| linter checks for semantic errors when files are opened or
|
|
|
|
saved.
|
2019-07-30 15:08:41 +00:00
|
|
|
|
2019-07-02 07:18:17 +00:00
|
|
|
See |ale-lint-file-linters| for more information on linters which do not
|
|
|
|
check for problems while you type.
|
|
|
|
|
2019-07-30 15:08:41 +00:00
|
|
|
The csc linter uses the mono csc compiler, providing full C# 7 and newer
|
|
|
|
support, to generate a temporary module target file (/t:module). The module
|
|
|
|
includes all '*.cs' files contained in the directory tree rooted at the path
|
|
|
|
defined by the |g:ale_cs_csc_source| or |b:ale_cs_csc_source| variable and
|
|
|
|
all sub directories.
|
|
|
|
|
2019-07-02 07:18:17 +00:00
|
|
|
It will in future replace the |ale-cs-mcs| and |ale-cs-mcsc| linters as both
|
2019-07-30 15:08:41 +00:00
|
|
|
utilize the mcsc compiler which, according to the mono project, is no longer
|
|
|
|
actively developed, and only receives maintenance updates. However, because
|
|
|
|
the csc compiler does not support the -syntax option, this linter does not
|
|
|
|
offer any as-you-type syntax checking, similar to the |ale-cs-mcsc| linter.
|
2019-07-02 07:18:17 +00:00
|
|
|
|
|
|
|
The paths to search for additional assembly files can be specified using the
|
|
|
|
|g:ale_cs_csc_assembly_path| or |b:ale_cs_csc_assembly_path| variables.
|
|
|
|
|
|
|
|
NOTE: ALE will not find any errors in files apart from syntax errors if any
|
|
|
|
one of the source files contains a syntax error. Syntax errors must be fixed
|
|
|
|
first before other errors will be shown.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_cs_csc_options *g:ale_cs_csc_options*
|
|
|
|
*b:ale_cs_csc_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This option can be set to pass additional arguments to the `csc` compiler.
|
|
|
|
|
|
|
|
For example, to add the dotnet package which is not added per default: >
|
|
|
|
|
|
|
|
let g:ale_cs_mcs_options = ' /warn:4 /langversion:7.2'
|
|
|
|
<
|
|
|
|
NOTE: the `/unsafe` option is always passed to `csc`.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_cs_csc_source *g:ale_cs_csc_source*
|
|
|
|
*b:ale_cs_csc_source*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable defines the root path of the directory tree searched for the
|
|
|
|
'*.cs' files to be linted. If this option is empty, the source file's
|
|
|
|
directory will be used.
|
|
|
|
|
|
|
|
NOTE: Currently it is not possible to specify sub directories and
|
|
|
|
directory sub trees which shall not be searched for *.cs files.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_cs_csc_assembly_path *g:ale_cs_csc_assembly_path*
|
|
|
|
*b:ale_cs_csc_assembly_path*
|
|
|
|
Type: |List|
|
|
|
|
Default: `[]`
|
|
|
|
|
|
|
|
This variable defines a list of path strings to be searched for external
|
|
|
|
assembly files. The list is passed to the csc compiler using the `/lib:`
|
|
|
|
flag.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_cs_csc_assemblies *g:ale_cs_csc_assemblies*
|
|
|
|
*b:ale_cs_csc_assemblies*
|
|
|
|
Type: |List|
|
|
|
|
Default: `[]`
|
|
|
|
|
|
|
|
This variable defines a list of external assembly (*.dll) files required
|
|
|
|
by the mono mcs compiler to generate a valid module target. The list is
|
|
|
|
passed the csc compiler using the `/r:` flag.
|
|
|
|
|
|
|
|
For example: >
|
|
|
|
|
|
|
|
" Compile C# programs with the Unity engine DLL file on Mac.
|
|
|
|
let g:ale_cs_mcsc_assemblies = [
|
|
|
|
\ '/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll',
|
|
|
|
\ 'path-to-unityproject/obj/Debug',
|
|
|
|
\]
|
|
|
|
<
|
|
|
|
|
2021-11-18 22:41:05 +00:00
|
|
|
===============================================================================
|
|
|
|
cspell *ale-cs-cspell*
|
|
|
|
|
|
|
|
See |ale-cspell-options|
|
|
|
|
|
|
|
|
|
2021-08-25 06:27:04 +00:00
|
|
|
===============================================================================
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
2017-09-25 10:54:50 +00:00
|
|
|
===============================================================================
|
2017-09-26 07:19:53 +00:00
|
|
|
mcs *ale-cs-mcs*
|
2017-09-25 10:54:50 +00:00
|
|
|
|
2019-07-02 07:18:17 +00:00
|
|
|
The `mcs` linter looks only for syntax errors while you type. See
|
|
|
|
|ale-cs-mcsc| for the separately configured linter for checking for semantic
|
|
|
|
errors.
|
2017-12-19 16:54:46 +00:00
|
|
|
|
2017-09-25 10:54:50 +00:00
|
|
|
|
|
|
|
g:ale_cs_mcs_options *g:ale_cs_mcs_options*
|
|
|
|
*b:ale_cs_mcs_options*
|
|
|
|
|
|
|
|
Type: String
|
|
|
|
Default: `''`
|
|
|
|
|
2017-09-26 07:19:53 +00:00
|
|
|
This variable can be changed to pass additional flags given to mcs.
|
|
|
|
|
2017-12-19 16:54:46 +00:00
|
|
|
NOTE: The -unsafe flag is selected implicitly and thus does not need to be
|
2017-09-26 07:19:53 +00:00
|
|
|
explicitly included in the |g:ale_cs_mcs_options| or |b:ale_cs_mcs_options|
|
|
|
|
parameter.
|
2017-09-25 10:54:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
mcsc *ale-cs-mcsc*
|
|
|
|
|
2017-12-19 16:54:46 +00:00
|
|
|
The mcsc linter checks for semantic errors when files are opened or saved
|
|
|
|
See |ale-lint-file-linters| for more information on linters which do not
|
|
|
|
check for problems while you type.
|
|
|
|
|
2017-09-26 07:19:53 +00:00
|
|
|
The mcsc linter uses the mono mcs compiler to generate a temporary module
|
|
|
|
target file (-t:module). The module includes including all '*.cs' files
|
2017-12-19 16:54:46 +00:00
|
|
|
contained in the directory tree rooted at the path defined by the
|
2017-09-26 07:19:53 +00:00
|
|
|
|g:ale_cs_mcsc_source| or |b:ale_cs_mcsc_source| variable.
|
2017-12-19 16:54:46 +00:00
|
|
|
variable and all sub directories.
|
|
|
|
|
|
|
|
The paths to search for additional assembly files can be specified using the
|
|
|
|
|g:ale_cs_mcsc_assembly_path| or |b:ale_cs_mcsc_assembly_path| variables.
|
|
|
|
|
2018-03-22 15:18:41 +00:00
|
|
|
NOTE: ALE will not find any errors in files apart from syntax errors if any
|
|
|
|
one of the source files contains a syntax error. Syntax errors must be fixed
|
2017-12-19 16:54:46 +00:00
|
|
|
first before other errors will be shown.
|
|
|
|
|
2017-09-26 07:19:53 +00:00
|
|
|
|
|
|
|
g:ale_cs_mcsc_options *g:ale_cs_mcsc_options*
|
|
|
|
*b:ale_cs_mcsc_options*
|
2017-09-25 10:54:50 +00:00
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
2017-12-19 16:54:46 +00:00
|
|
|
This option can be set to pass additional arguments to the `mcs` compiler.
|
2017-09-26 07:19:53 +00:00
|
|
|
|
2017-12-19 16:54:46 +00:00
|
|
|
For example, to add the dotnet package which is not added per default: >
|
2017-09-26 07:19:53 +00:00
|
|
|
|
|
|
|
let g:ale_cs_mcs_options = '-pkg:dotnet'
|
2017-12-19 16:54:46 +00:00
|
|
|
<
|
|
|
|
NOTE: the `-unsafe` option is always passed to `mcs`.
|
2017-09-25 10:54:50 +00:00
|
|
|
|
2017-09-26 07:19:53 +00:00
|
|
|
|
|
|
|
g:ale_cs_mcsc_source *g:ale_cs_mcsc_source*
|
|
|
|
*b:ale_cs_mcsc_source*
|
2017-09-25 10:54:50 +00:00
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
2017-09-26 07:19:53 +00:00
|
|
|
This variable defines the root path of the directory tree searched for the
|
2017-12-19 17:34:34 +00:00
|
|
|
'*.cs' files to be linted. If this option is empty, the source file's
|
|
|
|
directory will be used.
|
2017-09-26 07:19:53 +00:00
|
|
|
|
|
|
|
NOTE: Currently it is not possible to specify sub directories and
|
|
|
|
directory sub trees which shall not be searched for *.cs files.
|
2017-09-25 10:54:50 +00:00
|
|
|
|
2017-12-19 16:54:46 +00:00
|
|
|
|
2017-09-26 07:19:53 +00:00
|
|
|
g:ale_cs_mcsc_assembly_path *g:ale_cs_mcsc_assembly_path*
|
|
|
|
*b:ale_cs_mcsc_assembly_path*
|
2017-09-25 10:54:50 +00:00
|
|
|
Type: |List|
|
|
|
|
Default: `[]`
|
|
|
|
|
2017-09-26 07:19:53 +00:00
|
|
|
This variable defines a list of path strings to be searched for external
|
2017-12-19 16:54:46 +00:00
|
|
|
assembly files. The list is passed to the mcs compiler using the `-lib:`
|
|
|
|
flag.
|
|
|
|
|
2017-09-25 10:54:50 +00:00
|
|
|
|
2017-09-26 07:19:53 +00:00
|
|
|
g:ale_cs_mcsc_assemblies *g:ale_cs_mcsc_assemblies*
|
|
|
|
*b:ale_cs_mcsc_assemblies*
|
2017-09-25 10:54:50 +00:00
|
|
|
Type: |List|
|
|
|
|
Default: `[]`
|
|
|
|
|
2017-12-19 16:54:46 +00:00
|
|
|
This variable defines a list of external assembly (*.dll) files required
|
|
|
|
by the mono mcs compiler to generate a valid module target. The list is
|
|
|
|
passed the mcs compiler using the `-r:` flag.
|
|
|
|
|
|
|
|
For example: >
|
|
|
|
|
|
|
|
" Compile C# programs with the Unity engine DLL file on Mac.
|
2017-12-25 13:40:25 +00:00
|
|
|
let g:ale_cs_mcsc_assemblies = [
|
2017-12-19 16:54:46 +00:00
|
|
|
\ '/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll',
|
2018-02-23 22:43:24 +00:00
|
|
|
\ 'path-to-unityproject/obj/Debug',
|
2017-12-19 16:54:46 +00:00
|
|
|
\]
|
|
|
|
<
|
2017-09-25 10:54:50 +00:00
|
|
|
|
2018-09-05 00:39:32 +00:00
|
|
|
===============================================================================
|
|
|
|
uncrustify *ale-cs-uncrustify*
|
|
|
|
|
|
|
|
See |ale-c-uncrustify| for information about the available options.
|
|
|
|
|
|
|
|
|
2017-09-25 10:54:50 +00:00
|
|
|
===============================================================================
|
|
|
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|