/ test / handler / test_bicep_az_bicep_handler.vader
test_bicep_az_bicep_handler.vader
 1  Before:
 2    runtime ale_linters/bicep/az_bicep.vim
 3  
 4  After:
 5    call ale#linter#Reset()
 6  
 7  Execute(The az_bicep handler should handle basic warnings):
 8    AssertEqual
 9    \ [
10    \   {
11    \     'filename': '/tmp/nvimhxqs5D/1/dns.bicep',
12    \     'lnum': 7,
13    \     'col': 10,
14    \     'type': 'W',
15    \     'code': 'no-unused-existing-resources',
16    \     'text': 'Existing resource "asdasd" is declared but never used. [https://aka.ms/bicep/linter/no-unused-existing-resources]',
17    \   },
18    \   {
19    \     'filename': '/tmp/nvimhxqs5D/1/dns.bicep',
20    \     'lnum': 106,
21    \     'col': 6,
22    \     'type': 'E',
23    \     'code': 'BCP019',
24    \     'text': 'Expected a new line character at this location.',
25    \   },
26    \   {
27    \     'filename': '/tmp/cluster.bicep',
28    \     'lnum': 25,
29    \     'col': 30,
30    \     'type': 'E',
31    \     'code': 'BCP334',
32    \     'text': 'The provided value has no configured minimum length and may be too short to assign to a target with a configured minimum length of 1.',
33    \   },
34    \ ],
35    \ ale_linters#bicep#az_bicep#Handle(1, [
36    \   '/tmp/nvimhxqs5D/1/dns.bicep(7,10) : Warning no-unused-existing-resources: Existing resource "asdasd" is declared but never used. [https://aka.ms/bicep/linter/no-unused-existing-resources]',
37    \   '/tmp/nvimhxqs5D/1/dns.bicep(106,6) : Error BCP019: Expected a new line character at this location.',
38    \   'ERROR: /tmp/cluster.bicep(25,30) : Warning BCP334: The provided value has no configured minimum length and may be too short to assign to a target with a configured minimum length of 1.',
39    \ ])