ale/doc/ale-cs.txt

103 lines
3.9 KiB
Plaintext
Raw Normal View History

===============================================================================
ALE C# Integration *ale-cs-options*
===============================================================================
mcs *ale-cs-mcs*
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.
g:ale_cs_mcs_options *g:ale_cs_mcs_options*
*b:ale_cs_mcs_options*
Type: String
Default: `''`
This variable can be changed to pass additional flags given to mcs.
NOTE: The -unsafe flag is selected implicitly and thus does not need to be
explicitly included in the |g:ale_cs_mcs_options| or |b:ale_cs_mcs_options|
parameter.
===============================================================================
mcsc *ale-cs-mcsc*
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.
The mcsc linter uses the mono mcs compiler to generate a temporary module
target file (-t:module). The module includes including all '*.cs' files
contained in the directory tree rooted at the path defined by the
|g:ale_cs_mcsc_source| or |b:ale_cs_mcsc_source| variable.
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.
NOTE: ALE will not 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_mcsc_options *g:ale_cs_mcsc_options*
*b:ale_cs_mcsc_options*
Type: |String|
Default: `''`
This option can be set to pass additional arguments to the `mcs` compiler.
For example, to add the dotnet package which is not added per default: >
let g:ale_cs_mcs_options = '-pkg:dotnet'
<
NOTE: the `-unsafe` option is always passed to `mcs`.
g:ale_cs_mcsc_source *g:ale_cs_mcsc_source*
*b:ale_cs_mcsc_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_mcsc_assembly_path *g:ale_cs_mcsc_assembly_path*
*b:ale_cs_mcsc_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 mcs compiler using the `-lib:`
flag.
g:ale_cs_mcsc_assemblies *g:ale_cs_mcsc_assemblies*
*b:ale_cs_mcsc_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 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 = [
\ '/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll',
\ 'path-to-unityproject/obj/Debug',
\]
<
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: