Skip to content

Commit ff8fe94

Browse files
Remove hadolint rule code from location list entry text (dense-analysis#4939)
The code is already passed with the code key of location list entry. Before this change, when using the default message format, it appeared twice in the description of each location list entry and twice in each echo message.
1 parent 6433d31 commit ff8fe94

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ale_linters/dockerfile/hadolint.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ function! ale_linters#dockerfile#hadolint#Handle(buffer, lines) abort
4949
if l:match[5] isnot# ''
5050
let l:code = l:match[4] . l:match[5]
5151
let l:link = ' ( ' . l:domain . l:code . ' )'
52-
let l:text = l:code . ': ' . l:detail
5352
let l:detail = l:code . l:link . "\n\n" . l:detail
5453
else
5554
let l:type = 'E'

test/handler/test_hadolint.vader

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ Execute(The hadolint handler should handle a normal example):
1717
\ 'col': 0,
1818
\ 'type': 'W',
1919
\ 'code': 'DL3006',
20-
\ 'text': "DL3006: Always tag the version of an image explicitly",
20+
\ 'text': 'Always tag the version of an image explicitly',
2121
\ 'detail': "DL3006 ( https://github.com/hadolint/hadolint/wiki/DL3006 )\n\nAlways tag the version of an image explicitly",
2222
\ },
2323
\ {
2424
\ 'lnum': 4,
2525
\ 'col': 0,
2626
\ 'type': 'W',
2727
\ 'code': 'DL3033',
28-
\ 'text': "DL3033: Specify version with `yum install -y <package>-<version>`.",
28+
\ 'text': 'Specify version with `yum install -y <package>-<version>`.',
2929
\ 'detail': "DL3033 ( https://github.com/hadolint/hadolint/wiki/DL3033 )\n\nSpecify version with `yum install -y <package>-<version>`.",
3030
\ },
3131
\ {
3232
\ 'lnum': 12,
3333
\ 'col': 0,
3434
\ 'type': 'W',
3535
\ 'code': 'SC2039',
36-
\ 'text': "SC2039: In POSIX sh, brace expansion is undefined.",
36+
\ 'text': 'In POSIX sh, brace expansion is undefined.',
3737
\ 'detail': "SC2039 ( https://github.com/koalaman/shellcheck/wiki/SC2039 )\n\nIn POSIX sh, brace expansion is undefined.",
3838
\ },
3939
\ ],

0 commit comments

Comments
 (0)