]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/doc/ale-cs.txt

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '76265755a1add77121c8f9dabb3e9bb70fe9a972' as '.vim/bundle/ale'
[etc/vim.git] / .vim / bundle / ale / doc / ale-cs.txt
1 ===============================================================================
2 ALE C# Integration                                             *ale-cs-options*
3
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
6
7
8 ===============================================================================
9 clang-format                                               *ale-cs-clangformat*
10
11 See |ale-c-clangformat| for information about the available options.
12 Note that the C options are also used for C#.
13
14
15 ===============================================================================
16 csc                                                                *ale-cs-csc*
17
18 The |ale-cs-csc| linter checks for semantic errors when files are opened or
19 saved.
20
21 See |ale-lint-file-linters| for more information on linters which do not check
22 for problems while you type.
23
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
28 sub directories.
29
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.
35
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.
38
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.
42
43
44 -------------------------------------------------------------------------------
45 Options
46                                                    *ale-options.cs_csc_options*
47                                                          *g:ale_cs_csc_options*
48                                                          *b:ale_cs_csc_options*
49 cs_csc_options
50 g:ale_cs_csc_options
51   Type: |String|
52   Default: `''`
53
54   This option can be set to pass additional arguments to the `csc` compiler.
55
56   For example, to add the dotnet package which is not added per default: >
57
58       let g:ale_cs_mcs_options = ' /warn:4 /langversion:7.2'
59 <
60   NOTE: the `/unsafe` option is always passed to `csc`.
61
62                                                     *ale-options.cs_csc_source*
63                                                           *g:ale_cs_csc_source*
64                                                           *b:ale_cs_csc_source*
65 cs_csc_source
66 g:ale_cs_csc_source
67   Type: |String|
68   Default: `''`
69
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.
73
74   NOTE: Currently it is not possible to specify sub directories and
75   directory sub trees which shall not be searched for *.cs files.
76
77                                              *ale-options.cs_csc_assembly_path*
78                                                    *g:ale_cs_csc_assembly_path*
79                                                    *b:ale_cs_csc_assembly_path*
80 cs_csc_assembly_path
81 g:ale_cs_csc_assembly_path
82   Type: |List|
83   Default: `[]`
84
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:`
87   flag.
88
89                                                 *ale-options.cs_csc_assemblies*
90                                                       *g:ale_cs_csc_assemblies*
91                                                       *b:ale_cs_csc_assemblies*
92 cs_csc_assemblies
93 g:ale_cs_csc_assemblies
94   Type: |List|
95   Default: `[]`
96
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.
100
101   For example: >
102
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',
107   \]
108 <
109
110 ===============================================================================
111 cspell                                                          *ale-cs-cspell*
112
113 See |ale-cspell-options|
114
115
116 ===============================================================================
117 dotnet-format                                            *ale-cs-dotnet-format*
118
119
120 -------------------------------------------------------------------------------
121 Installation
122
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
127
128
129 -------------------------------------------------------------------------------
130 Options
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
136   Type: |String|
137   Default: `'dotnet'`
138
139   This variable can be set to specify an absolute path to the
140   `dotnet` executable (or to specify an alternate executable).
141
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
147   Type: |String|
148   Default: `''`
149
150   This variable can be set to pass additional options to the `dotnet format`
151   fixer.
152
153
154 ===============================================================================
155 mcs                                                                *ale-cs-mcs*
156
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
159 errors.
160
161
162 -------------------------------------------------------------------------------
163 Options
164                                                    *ale-options.cs_mcs_options*
165                                                          *g:ale_cs_mcs_options*
166                                                          *b:ale_cs_mcs_options*
167 cs_mcs_options
168 g:ale_cs_mcs_options
169   Type: |String|
170   Default: `''`
171
172   This variable can be changed to pass additional flags given to mcs.
173
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|
176   parameter.
177
178
179 ===============================================================================
180 mcsc                                                              *ale-cs-mcsc*
181
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.
185
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
190 sub directories.
191
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.
194
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.
198
199
200 -------------------------------------------------------------------------------
201 Options
202                                                   *ale-options.cs_mcsc_options*
203                                                         *g:ale_cs_mcsc_options*
204                                                         *b:ale_cs_mcsc_options*
205 cs_mcsc_options
206 g:ale_cs_mcsc_options
207   Type: |String|
208   Default: `''`
209
210   This option can be set to pass additional arguments to the `mcs` compiler.
211
212   For example, to add the dotnet package which is not added per default: >
213
214   let g:ale_cs_mcs_options = '-pkg:dotnet'
215 <
216   NOTE: the `-unsafe` option is always passed to `mcs`.
217
218                                                    *ale-options.cs_mcsc_source*
219                                                          *g:ale_cs_mcsc_source*
220                                                          *b:ale_cs_mcsc_source*
221 cs_mcsc_source
222 g:ale_cs_mcsc_source
223   Type: |String|
224   Default: `''`
225
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.
229
230   NOTE: Currently it is not possible to specify sub directories and
231   directory sub trees which shall not be searched for *.cs files.
232
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
238   Type: |List|
239   Default: `[]`
240
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:`
243   flag.
244
245                                                *ale-options.cs_mcsc_assemblies*
246                                                      *g:ale_cs_mcsc_assemblies*
247                                                      *b:ale_cs_mcsc_assemblies*
248 cs_mcsc_assemblies
249 g:ale_cs_mcsc_assemblies
250   Type: |List|
251   Default: `[]`
252
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.
256
257   For example: >
258
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',
263   \]
264 <
265
266 ===============================================================================
267 uncrustify                                                  *ale-cs-uncrustify*
268
269 See |ale-c-uncrustify| for information about the available options.
270
271
272 ===============================================================================
273   vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: