Sublime Forum

SublimeLint (Realtime lint highlighting)

#59

I’m pretty sure Open Komodo has a Javascript linter written in python… I don’t know how good that might be, but it’s there. The main problem with it is …the license :frowning:

0 Likes

#60

While I don’t know how difficult it would be (or even possible), I would love to have lint highlighting for Java.

Just a request…

0 Likes

#61

[quote=“korgoth”]I cant seem to get this working for javascript

im on windows, and added nodejs to my path (node -v returns the current version)

When i try node it returns errors (ie javascript file contains errors), and on a correct file it returns nothing, but i dont see the borders appear where the errors actually are[/quote]

Are you using sublimelint or SublimeLinter?

0 Likes

#62

Someone will have to write a wrapper for a checker such as checkstyle (checkstyle.sourceforge.net/).

0 Likes

#63

[quote=“aparajita”]

[quote=“korgoth”]I cant seem to get this working for javascript

im on windows, and added nodejs to my path (node -v returns the current version)

When i try node it returns errors (ie javascript file contains errors), and on a correct file it returns nothing, but i dont see the borders appear where the errors actually are[/quote]

Are you using sublimelint or SublimeLinter?[/quote]

SublimeLinter that is

0 Likes

#64

Close all windows, then quit and restart ST2. Open the console, and near the top you will see the loading messages for SublimeLinter. If there is an error loading the Javascript module, the reason will be printed there.

0 Likes

#65

I have added support for Java linting, using “javac -Xlint”, in this pull request:

github.com/lunixbochs/sublimelint/pull/15

0 Likes

#66

Awesome, swdunlop. Works great. Now if only it were in Kronuz’s linter… so I could lint only on save :neutral_face:

0 Likes

#67

Is this plugin still developed? I just see two outstanding pull requests on github, which I think are pretty useful (particularly, the JSlint integration). Just wondering whether it is worthwhile to wait for the master fork to pull these requests or whether I should rather change to a different fork…

Thanks!

0 Likes

#68

[quote=“gregor.hoch”]Is this plugin still developed? I just see two outstanding pull requests on github, which I think are pretty useful (particularly, the JSlint integration). Just wondering whether it is worthwhile to wait for the master fork to pull these requests or whether I should rather change to a different fork…

Thanks![/quote]

There is active work being done on Kronuz’s fork, which has become the more popular choice for all your linting needs: https://github.com/Kronuz/SublimeLinter

0 Likes

#69

I pretty much rewrote SublimeLint. The code is now far cleaner, plugins are incredibly simple, and it should never lag the user interface.

Might be worth checking out again for the developers of other versions, and for anyone who switched to a fork.

0 Likes

#70

awesome! I’ve been faithfully waiting haha :smile:

0 Likes

#71

I’ve put the “lint” folder and sublimelint.py into the User Packages folder, but it does nothing.
¿Is it necessary to enable the plugin or something similar?
For example, if I create a file with this content:

[code]<?php
abcde

echo $var;

?>[/code]

shouldn’t it mark the first line as wrong?

0 Likes

#72

The problem is that the syntax is HTML instead of PHP. No matter what the status bar says, is HTML.
Change the syntax to PHP and reopen the file. This should solve the issue.
Yuo can check the current syntax with

 sublime.active_window().active_view().settings().get('syntax')
0 Likes

#73

I added full ST3 support and a ton of features.

You can manually check out the st3 branch if you want it on ST3. I recommend switching to ST3. I’ve switched fully and I’m not likely to backport the huge number of changes I’ve made since then.

For the absolute bleeding-edge (which is required to reproduce this screenshot), you can add the st3 branch directly via package control or check it out to your Packages folder.

0 Likes

#74

[quote=“lunixbochs”]I added full ST3 support and a ton of features.

You can manually check out the st3 branch if you want it on ST3. I recommend switching to ST3. I’ve switched fully and I’m not likely to backport the huge number of changes I’ve made since then.

For the absolute bleeding-edge (which is required to reproduce this screenshot), you can switch to the linters branch and check out lunixbochs/linters to your Packages/User folder.

http://bochs.info/img/triple-threat-20130527-231925.png[/quote]

You haven’t run into any significant issues with ST3?
I was running both in parallel at one point, but I found it a big pain to use package control and git to check out different branches.
I have a lot of customization with settings and plugins in ST2 and wasn’t able to get a full replacement on ST3.
I did like the speed improvement, but didn’t see any significant reason to move to ST3 and add those difficulties.

0 Likes

#75

Hello,

This is my preffered package for linting, however, I updated to the version introduced two posts above, and I stil have this problem: github.com/lunixbochs/sublimelint/pull/44 Basicallly, the loading of the curl extension requires 1 second, then when typing, or whatever, the linter is slowed down because this issue.

Also, it seems, there is no more “languages” in the default package. How can I fix the problem mentioned above? I don’t know where you call “php afile.php -etc -etc”, can you please let us know how this works? I see there is no linter for python. I don’t understand, sorry.

There is also, some sort, of auto update, can you please document this, and let us know, which type of auto updating the packages is doing? Is there a way to disable this?

Thanks a lot

0 Likes

#76

[quote=“tito”]Hello,

This is my preffered package for linting, however, I updated to the version introduced two posts above, and I stil have this problem: github.com/lunixbochs/sublimelint/pull/44 Basicallly, the loading of the curl extension requires 1 second, then when typing, or whatever, the linter is slowed down because this issue.

Also, it seems, there is no more “languages” in the default package. How can I fix the problem mentioned above? I don’t know where you call “php afile.php -etc -etc”, can you please let us know how this works? I see there is no linter for python. I don’t understand, sorry.

There is also, some sort, of auto update, can you please document this, and let us know, which type of auto updating the packages is doing? Is there a way to disable this?

Thanks a lot[/quote]

I just added the -n flag to the PHP linter. If you read the README in the st3 branch, it mentions the new external linter system. There’s no way to disable the automatic linter updates at this point. The Packages/User/linters folder will automatically update to the git master HEAD of lunixbochs/linters.

I merged the linters branch into st3 so you should probably switch to that instead. It also seems to work with package control if you add it as a manual repo now :smile:

0 Likes

#77

[quote=“Saxi”]
You haven’t run into any significant issues with ST3?
I was running both in parallel at one point, but I found it a big pain to use package control and git to check out different branches.
I have a lot of customization with settings and plugins in ST2 and wasn’t able to get a full replacement on ST3.
I did like the speed improvement, but didn’t see any significant reason to move to ST3 and add those difficulties.[/quote]

I wrote most of the plugins I need in ST, and the rest I care about have already been ported. Anything major you miss? :smile: The symbol/definition lookup alone is probably worth the switch for me.

Hopefully wbond figures out something for multiple branches in package control.

0 Likes

#78

Ahh, such /User/linters/php.py, this morning I read the readme, but probably the version of the old repository. I was so confused. thanks

0 Likes