2022-10-28 10:02:25 +00:00
|
|
|
require('lint').linters_by_ft = {
|
2022-11-16 14:28:23 +00:00
|
|
|
--python = {
|
2022-12-30 10:59:07 +00:00
|
|
|
--'ruff'
|
2022-11-16 14:28:23 +00:00
|
|
|
--'flake8',
|
|
|
|
--'pylint',
|
|
|
|
--'pycodestyle',
|
|
|
|
--'pydocstyle'
|
|
|
|
--},
|
2022-11-02 10:53:05 +00:00
|
|
|
php = { 'phpcs' },
|
|
|
|
markdown = { 'markdownlint' }
|
|
|
|
}
|
|
|
|
|
2022-11-16 14:28:23 +00:00
|
|
|
--local pydocstyle = require('lint.linters.pydocstyle')
|
|
|
|
--pydocstyle.args = {
|
|
|
|
--'--ignore=D100,D203,D213', -- disable missing module docstring info
|
|
|
|
---- disable one line before class docstring required
|
|
|
|
---- disable multiline docstring summary
|
|
|
|
---- should start at the second line
|
|
|
|
--}
|
|
|
|
--local pylint = require('lint.linters.pylint')
|
|
|
|
--pylint.args = {
|
|
|
|
--'-f',
|
|
|
|
--'json',
|
|
|
|
--'--disable=C0114', -- disable missing module docstring info
|
|
|
|
--}
|
2022-10-28 10:02:25 +00:00
|
|
|
|
2022-12-21 17:43:51 +00:00
|
|
|
--vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
|
|
|
--callback = function()
|
|
|
|
--require("lint").try_lint()
|
|
|
|
--end,
|
|
|
|
--})
|
2022-10-28 18:55:05 +00:00
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
2022-11-02 10:53:05 +00:00
|
|
|
callback = function()
|
|
|
|
require("lint").try_lint()
|
|
|
|
end,
|
2022-10-28 10:02:25 +00:00
|
|
|
})
|