Sublime Forum

How to run part of my plugin in the second thread properly?

#21

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.

0 Likes

#22

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 :slightly_smiling:

Thank you @FichteFoll

0 Likes

#23

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.

0 Likes

#24

I have long been used by these plugins, and I know how they work.

Sublime​Linter-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 :slightly_smiling: It was the biggest disadvantage of this plugin, that forced me to write own.

Sublime​Clang 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.

0 Likes

#25

FYI, you can make SublimeLinter show a quick panel with all errors it encountered in the current file using Ctrl+K, A.

0 Likes

#26

Oops! I will check it.

0 Likes