Open Fresheyeball opened 9 years ago
Hi,
Reading http://www.sublimelinter.com/en/latest/creating_a_linter.html it looks like it could be made to work. We'd probably need to
Where is the regex in purescript.el
I'm not seeing it. Also why pass the paths twice? And what do you mean by temporary file?
The regex is defined using the rx macro syntax in this part of the file. (Sorry about that) It captures file-name
, line
, column
and message
I took that from flycheck's haskell error parser and modified it a little for purescript. I think that the equivalent regex string in python would be
r'^(?:Error at |")(?P<filename>[^"]+)\"? \(?line (?P<line>\d+), column (?P<column>\d+)\)?:\s*\n(?P<message>\s*.+(?:\n *.+)*)$'
purscheck accepts two arguments:
purscheck takes the content of the temporary file, but uses the actual file to find .purescript-paths
- that way it can run on unsaved buffers
When you say it takes the arguments, the temporary file and the actual file. Do you mean the files themselves (some kind of file object), or the file paths (strings)?
File paths, because thats what flycheck provides. Although I suppose it wouldn't be too hard to add stdin support for the editor buffer.
I tried emacs specifically for purscheck, but just can't abandon my beloved sublime text. Do you have any idea what it would take to make it work?