All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 ===============================================================================
2 ALE C# Integration *ale-cs-options*
4 In addition to the linters that are provided with ALE, C# code can be checked
5 with the OmniSharp plugin. See here: https://github.com/OmniSharp/omnisharp-vim
8 ===============================================================================
9 clang-format *ale-cs-clangformat*
11 See |ale-c-clangformat| for information about the available options.
12 Note that the C options are also used for C#.
15 ===============================================================================
18 The |ale-cs-csc| linter checks for semantic errors when files are opened or
21 See |ale-lint-file-linters| for more information on linters which do not check
22 for problems while you type.
24 The csc linter uses the mono csc compiler, providing full C# 7 and newer
25 support, to generate a temporary module target file (/t:module). The module
26 includes all '*.cs' files contained in the directory tree rooted at the path
27 defined by the |g:ale_cs_csc_source| or |b:ale_cs_csc_source| variable and all
30 It will in future replace the |ale-cs-mcs| and |ale-cs-mcsc| linters as both
31 utilize the mcsc compiler which, according to the mono project, is no longer
32 actively developed, and only receives maintenance updates. However, because
33 the csc compiler does not support the -syntax option, this linter does not
34 offer any as-you-type syntax checking, similar to the |ale-cs-mcsc| linter.
36 The paths to search for additional assembly files can be specified using the
37 |g:ale_cs_csc_assembly_path| or |b:ale_cs_csc_assembly_path| variables.
39 NOTE: ALE will not find any errors in files apart from syntax errors if any
40 one of the source files contains a syntax error. Syntax errors must be fixed
41 first before other errors will be shown.
44 -------------------------------------------------------------------------------
46 *ale-options.cs_csc_options*
47 *g:ale_cs_csc_options*
48 *b:ale_cs_csc_options*
54 This option can be set to pass additional arguments to the `csc` compiler.
56 For example, to add the dotnet package which is not added per default: >
58 let g:ale_cs_mcs_options = ' /warn:4 /langversion:7.2'
60 NOTE: the `/unsafe` option is always passed to `csc`.
62 *ale-options.cs_csc_source*
70 This variable defines the root path of the directory tree searched for the
71 '*.cs' files to be linted. If this option is empty, the source file's
72 directory will be used.
74 NOTE: Currently it is not possible to specify sub directories and
75 directory sub trees which shall not be searched for *.cs files.
77 *ale-options.cs_csc_assembly_path*
78 *g:ale_cs_csc_assembly_path*
79 *b:ale_cs_csc_assembly_path*
81 g:ale_cs_csc_assembly_path
85 This variable defines a list of path strings to be searched for external
86 assembly files. The list is passed to the csc compiler using the `/lib:`
89 *ale-options.cs_csc_assemblies*
90 *g:ale_cs_csc_assemblies*
91 *b:ale_cs_csc_assemblies*
93 g:ale_cs_csc_assemblies
97 This variable defines a list of external assembly (*.dll) files required
98 by the mono mcs compiler to generate a valid module target. The list is
99 passed the csc compiler using the `/r:` flag.
103 " Compile C# programs with the Unity engine DLL file on Mac.
104 let g:ale_cs_mcsc_assemblies = [
105 \ '/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll',
106 \ 'path-to-unityproject/obj/Debug',
110 ===============================================================================
111 cspell *ale-cs-cspell*
113 See |ale-cspell-options|
116 ===============================================================================
117 dotnet-format *ale-cs-dotnet-format*
120 -------------------------------------------------------------------------------
123 Installing .NET SDK should probably ensure that `dotnet` is in your `$PATH`.
124 For .NET 6 the `dotnet format` tool is already included in the .NET SDK. For
125 .NET 5 or below you will have to manually install it using the instructions
126 from listed in this repository: https://github.com/dotnet/format
129 -------------------------------------------------------------------------------
131 *ale-options.cs_dotnet_format_executable*
132 *g:ale_cs_dotnet_format_executable*
133 *b:ale_cs_dotnet_format_executable*
134 cs_dotnet_format_executable
135 g:ale_cs_dotnet_format_executable
139 This variable can be set to specify an absolute path to the
140 `dotnet` executable (or to specify an alternate executable).
142 *ale-options.cs_dotnet_format_options*
143 *g:ale_cs_dotnet_format_options*
144 *b:ale_cs_dotnet_format_options*
145 cs_dotnet_format_options
146 g:ale_cs_dotnet_format_options
150 This variable can be set to pass additional options to the `dotnet format`
154 ===============================================================================
157 The `mcs` linter looks only for syntax errors while you type. See
158 |ale-cs-mcsc| for the separately configured linter for checking for semantic
162 -------------------------------------------------------------------------------
164 *ale-options.cs_mcs_options*
165 *g:ale_cs_mcs_options*
166 *b:ale_cs_mcs_options*
172 This variable can be changed to pass additional flags given to mcs.
174 NOTE: The -unsafe flag is selected implicitly and thus does not need to be
175 explicitly included in the |g:ale_cs_mcs_options| or |b:ale_cs_mcs_options|
179 ===============================================================================
182 The mcsc linter checks for semantic errors when files are opened or saved See
183 |ale-lint-file-linters| for more information on linters which do not check for
184 problems while you type.
186 The mcsc linter uses the mono mcs compiler to generate a temporary module
187 target file (-t:module). The module includes including all '*.cs' files
188 contained in the directory tree rooted at the path defined by the
189 |g:ale_cs_mcsc_source| or |b:ale_cs_mcsc_source| variable. variable and all
192 The paths to search for additional assembly files can be specified using the
193 |g:ale_cs_mcsc_assembly_path| or |b:ale_cs_mcsc_assembly_path| variables.
195 NOTE: ALE will not find any errors in files apart from syntax errors if any
196 one of the source files contains a syntax error. Syntax errors must be fixed
197 first before other errors will be shown.
200 -------------------------------------------------------------------------------
202 *ale-options.cs_mcsc_options*
203 *g:ale_cs_mcsc_options*
204 *b:ale_cs_mcsc_options*
206 g:ale_cs_mcsc_options
210 This option can be set to pass additional arguments to the `mcs` compiler.
212 For example, to add the dotnet package which is not added per default: >
214 let g:ale_cs_mcs_options = '-pkg:dotnet'
216 NOTE: the `-unsafe` option is always passed to `mcs`.
218 *ale-options.cs_mcsc_source*
219 *g:ale_cs_mcsc_source*
220 *b:ale_cs_mcsc_source*
226 This variable defines the root path of the directory tree searched for the
227 '*.cs' files to be linted. If this option is empty, the source file's
228 directory will be used.
230 NOTE: Currently it is not possible to specify sub directories and
231 directory sub trees which shall not be searched for *.cs files.
233 *ale-options.cs_mcsc_assembly_path*
234 *g:ale_cs_mcsc_assembly_path*
235 *b:ale_cs_mcsc_assembly_path*
236 cs_mcsc_assembly_path
237 g:ale_cs_mcsc_assembly_path
241 This variable defines a list of path strings to be searched for external
242 assembly files. The list is passed to the mcs compiler using the `-lib:`
245 *ale-options.cs_mcsc_assemblies*
246 *g:ale_cs_mcsc_assemblies*
247 *b:ale_cs_mcsc_assemblies*
249 g:ale_cs_mcsc_assemblies
253 This variable defines a list of external assembly (*.dll) files required
254 by the mono mcs compiler to generate a valid module target. The list is
255 passed the mcs compiler using the `-r:` flag.
259 " Compile C# programs with the Unity engine DLL file on Mac.
260 let g:ale_cs_mcsc_assemblies = [
261 \ '/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll',
262 \ 'path-to-unityproject/obj/Debug',
266 ===============================================================================
267 uncrustify *ale-cs-uncrustify*
269 See |ale-c-uncrustify| for information about the available options.
272 ===============================================================================
273 vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: