flycheck-package-0.12/0000755000175000017500000000000013011445563014451 5ustar dogslegdogslegflycheck-package-0.12/flycheck-package.el0000644000175000017500000000510113011445563020151 0ustar dogslegdogsleg;;; flycheck-package.el --- A Flycheck checker for elisp package authors ;; Copyright (C) 2014-2016 Steve Purcell, Fanael Linithien ;; Author: Steve Purcell ;; Fanael Linithien ;; Keywords: lisp ;; Version: 0 ;; Package-Requires: ((flycheck "0.22") (package-lint "0.2")) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;;; Commentary: ;; Provides feedback via flycheck about issues with the package metadata ;; of a file, e.g. the package dependencies it requires. ;; To enable, use something like this: ;; (eval-after-load 'flycheck ;; '(flycheck-package-setup)) ;; Checks will currently be enabled only if a "Package-Requires:" or ;; "Package-Version:" header is present in the file. ;;; Code: (require 'flycheck) (require 'package-lint) (defun flycheck-package--start (checker callback) "Flycheck start function for CHECKER, invoking CALLBACK." (funcall callback 'finished (mapcar (lambda (x) (apply #'flycheck-error-new-at `(,@x :checker ,checker))) (condition-case err (when (package-lint-looks-like-a-package-p) (package-lint-buffer (current-buffer))) (error (funcall callback 'errored (error-message-string err)) (signal (car err) (cdr err))))))) ;;; Checker definition (flycheck-define-generic-checker 'emacs-lisp-package "A checker for \"Package-Requires\" headers and other packaging issues." :start #'flycheck-package--start :modes '(emacs-lisp-mode)) ;;;###autoload (defun flycheck-package-setup () "Setup flycheck-package. Add `flycheck-emacs-lisp-package' to `flycheck-checkers'." (interactive) (add-to-list 'flycheck-checkers 'emacs-lisp-package t) (flycheck-add-next-checker 'emacs-lisp 'emacs-lisp-package t) (flycheck-add-next-checker 'emacs-lisp-checkdoc 'emacs-lisp-package t)) (provide 'flycheck-package) ;;; flycheck-package.el ends here flycheck-package-0.12/README.md0000644000175000017500000000524413011445563015735 0ustar dogslegdogsleg[![Melpa Status](http://melpa.org/packages/flycheck-package-badge.svg)](http://melpa.org/#/flycheck-package) [![Melpa Stable Status](http://stable.melpa.org/packages/flycheck-package-badge.svg)](http://stable.melpa.org/#/flycheck-package) flycheck-package =============== This library provides a [flycheck][] checker for the metadata in Emacs Lisp files which are intended to be packages. The checks are performed by the separate [package-lint](https://github.com/purcell/package-lint) library. Currently these checks are only activated if a `Package-Requires` or `Package-Version` header is present in the file, and checks center on the validity of the data in that header. Installation ------------ You'll need Emacs 24 for `flycheck`, so the recommended way to get `flycheck-package` is as a package from the [MELPA][melpa] repository. The version of `flycheck-package` there will always be up-to-date. There are also packages in [MELPA Stable][melpa-stable], which track the [latest numbered tag][tags]. If you insist on doing things the hard way, first ensure `flycheck` and `package-lint` are installed, then download this code and add the directory to your Emacs `load-path`. Then, in your `init.el`: ```lisp (eval-after-load 'flycheck '(flycheck-package-setup)) ``` License ------- This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. See [COPYING](https://github.com/purcell/flycheck-package/blob/master/COPYING) for details. Credits ------- `flycheck-package` was written by [Steve Purcell](https://github.com/purcell) with significant contributions from [Fanael Linithien](https://github.com/Fanael).
Author links: [![](http://api.coderwall.com/purcell/endorsecount.png)](http://coderwall.com/purcell) [![](http://www.linkedin.com/img/webpromo/btn_liprofile_blue_80x15.png)](http://uk.linkedin.com/in/stevepurcell) [Steve Purcell's blog](http://www.sanityinc.com/) // [@sanityinc on Twitter](https://twitter.com/sanityinc) [flycheck]: https://github.com/flycheck/flycheck [tags]: https://github.com/purcell/flycheck-package/tags [ledger]: https://ledger-cli.org/ [melpa-stable]: http://stable.melpa.org [melpa]: http://melpa.org flycheck-package-0.12/.gitignore0000644000175000017500000000000613011445563016435 0ustar dogslegdogsleg*.elc