I’m afraid I do not have the time to teach you “good” programming habits, but I will say this: Avoid global and shared state. You can do that by passing relevant information as parameters to other functions (or classes) instead of setting the state on a global instance or something.
How to run part of my plugin in the second thread properly?
Thank you for your help.
Maybe I didn’t do everything right in python because it is my first experience with this language.
All the rest time I am using C for embedded devices (and also create this plugin for linting C).
Now the plugin looks like this:
In a short time I’m going to share code in githab and publish plugin on packagecontrol
Thank you @FichteFoll
Well, you could also have used this clang linter based on SublimeLinter, but it’s okay to have a stand-alone linter package in the package list alongside SublimeLinter-based ones, imo.
I have long been used by these plugins, and I know how they work.
SublimeLinter-contrib-clang doesn’t show any error summary (like output_panel in my plugin). It make using this plugin very uncomfortable with files which have more than 100 lines It was the biggest disadvantage of this plugin, that forced me to write own.
SublimeClang is the second C linter for Sublime Text, but it doesn’t support ST3. There are several ways how to force it to work with ST3 (recompile Clang dll), but all this action can be difficult for majority of people.
So I hope soon to improve the situation with the C Linters.
FYI, you can make SublimeLinter show a quick panel with all errors it encountered in the current file using Ctrl+K, A.