1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-14 05:58:00 +08:00
SpaceVim/bundle/neomake/tests/ft_dockerfile.vader
2025-02-03 16:36:38 +08:00

26 lines
1.1 KiB
Plaintext
Vendored

Include: include/setup.vader
Execute (dockerfile: hadolint):
let maker = NeomakeTestsGetMakerWithOutput(neomake#makers#ft#dockerfile#hadolint(), [
\ 'Dockerfile:1 DL3018 warning: Pin versions in apk add. …',
\ 'Dockerfile:2 DL3059 info: Multiple consecutive `RUN` instructions. …',
\ 'Dockerfile:3 SC2086 info: Double quote to prevent globbing and word splitting.',
\ 'Dockerfile:45 DL123 error: invented.',
\ ])
let maker.name = 'hadolint'
new
let bufnr = bufnr('%')
file Dockerfile
CallNeomake 1, [maker]
AssertEqualQf [getloclist(0)][0], [
\ {'lnum': 1, 'bufnr': bufnr, 'nr': 3018, 'type': 'W', 'col': 0,
\ 'text': 'DL3018: Pin versions in apk add. …'},
\ {'lnum': 2, 'bufnr': bufnr, 'nr': 3059, 'type': 'I', 'col': 0,
\ 'text': 'DL3059: Multiple consecutive `RUN` instructions. …'},
\ {'lnum': 3, 'bufnr': bufnr, 'nr': 2086, 'type': 'I', 'col': 0,
\ 'text': 'SC2086: Double quote to prevent globbing and word splitting.'},
\ {'lnum': 45, 'bufnr': bufnr, 'nr': 123, 'type': 'e', 'col': 0,
\ 'text': 'DL123 error: invented.'},
\ ]
bwipe