This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A wrapper for various code/markup syntax checking tools.

Project Description

A simple application for syntax-checking python files. pyflakes is used for error-checking and pep8 is used for style checking (produces warnings).

Improvments Over Stock PyFlakes/pep8 With Flymake Mode

  • pyflakes warnings are now shown as flymake warnings (not the case with standard flymake/pyflakes integration)
  • integrates both pyflakes and pep8 in one command

Latest Working Versions

  • Python 2.7.3
  • pyflakes 0.5.0
  • pep8 1.3.3

Note: As long as the api’s of neither pyflakes or pep8 changes, future versions should work.

Example .emacs Setup

(require 'flymake)

(custom-set-variables
 '(flymake-allowed-file-name-masks
   (quote (("\\.c\\'" flymake-simple-make-init)
           ("\\.cpp\\'" flymake-simple-make-init)
           ("\\.xml\\'" flymake-xml-init)
           ("\\.html?\\'" flymake-xml-init)
           ("\\.cs\\'" flymake-simple-make-init)
           ("\\.p[ml]\\'" flymake-perl-init)
           ("\\.php[345]?\\'" flymake-php-init)
           ("\\.h\\'" flymake-master-make-header-init flymake-master-cleanup)
           ("\\.java\\'" flymake-simple-make-java-init flymake-simple-java-cleanup)
           ("[0-9]+\\.tex\\'" flymake-master-tex-init flymake-master-cleanup)
           ("\\.tex\\'" flymake-simple-tex-init)
           ("\\.idl\\'" flymake-simple-make-init)
           ("\\.py\\'" flymake-zencheck-init)))))

(defun flymake-zencheck-init ()
  (let* ((temp-file (flymake-init-create-temp-buffer-copy
                     'flymake-create-temp-inplace))
         (local-file (file-relative-name
                      temp-file
                      (file-name-directory buffer-file-name))))
    (list "zencheck" (list local-file))))

(add-hook 'find-file-hook 'flymake-find-file-hook)

(defun flymake-init-vars-hook ()
  (setq flymake-err-line-patterns
        (cons
         (quote ("^\\(.*?\\):\\([0-9]+\\):\\([0-9]+\\):\\(.*\\)" 1 2 3 4))
         flymake-err-line-patterns)))

(add-hook 'find-file-hook 'flymake-init-vars-hook)

Credits

  • Rocky Burt (rocky AT serverzen DOT com) - maintainer
Release History

Release History

This version
History Node

1.1

History Node

1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ZenCheck-1.1.tar.gz (3.8 kB) Copy SHA256 Checksum SHA256 Source Nov 22, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting