{"action":"created","issue":{"url":"https://api.github.com/repos/flycheck/flycheck/issues/594","labels_url":"https://api.github.com/repos/flycheck/flycheck/issues/594/labels{/name}","comments_url":"https://api.github.com/repos/flycheck/flycheck/issues/594/comments","events_url":"https://api.github.com/repos/flycheck/flycheck/issues/594/events","html_url":"https://github.com/flycheck/flycheck/issues/594","id":59016534,"number":594,"title":"invalid-function on :predicate","user":{"login":"nathankot","id":1400871,"avatar_url":"https://avatars.githubusercontent.com/u/1400871?v=3","gravatar_id":"","url":"https://api.github.com/users/nathankot","html_url":"https://github.com/nathankot","followers_url":"https://api.github.com/users/nathankot/followers","following_url":"https://api.github.com/users/nathankot/following{/other_user}","gists_url":"https://api.github.com/users/nathankot/gists{/gist_id}","starred_url":"https://api.github.com/users/nathankot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathankot/subscriptions","organizations_url":"https://api.github.com/users/nathankot/orgs","repos_url":"https://api.github.com/users/nathankot/repos","events_url":"https://api.github.com/users/nathankot/events{/privacy}","received_events_url":"https://api.github.com/users/nathankot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/flycheck/flycheck/labels/needs-input","name":"needs-input","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-26T04:23:53Z","updated_at":"2015-02-26T21:31:13Z","closed_at":null,"body":"Following [these guidelines](http://flycheck.readthedocs.org/en/latest/dev/extending.html#advanced-syntax-checker-definitions) I'm getting getting this error:\r\n\r\n![screen shot 2015-02-26 at 5 21 00 pm](https://cloud.githubusercontent.com/assets/1400871/6386321/dd7df9d0-bddb-11e4-9edc-fd3722ed3b03.png)\r\n\r\nWith this code:\r\n\r\n```elisp\r\n(flycheck-define-checker jsxhint\r\n  \"A JSX syntax and style checker based on JSXHint.\"\r\n  :command (\"jsxhint\" source)\r\n  :error-patterns ((error line-start (1+ nonl) \": line \" line \", col \" column \", \" (message) line-end))\r\n  :predicate (lambda ()\r\n               (and (executable-find \"jsxhint\")\r\n                    (buffer-file-name)\r\n                    (string-match \".*\\.jsx?$\" (buffer-file-name))))\r\n  :modes (web-mode))\r\n```\r\n\r\nEven when I swap `:predicate` out for the code on the docs I still get a similar error :disappointed: \r\n\r\nI'm using the latest flycheck from MELPA, wondering if I'm doing anything wrong?"},"comment":{"url":"https://api.github.com/repos/flycheck/flycheck/issues/comments/76277760","html_url":"https://github.com/flycheck/flycheck/issues/594#issuecomment-76277760","issue_url":"https://api.github.com/repos/flycheck/flycheck/issues/594","id":76277760,"user":{"login":"nathankot","id":1400871,"avatar_url":"https://avatars.githubusercontent.com/u/1400871?v=3","gravatar_id":"","url":"https://api.github.com/users/nathankot","html_url":"https://github.com/nathankot","followers_url":"https://api.github.com/users/nathankot/followers","following_url":"https://api.github.com/users/nathankot/following{/other_user}","gists_url":"https://api.github.com/users/nathankot/gists{/gist_id}","starred_url":"https://api.github.com/users/nathankot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathankot/subscriptions","organizations_url":"https://api.github.com/users/nathankot/orgs","repos_url":"https://api.github.com/users/nathankot/repos","events_url":"https://api.github.com/users/nathankot/events{/privacy}","received_events_url":"https://api.github.com/users/nathankot/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T21:31:13Z","updated_at":"2015-02-26T21:31:13Z","body":"@lunaryorn  so what I did was make a new minimal `init.el` file and everything worked with this:\r\n\r\n```elisp\r\n(toggle-debug-on-error)\r\n\r\n(require 'package)\r\n(add-to-list 'package-archives '(\"melpa\" . \"http://melpa.org/packages/\") t)\r\n(package-initialize)\r\n\r\n(require 'flycheck)\r\n\r\n(flycheck-define-checker jsxhint\r\n  \"A JSX syntax and style checker based on JSXHint.\"\r\n  :command (\"jsxhint\" source)\r\n  :error-patterns ((error line-start (1+ nonl) \": line \" line \", col \" column \", \" (message) line-end))\r\n  :predicate (lambda ()\r\n               (and (executable-find \"jsxhint\")\r\n                    (buffer-file-name)\r\n                    (string-match \".*\\.jsx?$\" (buffer-file-name))))\r\n  :modes (web-mode))\r\n\r\n(add-to-list 'flycheck-checkers 'jsxhint)\r\n(global-flycheck-mode)\r\n(provide 'init)\r\n```\r\n\r\nSo yep it must be something wrong with my config gonna start removing suspects and see if anything fixes it...\r\n\r\nOkay it seems like `use-package` is the culprit, simply nesting `flycheck-define-checker` inside `use-package` seems to break it, this fixes the error: https://github.com/nathankot/dotemacs/commit/6dc051be2831c62959795f738a946fc1402d414f\r\n\r\nBut feels naughty lol, I'll have to dig deeper later and see if I can get it working with use-package..."}}