]> git.madduck.net Git - etc/vim.git/blob - test/handler/test_spectral_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:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / test / handler / test_spectral_handler.vader
1 Before:
2   runtime ale_linters/yaml/spectral.vim
3
4 After:
5   call ale#linter#Reset()
6
7 Execute(spectral handler should parse lines correctly):
8   AssertEqual
9   \ [
10   \   {
11   \     'lnum': 1,
12   \     'col': 1,
13   \     'code': 'oas3-api-servers',
14   \     'text': 'OpenAPI `servers` must be present and non-empty array.',
15   \     'type': 'W'
16   \   },
17   \   {
18   \     'lnum': 1,
19   \     'col': 1,
20   \     'code': 'oas3-schema',
21   \     'text': 'Object should have required property `paths`.',
22   \     'type': 'E'
23   \   },
24   \   {
25   \     'lnum': 1,
26   \     'col': 1,
27   \     'code': 'openapi-tags',
28   \     'text': 'OpenAPI object should have non-empty `tags` array.',
29   \     'type': 'W'
30   \   },
31   \   {
32   \     'lnum': 3,
33   \     'col': 6,
34   \     'code': 'info-contact',
35   \     'text': 'Info object should contain `contact` object.',
36   \     'type': 'W'
37   \   },
38   \   {
39   \     'lnum': 3,
40   \     'col': 6,
41   \     'code': 'oas3-schema',
42   \     'text': '`info` property should have required property `version`.',
43   \     'type': 'E'
44   \   },
45   \ ],
46   \ ale#handlers#spectral#HandleSpectralOutput(bufnr(''), [
47   \   'openapi.yml:1:1 warning oas3-api-servers "OpenAPI `servers` must be present and non-empty array."',
48   \   'openapi.yml:1:1 error oas3-schema "Object should have required property `paths`."',
49   \   'openapi.yml:1:1 warning openapi-tags "OpenAPI object should have non-empty `tags` array."',
50   \   'openapi.yml:3:6 warning info-contact "Info object should contain `contact` object."',
51   \   'openapi.yml:3:6 error oas3-schema "`info` property should have required property `version`."',
52   \ ])