Hi, I would like improve my build system to display the errors messages inline on the file, when user click in the error message in the results console, using Phantom API, as showed in the post: https://www.sublimetext.com/blog/articles/sublime-text-3-build-3124
But for now it is not working. It’s open a new file with name ‘C’ and display all error messages on it.
So, I almost sure that my error is my regex expressions for “file_regex” and “line_regex”.
Here is a example of the result message when I run the build command:
C:\Users\User\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Experts\TradeControl.mq5 : information: Checking 'TradeControl.mq5' C:\Users\User\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Experts\TradeControl.mq5(25,5) : error 256: 'abc' - undeclared identifier C:\Users\User\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Experts\TradeControl.mq5(27,4) : error 152: 'OrdersPrev' - some operator expected C:\Users\User\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Experts\TradeControl.mq5(88,16) : warning 43: possible loss of data due to type conversion C:\Users\User\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Experts\TradeControl.mq5(96,22) : warning 43: possible loss of data due to type conversion C:\Users\User\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Experts\TradeControl.mq5(147,22) : warning 43: possible loss of data due to type conversion C:\Users\User\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Experts\TradeControl.mq5(202,22) : warning 43: possible loss of data due to type conversion : information: Result 2 error(s), 4 warning(s) [Finished in 2.7s]
There is typically 3 types of messages: information, warning and error.
The (25,5), for example, is the line and columm for the error “‘abc’ - undeclared identifier”.
And here is my build file:
{ "selector": "source.mq5", "cmd": ["C:\\Users\\User\\AppData\\Roaming\\Sublime Text 3\\Packages\\User\\sublime_mql5\\makeMQL5.bat", "$file_path", "$file_base_name", "$file_extension"], "file_regex": "^(...*?)", "line_regex": "^(...*?) : error", "working_dir": "$file_path", "variants": [ { "name": "Syntax Check", "cmd": ["C:\\Users\\User\\AppData\\Roaming\\Sublime Text 3\\Packages\\User\\sublime_mql5\\checkMQL5.bat", "$file_path", "$file_base_name", "$file_extension"] } ] }
So, how can I get the file name and line error correctly?
Thank you.