]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/handler/test_tflint_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 '294584081929424aec883f90c7d6515b3743358d' as '.vim/bundle/vim-lsp-ale'
[etc/vim.git] / .vim / bundle / ale / test / handler / test_tflint_handler.vader
1 Before:
2   runtime! ale_linters/terraform/tflint.vim
3
4 After:
5   call ale#linter#Reset()
6
7 Execute(The tflint handler should parse items correctly):
8   AssertEqual
9   \ [
10   \   {
11   \     'filename': 'github.com/wata727/example-module/aws_instance.tf',
12   \     'lnum': 1,
13   \     'col': 30,
14   \     'end_lnum': 2,
15   \     'end_col': 1,
16   \     'text': 'A block definition must have block content delimited by "{" and "}", starting on the same line as the block header.',
17   \     'code': 'Invalid block definition',
18   \     'type': 'E',
19   \   },
20   \   {
21   \     'filename': 'github.com/wata727/example-module/aws_instance.tf',
22   \     'lnum': 2,
23   \     'col': 3,
24   \     'end_lnum': 2,
25   \     'end_col': 6,
26   \     'text': 'An argument named "ami" is not expected here.',
27   \     'code': 'Unsupported argument',
28   \     'type': 'E',
29   \   },
30   \   {
31   \     'filename': 'github.com/wata727/example-module/aws_instance.tf',
32   \     'lnum': 3,
33   \     'col': 3,
34   \     'end_lnum': 1,
35   \     'end_col': 6,
36   \     'text': 'An argument named "instance_type" is not expected here.',
37   \     'code': 'Unsupported argument',
38   \     'type': 'E',
39   \   },
40   \   {
41   \     'filename': 'github.com/wata727/example-module/aws_db_instance.tf',
42   \     'lnum': 12,
43   \     'col': 11,
44   \     'end_lnum': 12,
45   \     'end_col': 21,
46   \     'text': 'be warned, traveller',
47   \     'code': 'aws_db_instance_readable_password',
48   \     'type': 'W',
49   \   },
50   \   {
51   \     'filename': 'github.com/wata727/example-module/aws_elasticache_cluster.tf',
52   \     'lnum': 9,
53   \     'col': 29,
54   \     'end_lnum': 9,
55   \     'end_col': 29,
56   \     'text': 'error message',
57   \     'code': 'aws_elasticache_cluster_invalid_type',
58   \     'type': 'E',
59   \   },
60   \   {
61   \     'filename': 'github.com/wata727/example-module/aws_instance.tf',
62   \     'lnum': 5,
63   \     'col': 15,
64   \     'end_lnum': 5,
65   \     'end_col': 25,
66   \     'text': 'just so ya know',
67   \     'code': 'aws_instance_not_specified_iam_profile',
68   \     'type': 'I',
69   \   },
70   \ ],
71   \ ale_linters#terraform#tflint#Handle(123, [
72   \ '{"issues":[{"rule":{"name":"aws_db_instance_readable_password","severity":"WARNING","link":"https://github.com/wata727/tflint/blob/master/docs/aws_db_instance_readable_password.md"},"message":"be warned, traveller","range":{"filename":"github.com/wata727/example-module/aws_db_instance.tf","start":{"line":12,"column":11},"end":{"line":12,"column":21},"callers":[]}},{"rule":{"name":"aws_elasticache_cluster_invalid_type","severity":"ERROR","link":"https://github.com/wata727/tflint/blob/master/docs/aws_elasticache_cluster_invalid_type.md"},"message":"error message","range":{"filename":"github.com/wata727/example-module/aws_elasticache_cluster.tf","start":{"line":9,"column":29},"end":{"line":9,"column":29},"callers":[]}},{"rule":{"name":"aws_instance_not_specified_iam_profile","severity":"NOTICE","link":"https://github.com/wata727/tflint/blob/master/docs/aws_instance_not_specified_iam_profile.md"},"message":"just so ya know","range":{"filename":"github.com/wata727/example-module/aws_instance.tf","start":{"line":5,"column":15},"end":{"line":5,"column":25},"callers":[]}}],"errors":[{"message":"github.com/wata727/example-module/aws_instance.tf:1,30-2,1: Invalid block definition; A block definition must have block content delimited by \"{\" and \"}\", starting on the same line as the block header."},{"message":"github.com/wata727/example-module/aws_instance.tf:2,3-6: Unsupported argument; An argument named \"ami\" is not expected here."},{"message":"github.com/wata727/example-module/aws_instance.tf:3,3-16: Unsupported argument; An argument named \"instance_type\" is not expected here."}]}'
73   \ ])