feat: enable gitleaks linter
This commit is contained in:
parent
dabb828b38
commit
a02689e635
1 changed files with 12 additions and 2 deletions
|
|
@ -17,6 +17,14 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
gitleaks = {
|
||||||
|
args = {
|
||||||
|
"--stdin",
|
||||||
|
function()
|
||||||
|
return vim.api.nvim_buf_get_name(0)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
|
@ -42,12 +50,14 @@ return {
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufReadPost", "BufWritePost", "InsertLeave" }, {
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufReadPost", "BufWritePost", "InsertLeave" }, {
|
||||||
group = lint_augroup,
|
group = lint_augroup,
|
||||||
callback = function()
|
callback = function()
|
||||||
lint.try_lint()
|
lint.try_lint() -- linters_by_ft
|
||||||
|
lint.try_lint("gitleaks") -- on all ft
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>l", function()
|
vim.keymap.set("n", "<leader>l", function()
|
||||||
lint.try_lint()
|
lint.try_lint() -- linters_by_ft
|
||||||
|
lint.try_lint("gitleaks") -- on all ft
|
||||||
end, { desc = "Lint current file" })
|
end, { desc = "Lint current file" })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue