Sublime Forum

Access build results (errors and warnings) from plugin

#1

I want to create a plugin that highlights the results from a build in the source file, much like a linter highlights problems in the source file.

For this I need to access the build results from my plugin, but I don’t know how to get to them. Any ideas on how to achieve this?

(The build system picks up the results through the file_regex plugin, but I have no idea where they are stored or how to access them).

0 Likes

#2

You may be able to grab the output directly from the ‘exec’ panel which is where the exec command (which is used by the build system) puts its result. To get the panel you basically do something like this:

self.window.get_output_panel("exec")

Which I just found in this post: https://forum.sublimetext.com/t/custom-build-system-command-output/5185/1

You’ll likely have to manually parse the output though. It seems like sublime simply parses that text using the provided regular expressions and moves the selection/cursor around in the panel whenever you ask for the next error.

0 Likes