Skip to content

Commit

Permalink
Add wiki link to ShellCheck linting
Browse files Browse the repository at this point in the history
The ShellCheck integrations wiki suggests providing users with more
info by linking back to the ShellCheck wiki.

https://www.shellcheck.net/wiki/Integration#linking-to-the-wiki
  • Loading branch information
blmaier committed Dec 15, 2023
1 parent 9a23ec1 commit df63292
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions autoload/ale/handlers/shellcheck.vim
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ function! ale#handlers#shellcheck#Handle(buffer, lines) abort
\ 'type': l:type,
\ 'text': l:match[5],
\ 'code': l:match[6],
\ 'detail': l:match[5] . "\n\nFor more information:\n https://www.shellcheck.net/wiki/" . l:match[6],
\}

if !empty(l:match[3])
Expand Down
3 changes: 3 additions & 0 deletions test/handler/test_shellcheck_handler.vader
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ Execute(The shellcheck handler should handle basic errors or warnings):
\ 'type': 'W',
\ 'text': 'In POSIX sh, ''let'' is not supported.',
\ 'code': 'SC2039',
\ 'detail': 'In POSIX sh, ''let'' is not supported.' . "\n\nFor more information:\n https://www.shellcheck.net/wiki/" . 'SC2039',
\ },
\ {
\ 'lnum': 2,
\ 'col': 3,
\ 'type': 'E',
\ 'text': 'Don''t put spaces around the = in assignments.',
\ 'code': 'SC1068',
\ 'detail': 'Don''t put spaces around the = in assignments.' . "\n\nFor more information:\n https://www.shellcheck.net/wiki/" . 'SC1068',
\ },
\ ],
\ ale#handlers#shellcheck#Handle(bufnr(''), [
Expand All @@ -36,6 +38,7 @@ Execute(The shellcheck handler should handle notes):
\ 'type': 'I',
\ 'text': 'Double quote to prevent globbing and word splitting.',
\ 'code': 'SC2086',
\ 'detail': 'Double quote to prevent globbing and word splitting.' . "\n\nFor more information:\n https://www.shellcheck.net/wiki/" . 'SC2086',
\ },
\ ],
\ ale#handlers#shellcheck#Handle(bufnr(''), [
Expand Down

0 comments on commit df63292

Please sign in to comment.