{"action":"created","issue":{"url":"https://api.github.com/repos/flycheck/flycheck/issues/638","labels_url":"https://api.github.com/repos/flycheck/flycheck/issues/638/labels{/name}","comments_url":"https://api.github.com/repos/flycheck/flycheck/issues/638/comments","events_url":"https://api.github.com/repos/flycheck/flycheck/issues/638/events","html_url":"https://github.com/flycheck/flycheck/issues/638","id":72995594,"number":638,"title":"Support possibility to enable arbitrary language extensions for HLint ","user":{"login":"geraldus","id":744471,"avatar_url":"https://avatars.githubusercontent.com/u/744471?v=3","gravatar_id":"","url":"https://api.github.com/users/geraldus","html_url":"https://github.com/geraldus","followers_url":"https://api.github.com/users/geraldus/followers","following_url":"https://api.github.com/users/geraldus/following{/other_user}","gists_url":"https://api.github.com/users/geraldus/gists{/gist_id}","starred_url":"https://api.github.com/users/geraldus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geraldus/subscriptions","organizations_url":"https://api.github.com/users/geraldus/orgs","repos_url":"https://api.github.com/users/geraldus/repos","events_url":"https://api.github.com/users/geraldus/events{/privacy}","received_events_url":"https://api.github.com/users/geraldus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/flycheck/flycheck/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"lunaryorn","id":224922,"avatar_url":"https://avatars.githubusercontent.com/u/224922?v=3","gravatar_id":"","url":"https://api.github.com/users/lunaryorn","html_url":"https://github.com/lunaryorn","followers_url":"https://api.github.com/users/lunaryorn/followers","following_url":"https://api.github.com/users/lunaryorn/following{/other_user}","gists_url":"https://api.github.com/users/lunaryorn/gists{/gist_id}","starred_url":"https://api.github.com/users/lunaryorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunaryorn/subscriptions","organizations_url":"https://api.github.com/users/lunaryorn/orgs","repos_url":"https://api.github.com/users/lunaryorn/repos","events_url":"https://api.github.com/users/lunaryorn/events{/privacy}","received_events_url":"https://api.github.com/users/lunaryorn/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/flycheck/flycheck/milestones/3","html_url":"https://github.com/flycheck/flycheck/milestones/0.24","labels_url":"https://api.github.com/repos/flycheck/flycheck/milestones/3/labels","id":1054335,"number":3,"title":"0.24","description":"Things that should probably go into the next release.","creator":{"login":"lunaryorn","id":224922,"avatar_url":"https://avatars.githubusercontent.com/u/224922?v=3","gravatar_id":"","url":"https://api.github.com/users/lunaryorn","html_url":"https://github.com/lunaryorn","followers_url":"https://api.github.com/users/lunaryorn/followers","following_url":"https://api.github.com/users/lunaryorn/following{/other_user}","gists_url":"https://api.github.com/users/lunaryorn/gists{/gist_id}","starred_url":"https://api.github.com/users/lunaryorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunaryorn/subscriptions","organizations_url":"https://api.github.com/users/lunaryorn/orgs","repos_url":"https://api.github.com/users/lunaryorn/repos","events_url":"https://api.github.com/users/lunaryorn/events{/privacy}","received_events_url":"https://api.github.com/users/lunaryorn/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":8,"state":"open","created_at":"2015-04-06T12:23:05Z","updated_at":"2015-07-05T11:08:14Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-05-04T11:26:07Z","updated_at":"2015-07-06T21:49:40Z","closed_at":null,"body":"HLint does not enables `TemplateHaskell` and `QuasiQuotes` language extensions, so if you have quasi quotes in your code HLint fails with parse error. The only way to enable mentioned extensions is to create auxiliary script like following\r\n\r\n```sh\r\n#!bin/sh\r\nhlint -XQuasiQuotes -XTemplateHaskell -hGeneralise -hDefault -hDollar \"$@\"\r\n```\r\n\r\nflag it as executable and set it as FlyCheck HLint Executable. Though it works as expected it would be nice to have an option to configure list of additional extensions inside Emacs.\r\n\r\nP.S. Maybe there is some way to configure extension used by HLint per project like hint files (e.g. HLint.hs is project root), but I was not able to figure out that."},"comment":{"url":"https://api.github.com/repos/flycheck/flycheck/issues/comments/119006936","html_url":"https://github.com/flycheck/flycheck/issues/638#issuecomment-119006936","issue_url":"https://api.github.com/repos/flycheck/flycheck/issues/638","id":119006936,"user":{"login":"vlatkoB","id":2315313,"avatar_url":"https://avatars.githubusercontent.com/u/2315313?v=3","gravatar_id":"","url":"https://api.github.com/users/vlatkoB","html_url":"https://github.com/vlatkoB","followers_url":"https://api.github.com/users/vlatkoB/followers","following_url":"https://api.github.com/users/vlatkoB/following{/other_user}","gists_url":"https://api.github.com/users/vlatkoB/gists{/gist_id}","starred_url":"https://api.github.com/users/vlatkoB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlatkoB/subscriptions","organizations_url":"https://api.github.com/users/vlatkoB/orgs","repos_url":"https://api.github.com/users/vlatkoB/repos","events_url":"https://api.github.com/users/vlatkoB/events{/privacy}","received_events_url":"https://api.github.com/users/vlatkoB/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T21:49:39Z","updated_at":"2015-07-06T21:49:39Z","body":"@geraldus Think extensions can't be specified by `HLint.hs`. \r\nI made some simple code that seems to work correctly. It allows customizing any `hlint` arg, so maybe it might be possible to specify options locally via `projectile` or `.dir-locals.el`.\r\n```\r\n(flycheck-def-option-var flycheck-hlint-options\r\n    '(\"-XQuasiQuotes\" \"-XTemplateHaskell\") haskell-hlint\r\n  \"A list of additional hlint options.\r\n\r\nThe value of this variable is a list of strings, where each\r\nstring is full hlint option, with its switch.\r\n\r\nRefer to http://community.haskell.org/~ndm/darcs/hlint/hlint.htm for\r\nmore information.\"\r\n  :type '(repeat :tag \"Options\" (string :tag \"Option\"))\r\n  :safe #'flycheck-string-list-p\r\n  :package-version '(flycheck . \"0.20\"))\r\n\r\n(flycheck-define-checker haskell-hlint\r\n  \"A Haskell style checker using hlint.\r\n\r\nSee URL `https://github.com/ndmitchell/hlint'.\"\r\n  :command (\"hlint\"\r\n            (config-file \"-h\" flycheck-hlintrc)\r\n            (option-list \"\" flycheck-hlint-options concat)\r\n            source-inplace)\r\n  :error-patterns\r\n  ((warning line-start\r\n            (file-name) \":\" line \":\" column\r\n            \": Warning: \"\r\n            (message (one-or-more not-newline)\r\n                     (one-or-more \"\\n\" (one-or-more not-newline)))\r\n            line-end)\r\n   (error line-start\r\n          (file-name) \":\" line \":\" column\r\n          \": Error: \"\r\n          (message (one-or-more not-newline)\r\n                   (one-or-more \"\\n\" (one-or-more not-newline)))\r\n          line-end))\r\n  :modes (haskell-mode literate-haskell-mode))\r\n```\r\nThis is just a draft, but you can try it by yourself.\r\n\r\n @lunaryorn Would something like this be acceptable?\r\n"}}