#852 - Capture error codes for tflint

This commit is contained in:
w0rp 2017-11-19 13:37:56 +00:00
parent fa7f0e2b85
commit 62904d39ee
2 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,7 @@ function! ale_linters#terraform#tflint#Handle(buffer, lines) abort
\ 'lnum': l:error.line,
\ 'text': l:error.message,
\ 'type': l:type,
\ 'code': l:error.detector,
\})
endfor

View File

@ -10,16 +10,19 @@ Execute(The tflint handler should parse items correctly):
\ {
\ 'lnum': 12,
\ 'text': 'be warned, traveller',
\ 'code': 'aws_db_instance_readable_password',
\ 'type': 'W',
\ },
\ {
\ 'lnum': 9,
\ 'text': 'error message',
\ 'code': 'aws_elasticache_cluster_invalid_type',
\ 'type': 'E',
\ },
\ {
\ 'lnum': 5,
\ 'text': 'just so ya know',
\ 'code': 'aws_instance_not_specified_iam_profile',
\ 'type': 'I',
\ },
\ ],