Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made `flymake-phpcs-standard' safe-local-variable #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.mkdn
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion flymake-phpcs.el
Original file line number Diff line number Diff line change
@@ -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 <libflymake-phpcs-emacs BLAHBLAH illusori.co.uk>
;; Maintainer: Sam Graham <libflymake-phpcs-emacs BLAHBLAH illusori.co.uk>
Expand Down Expand Up @@ -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
Expand Down