0

I can enable python-pylint for a opened Python file doing:

M-x flycheck-select-checker and enter python-pylint

It think it says C-c ! s to enable it on all Python files.(the message hides itself so I couldn't read it).


=> Is it possible to do this in .emacs for all the Python files by default?

My setup:

(require 'flycheck)
(require 'flycheck-mypy)

(add-hook 'python-mode-hook 'flycheck-mode) ;(add-hook 'after-init-hook #'global-flycheck-mode)
(add-hook 'python-mode-hook
          (lambda ()
            (setq flycheck-python-pylint-executable "~/venv/bin/pylint")
            (setq flycheck-pylintrc "~/.pylintrc")))

1 Answer 1

0

Adding following line solved my problem: (flycheck-add-next-checker 'python-flake8 'python-pylint)

defun flycheck-add-next-checker checker next & optional append Set next to run after checker. Both arguments are syntax checker symbols.

link: https://www.flycheck.org/en/latest/user/syntax-checkers.html (on bottom of the page).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.