summaryrefslogtreecommitdiff
path: root/doc/ale-powershell.txt
blob: 44a3c61832c73ce589c608ffb164185c595e9340 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
===============================================================================
ALE PowerShell Integration                             *ale-powershell-options*


===============================================================================
cspell                                                  *ale-powershell-cspell*

See |ale-cspell-options|


===============================================================================
powershell                                          *ale-powershell-powershell*

g:ale_powershell_powershell_executable *g:ale_powershell_powershell_executable*
                                       *b:ale_powershell_powershell_executable*
  Type: |String|
  Default: `'pwsh'`

  This variable can be changed to use a different executable for powershell.

>
  " Use powershell.exe rather than the default pwsh
  let g:ale_powershell_powershell_executable = 'powershell.exe'
>

===============================================================================
psscriptanalyzer                              *ale-powershell-psscriptanalyzer*

Installation
-------------------------------------------------------------------------------

Install PSScriptAnalyzer by any means, so long as it can be automatically
imported in PowerShell.

g:ale_powershell_psscriptanalyzer_executable
*g:ale_powershell_psscriptanalyzer_executable*
                                 *b:ale_powershell_psscriptanalyzer_executable*
  Type: |String|
  Default: `'pwsh'`

  This variable sets executable used for powershell.

  For example, on Windows you could set powershell to be Windows Powershell:
>
  let g:ale_powershell_psscriptanalyzer_executable = 'powershell.exe'
<

g:ale_powershell_psscriptanalyzer_module
*g:ale_powershell_psscriptanalyzer_module*
                                     *b:ale_powershell_psscriptanalyzer_module*
  Type: |String
  Default: `'psscriptanalyzer'`

  This variable sets the name of the psscriptanalyzer module.
  for psscriptanalyzer invocation.


g:ale_powershell_psscriptanalyzer_exclusions
*g:ale_powershell_psscriptanalyzer_exclusions*
                                 *b:ale_powershell_psscriptanalyzer_exclusions*
  Type: |String|
  Default: `''`

  Set this variable to exclude test(s) for psscriptanalyzer
  (-ExcludeRule option).  To exclude more than one option, separate them with
  commas.

>
  " Suppress Write-Host and Global vars warnings
  let g:ale_powershell_psscriptanalyzer_exclusions =
  \  'PSAvoidUsingWriteHost,PSAvoidGlobalVars'
<

===============================================================================
  vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: