LoginSignup
11
13

More than 5 years have passed since last update.

Flycheck を Python で使うためにしたことメモ

Posted at

驚くほど設定は簡単です.

環境

  • Mac OS X 10.8.5
  • Emacs 24.3
    • el-get
    • Flycheck 0.20
  • Python 3.3

Emacs の設定

el-get を使っているのなら,

(el-get 'sync 'flycheck)
(require 'python)

(defun tnoda/turn-on-flycheck-mode ()
  (flycheck-mode 1))
(add-hook 'python-mode-hook 'tnoda/turn-on-flycheck-mode)

だけです.

チェッカーのインストール

Flycheck 0.20 では Python のチェックに

  • flake8
  • Pylint

の 2 つを使うことができます.使いたいものだけインストールすれば,あとは flycheck さんが PATH から勝手に見つけて使ってくれますので,インストール以外の設定は不要です.

$ pip install flake8
$ pip install pylint

おわりに

Python で Flymake を使えるようにしてみました.チェッカに PATH が通っていれば,flycheck が勝手に探して使ってくれるので,ほとんど設定するところはありません.

11
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
13