summaryrefslogtreecommitdiff
path: root/test/test_dockerfile_hadolint_linter.vader
diff options
context:
space:
mode:
authorMoritz Röhrich <moritz@ildefons.de>2021-07-05 14:54:03 +0200
committerGitHub <noreply@github.com>2021-07-05 21:54:03 +0900
commit958f30c1635ffc7cd47b929b382a791a9d0db37b (patch)
tree59071b344db866dff9e86eaa2ac3510327bac4f2 /test/test_dockerfile_hadolint_linter.vader
parentaf13c350d2499aaa42f77ad8cfc070e97df06dd2 (diff)
downloadale-958f30c1635ffc7cd47b929b382a791a9d0db37b.zip
hadolint: multiple fixes and adapt expected format (#3678)
- Show hadolint rule number in vim gutter in addition to `ALEDetails` - Capture and show error in case of syntax errors - Add tests for error capture - Adapt existing tests fixes: #2333 fixes: #958
Diffstat (limited to 'test/test_dockerfile_hadolint_linter.vader')
-rw-r--r--test/test_dockerfile_hadolint_linter.vader10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_dockerfile_hadolint_linter.vader b/test/test_dockerfile_hadolint_linter.vader
index c568f61f..072cc524 100644
--- a/test/test_dockerfile_hadolint_linter.vader
+++ b/test/test_dockerfile_hadolint_linter.vader
@@ -68,21 +68,21 @@ Execute(command is correct when not docker):
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"}],
+ \ [{'lnum': 10, 'col': 0, 'type': 'W', 'text': 'DL3007: 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 warning: Using latest is prone to errors',
+ \ '-:10 DL3007 warning: 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."}],
+ \ [{'lnum': 3, 'col': 0, 'type': 'W', 'text': 'SC2154: 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 warning: bar is referenced but not assigned.',
+ \ '-:3 SC2154 warning: 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'''}],
+ \ [{'lnum': 3, 'col': 4, 'type': 'E', 'text': 'unexpected "A" expecting at least one space after ''RUN''', 'detail': 'hadolint could not parse the file because of a syntax error.'}],
\ ale_linters#dockerfile#hadolint#Handle(bufnr(''), [
\ "/dev/stdin:3:4 unexpected \"A\" expecting at least one space after 'RUN'",
\ ])