From f54fbcf793cb78f2bb5d423e4b145631ba1fd134 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 25 Feb 2022 13:13:53 +0100 Subject: [PATCH] home: vim: show error codes from 'shellcheck' --- home/vim/after/ftplugin/bash.vim | 2 ++ home/vim/after/ftplugin/sh.vim | 2 ++ home/vim/after/ftplugin/zsh.vim | 2 ++ 3 files changed, 6 insertions(+) diff --git a/home/vim/after/ftplugin/bash.vim b/home/vim/after/ftplugin/bash.vim index 8799799..03f3f9f 100644 --- a/home/vim/after/ftplugin/bash.vim +++ b/home/vim/after/ftplugin/bash.vim @@ -6,6 +6,8 @@ lua << EOF local null_ls = require("null-ls") null_ls.register({ null_ls.builtins.diagnostics.shellcheck.with({ + -- Show error code in message + diagnostics_format = "[#{c}] #{m}", -- Require explicit empty string test, use bash dialect extra_args = { "-s", "bash", "-o", "avoid-nullary-conditions" }, }), diff --git a/home/vim/after/ftplugin/sh.vim b/home/vim/after/ftplugin/sh.vim index 8d1594b..f80f25a 100644 --- a/home/vim/after/ftplugin/sh.vim +++ b/home/vim/after/ftplugin/sh.vim @@ -6,6 +6,8 @@ lua << EOF local null_ls = require("null-ls") null_ls.register({ null_ls.builtins.diagnostics.shellcheck.with({ + -- Show error code in message + diagnostics_format = "[#{c}] #{m}", -- Require explicit empty string test extra_args = { "-o", "avoid-nullary-conditions" }, }), diff --git a/home/vim/after/ftplugin/zsh.vim b/home/vim/after/ftplugin/zsh.vim index 8799799..03f3f9f 100644 --- a/home/vim/after/ftplugin/zsh.vim +++ b/home/vim/after/ftplugin/zsh.vim @@ -6,6 +6,8 @@ lua << EOF local null_ls = require("null-ls") null_ls.register({ null_ls.builtins.diagnostics.shellcheck.with({ + -- Show error code in message + diagnostics_format = "[#{c}] #{m}", -- Require explicit empty string test, use bash dialect extra_args = { "-s", "bash", "-o", "avoid-nullary-conditions" }, }),