Sublime Forum

SublimeLint (Realtime lint highlighting)

#35

Just a quick note ( i dont know if was here already, please forgive me i didn’t read all thread ):
On windows, you kind of need to add PHP directory to your PATH variables, otherwise php lint won’t work. On win7 you can do it like this:

Press win+pause. In the window that opened, pick “advanced system settings” from the sidebar. In the new window that opens pick “environment variables”. Double click on the PATH variable and, at the end of the string add the path to PHP dir
Don’t forget the semicolon!

Restart Sublime and enjoy this great plugin!

Probably you need to do the same for each language (Py, perl and so on).

0 Likes

#36

[quote=“aparajita”]

Currently no. I’ll add it as a setting.[/quote]

The latest version of this fork http://github.com/Kronuz/SublimeLint adds the following features:

  • You can now jump directly to the next/previous lint error using ctrl+super+e/ctrl+super+shift+e (OS X) or ctrl+alt+e/ctrl+alt+shift+e (Linux and Windows).

  • By default jumping to the next/previous error will wrap around, you can turn that on or off explicitly with the “sublimelint_wrap_find” setting.

  • Gutter marks are off by default. They can be turned on by setting the “sublimelint_gutter_marks” setting to true.

  • You can disable specific linters by including the language names in the “sublimelint_disable” setting array.

0 Likes

#37

Oh yeah, I forgot to mention that lint support has been added for Objective-J using a built-in capp_lint. I now have a customized ST2 port of the TextMate Cappuccino bundle available as well:

https://github.com/aparajita/Cappuccino-Sublime

0 Likes

#38

Linting no longer seems to work for me, with the latest version.

0 Likes

#39

Which language are you trying to lint, which fork of sublimelint?

0 Likes

#40

[quote=“aparajita”]

Which language are you trying to lint, which fork of sublimelint?[/quote]

I’m using github.com/Kronuz/SublimeLint.git

It was working a few days ago, so it is a recent thing.

0 Likes

#41

[quote=“rdougan”]

Which language are you trying to lint, which fork of sublimelint?

I’m using github.com/Kronuz/SublimeLint.git

It was working a few days ago, so it is a recent thing.[/quote]

There must be some error messages in the console. Try opening SublimeLint/sublimelint_plugin.py, save it, then see what the console says.

0 Likes

#42

Writing file /Users/Robert/Desktop/untitled.js with encoding UTF-8 Traceback (most recent call last): File "./sublime_plugin.py", line 147, in on_post_save File "./sublimelint_plugin.py", line 594, in on_post_save File "./sublimelint_plugin.py", line 302, in queue_linter File "./sublimelint_plugin.py", line 286, in select_linter TypeError: argument of type 'NoneType' is not utterable

0 Likes

#43

I fixed it myself by removing the check to see if the language is disabled. I’m not familiar enough with python to fix it properly…

0 Likes

#44

Change line 283 to:

disable = view.settings().get(‘sublimelint_disable’, ])

0 Likes

#45

I’m having some issues trying to get customize Kronuz’s fork. It doesn’t seem like any of the settings take effect. I’ve tried adding them to “Global Settings - User” and also to “File Settings - User”, but neither seem to be picked up. Am I looking in the right place?

0 Likes

#46

A fixed version can be found here:

github.com/aparajita/SublimeLint

0 Likes

#47

Thanks!

Linting used to work when you simply modified the file, but no longer seems to? You have to save. I tried debugging last night and the queue method gets called, but I’m getting the file must be saved for it to ‘lint’?

0 Likes

#48

Small issue: The example theme syntax for annotations says the scope is sublimelint.notes, but it should be sublimelint.annotations.

0 Likes

#49

@andymccurdy, You should use User File Settings to put the SublimeLint settings. What settings aren’t working?

0 Likes

#50

@andymccurdy Also, make sure there are no errors in the console. Has happened a few times for me

0 Likes

#51

@andymccurdy, the setting you have to add to the User File Settings is something like this, to ignore pep8 errors (David Cramer told me you were asking him):

"pep8_ignore":  "E501" ],
0 Likes

#52

@Kronuz Ah, I was putting in in User Global Settings. Thanks!

0 Likes

#53

It’s working for me interactively. Are you getting any console errors?

0 Likes

#54

Nope, nothing. And I was debugging it last night (putting a bunch of 'print’s everywhere) and the same things seemed to be called in the code. Very odd.

0 Likes