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.
2 " Load the file which defines the linter.
3 runtime ale_linters/terraform/terraform.vim
4 call ale#test#SetDirectory('/testplugin/test/test-files/terraform')
5 call ale#test#SetFilename('providers.tf')
8 " Unload all linters again.
9 call ale#linter#Reset()
10 call ale#test#RestoreDirectory()
12 Execute(The output should be correct):
18 \ 'filename': ale#path#Simplify(g:dir . '/providers.tf'),
20 \ 'text': 'Terraform 0.13 and earlier allowed provider version',
25 \ 'filename': ale#path#Simplify(g:dir . '/providers.tf'),
27 \ 'text': 'Plugin reinitialization required. Please run "terraform"',
30 \ ale_linters#terraform#terraform#Handle(bufnr(''), [
33 \ '"error_count": 1,',
34 \ '"warning_count": 1,',
37 \ ' "severity": "warning",',
38 \ ' "summary": "Version constraints inside provider configuration blocks are deprecated",',
39 \ ' "detail": "Terraform 0.13 and earlier allowed provider version",',
41 \ ' "filename": "providers.tf",',
55 \ ' "severity": "error",',
56 \ ' "summary": "Could not load plugin",',
57 \ ' "detail": "Plugin reinitialization required. Please run \"terraform\""',
63 Execute(Should use summary if detail not available):
69 \ 'filename': ale#path#Simplify(g:dir . '/main.tf'),
71 \ 'text': 'storage_os_disk: required field is not set',
74 \ ale_linters#terraform#terraform#Handle(bufnr(''), [
77 \ ' "error_count": 1,',
78 \ ' "warning_count": 0,',
79 \ ' "diagnostics": [',
81 \ ' "severity": "error",',
82 \ ' "summary": "storage_os_disk: required field is not set",',
84 \ ' "filename": "main.tf",',
101 Execute(Should use summary if detail available but empty):
107 \ 'filename': ale#path#Simplify(g:dir . '/main.tf'),
109 \ 'text': 'storage_os_disk: required field is not set',
112 \ ale_linters#terraform#terraform#Handle(bufnr(''), [
114 \ ' "valid": false,',
115 \ ' "error_count": 1,',
116 \ ' "warning_count": 0,',
117 \ ' "diagnostics": [',
119 \ ' "severity": "error",',
120 \ ' "summary": "storage_os_disk: required field is not set",',
123 \ ' "filename": "main.tf",',