2022-10-28 10:02:25 +00:00
|
|
|
require('lint').linters_by_ft = {
|
2022-11-02 13:43:49 +00:00
|
|
|
python = { 'flake8', 'pylint', 'pycodestyle', 'pydocstyle' },
|
2022-11-02 10:53:05 +00:00
|
|
|
php = { 'phpcs' },
|
|
|
|
markdown = { 'markdownlint' }
|
|
|
|
}
|
|
|
|
|
2022-11-02 12:04:31 +00:00
|
|
|
local pydocstyle = require('lint.linters.pydocstyle')
|
|
|
|
pydocstyle.args = {
|
2022-11-02 13:43:49 +00:00
|
|
|
'--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
|
2022-11-02 12:04:31 +00:00
|
|
|
}
|
2022-11-02 10:53:05 +00:00
|
|
|
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-10-28 18:55:05 +00:00
|
|
|
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
2022-11-02 10:53:05 +00:00
|
|
|
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
|
|
|
})
|