diff --git a/README.mkdn b/README.mkdn index 6809ec1..8e7f352 100644 --- a/README.mkdn +++ b/README.mkdn @@ -28,7 +28,7 @@ something like the following to your .emacs: (setq flymake-phpcs-command "~/projects/emacs-flymake-phpcs/bin/flymake_phpcs") ;; Customize the coding standard checked by phpcs -(setq flymake-phpcs-standard +(set-default 'flymake-phpcs-standard "~/projects/devtools/php_codesniffer/MyCompanyStandard") ;; Show the name of sniffs in warnings (eg show diff --git a/flymake-phpcs.el b/flymake-phpcs.el index f494b4f..ba1d6a5 100644 --- a/flymake-phpcs.el +++ b/flymake-phpcs.el @@ -1,6 +1,6 @@ ;;; flymake-phpcs.el --- Flymake handler for PHP to invoke PHP-CodeSniffer ;; -;; Copyright (C) 2011-2012 Free Software Foundation, Inc. +;; Copyright (C) 2011-2012, 2014 Free Software Foundation, Inc. ;; ;; Author: Sam Graham ;; Maintainer: Sam Graham @@ -42,6 +42,9 @@ (defcustom flymake-phpcs-standard "PEAR" "The coding standard to pass to phpcs via --standard." :group 'flymake-phpcs + :safe (lambda (value) + (and (string-or-null-p value) + (not (file-exists-p value)))) :type 'string) (defcustom flymake-phpcs-show-rule nil