]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/handler/test_psscriptanalyzer_handler.vader

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 'a39f715c13be3352193ffd9c5b7536b8786eff64' as '.vim/bundle/vim-lsp'
[etc/vim.git] / .vim / bundle / ale / test / handler / test_psscriptanalyzer_handler.vader
1 Before:
2   runtime ale_linters/powershell/psscriptanalyzer.vim
3
4 After:
5   call ale#linter#Reset()
6
7 Execute(The psscriptanalyzer handler should handle basic information or warnings):
8   AssertEqual
9   \ [
10   \   {
11   \     'lnum': 1,
12   \     'type': 'I',
13   \     'text': 'The cmdlet ''Get-GithubRepo'' does not have a help comment.',
14   \     'code': 'PSProvideCommentHelp',
15   \   },
16   \   {
17   \     'lnum': 9,
18   \     'type': 'W',
19   \     'text': '''%'' is an alias of ''ForEach-Object''. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.',
20   \     'code': 'PSAvoidUsingCmdletAliases',
21   \   },
22   \   {
23   \     'lnum': 23,
24   \     'type': 'E',
25   \     'text': 'The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system.',
26   \     'code': 'PSAvoidUsingComputerNameHardcoded',
27   \   },
28   \ ],
29   \ ale_linters#powershell#psscriptanalyzer#Handle(bufnr(''), [
30   \   '1',
31   \   'Information',
32   \   'The cmdlet ''Get-GithubRepo'' does not have a help comment.',
33   \   'PSProvideCommentHelp',
34   \   '9',
35   \   'Warning',
36   \   '''%'' is an alias of ''ForEach-Object''. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.',
37   \   'PSAvoidUsingCmdletAliases',
38   \   '23',
39   \   'Error',
40   \   'The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system.',
41   \   'PSAvoidUsingComputerNameHardcoded',
42   \ ])