home: vim: show error codes from 'shellcheck'

This commit is contained in:
Bruno BELANYI 2022-02-25 13:13:53 +01:00
parent 4b92a3fda9
commit f54fbcf793
3 changed files with 6 additions and 0 deletions

View file

@ -6,6 +6,8 @@ lua << EOF
local null_ls = require("null-ls") local null_ls = require("null-ls")
null_ls.register({ null_ls.register({
null_ls.builtins.diagnostics.shellcheck.with({ null_ls.builtins.diagnostics.shellcheck.with({
-- Show error code in message
diagnostics_format = "[#{c}] #{m}",
-- Require explicit empty string test, use bash dialect -- Require explicit empty string test, use bash dialect
extra_args = { "-s", "bash", "-o", "avoid-nullary-conditions" }, extra_args = { "-s", "bash", "-o", "avoid-nullary-conditions" },
}), }),

View file

@ -6,6 +6,8 @@ lua << EOF
local null_ls = require("null-ls") local null_ls = require("null-ls")
null_ls.register({ null_ls.register({
null_ls.builtins.diagnostics.shellcheck.with({ null_ls.builtins.diagnostics.shellcheck.with({
-- Show error code in message
diagnostics_format = "[#{c}] #{m}",
-- Require explicit empty string test -- Require explicit empty string test
extra_args = { "-o", "avoid-nullary-conditions" }, extra_args = { "-o", "avoid-nullary-conditions" },
}), }),

View file

@ -6,6 +6,8 @@ lua << EOF
local null_ls = require("null-ls") local null_ls = require("null-ls")
null_ls.register({ null_ls.register({
null_ls.builtins.diagnostics.shellcheck.with({ null_ls.builtins.diagnostics.shellcheck.with({
-- Show error code in message
diagnostics_format = "[#{c}] #{m}",
-- Require explicit empty string test, use bash dialect -- Require explicit empty string test, use bash dialect
extra_args = { "-s", "bash", "-o", "avoid-nullary-conditions" }, extra_args = { "-s", "bash", "-o", "avoid-nullary-conditions" },
}), }),