diff --git a/ale_linters/terraform/tflint.vim b/ale_linters/terraform/tflint.vim index 894be22d..93966ff3 100644 --- a/ale_linters/terraform/tflint.vim +++ b/ale_linters/terraform/tflint.vim @@ -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 diff --git a/test/handler/test_tflint_handler.vader b/test/handler/test_tflint_handler.vader index 95671b8a..099d0926 100644 --- a/test/handler/test_tflint_handler.vader +++ b/test/handler/test_tflint_handler.vader @@ -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', \ }, \ ],