diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-01-30 16:04:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-30 16:04:44 +0000 |
commit | 52fe924a139b8ae3d087cba0d9a5199054ae0595 (patch) | |
tree | 0c6510dfbd754c024608ab1b008d554825e4b2de /test | |
parent | c589e3d57d2a4d37445a4b97648c08e1b9741304 (diff) | |
parent | 4df87eaaddfceaddd625294c0e601aebf2f68a85 (diff) | |
download | ale-52fe924a139b8ae3d087cba0d9a5199054ae0595.zip |
Merge pull request #1308 from lorenzo/patch-1
Improving hadolint checker
Diffstat (limited to 'test')
-rw-r--r-- | test/test_dockerfile_hadolint_linter.vader | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/test/test_dockerfile_hadolint_linter.vader b/test/test_dockerfile_hadolint_linter.vader index 7262c5b0..3edbb2b6 100644 --- a/test/test_dockerfile_hadolint_linter.vader +++ b/test/test_dockerfile_hadolint_linter.vader @@ -55,7 +55,7 @@ Execute(command is correct when using docker): let b:ale_dockerfile_hadolint_use_docker = 'always' AssertEqual - \ "docker run --rm -i lukasmartinelli/hadolint", + \ "docker run --rm -i hadolint/hadolint", \ ale_linters#dockerfile#hadolint#GetCommand(bufnr('')) @@ -66,4 +66,25 @@ Execute(command is correct when not docker): \ "hadolint -", \ ale_linters#dockerfile#hadolint#GetCommand(bufnr('')) +Execute(test warnings from hadolint): + AssertEqual + \ [{'lnum': 10, 'col': 0, 'type': 'W', 'text': 'Using latest is prone to errors', 'detail': "DL3007 ( https://github.com/hadolint/hadolint/wiki/DL3007 )\n\nUsing latest is prone to errors"}], + \ ale_linters#dockerfile#hadolint#Handle(bufnr(''), [ + \ '/dev/stdin:10 DL3007 Using latest is prone to errors', + \ ]) + +Execute(test warnings from shellcheck): + AssertEqual + \ [{'lnum': 3, 'col': 0, 'type': 'W', 'text': 'bar is referenced but not assigned.', 'detail': "SC2154 ( https://github.com/koalaman/shellcheck/wiki/SC2154 )\n\nbar is referenced but not assigned."}], + \ ale_linters#dockerfile#hadolint#Handle(bufnr(''), [ + \ '/dev/stdin:3 SC2154 bar is referenced but not assigned.', + \ ]) + +Execute(test errors from dockerfile parser): + AssertEqual + \ [{'lnum': 3, 'col': 4, 'type': 'E', 'text': 'unexpected "A" expecting at least one space after ''RUN''', 'detail': 'unexpected "A" expecting at least one space after ''RUN'''}], + \ ale_linters#dockerfile#hadolint#Handle(bufnr(''), [ + \ "/dev/stdin:3:4 unexpected \"A\" expecting at least one space after 'RUN'", + \ ]) + " fin... |