Joys and rants of a Python programmer | Pow! Wham, bam, kapow!

TAG | Python

Nov/09

27

Cyclomatic complexity in emacs

Seeing the Cyclomatic complexity in VIM video got me slightly envious. As I am a long time GNU Emacs user I have decided to get back at those VIM people. Emacs can do everything that VIM can, only better after all ;) So I present you pycomplexity — an Emacs mode that can do the same thing that vim-complexity does:
pieces of code highlighted according to cyclomatic complexity

pieces of code highlighted according to cyclomatic complexity

At the moment the mode is “Works on my machine” certified. But it’s open source, so contributions are welcome. Big thanks go to Markus Triska the author of the linum.el and Gary Bernhardt for writing the complexity code calculator. Oh as for the more part: emacs_complexity_2 Coming up next – documenting how to set up pyflakes-enabled flymake: emacs_complexity_3 Competition spurs innovation after all ;)
  • Digg
  • Reddit
  • Delicious
  • StumbleUpon
  • Share/Bookmark

,

Find it!

Theme Design by devolux.org