Home Download Buy Blog Forum Support

SublimeLinter

SublimeLinter

Postby aparajita on Mon Aug 29, 2011 8:53 pm

A new release of SublimeLinter (v1.4) is now available. This version implements an option to display a popup list of errors when saving a file. For more information, see the README.

https://github.com/Kronuz/SublimeLinter
Last edited by aparajita on Sun Dec 25, 2011 6:13 pm, edited 4 times in total.
aparajita
 
Posts: 173
Joined: Sun Jul 24, 2011 10:42 pm

Re: SublimeLinter

Postby rdougan on Tue Aug 30, 2011 12:53 am

Code: Select all
>>> view.run_command("lint", "JavaScript")
Traceback (most recent call last):
  File "./sublimelinter_plugin.py", line 482, in run_
  File "./sublimelinter_plugin.py", line 547, in _run
  File "./sublimelinter_plugin.py", line 235, in run_once
  File "./sublimelinter/modules/javascript.py", line 47, in run
  File "./sublimelinter/modules/javascript.py", line 42, in check
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/__init__.py", line 307, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/decoder.py", line 319, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/decoder.py", line 338, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
rdougan
 
Posts: 44
Joined: Sat Apr 09, 2011 2:37 am

Re: SublimeLinter

Postby aparajita on Tue Aug 30, 2011 12:27 pm

Can you please report this in github? At least there we will get notified when there is a response. When you report it, please note whether this is happening with all javascript files or a particular file.
aparajita
 
Posts: 173
Joined: Sun Jul 24, 2011 10:42 pm

Re: SublimeLinter

Postby aparajita on Wed Sep 14, 2011 6:54 pm

SublimeLinter has just been updated to v1.1 with the following new features:

- The documentation has been expanded and consolidated into README.markdown.

- The commands to control SublimeLinter are now in the Command Palette and only appear when they are relevant to the current view and the current settings.

- The current view can be linted with the key equivalent Control+Command+l (OS X) or Control+Alt+l (Linux, Windows).

- Renamed jshint_config to jshint_options to be consistent with terminology on jshint.com.

- Objective-J will check for invalid ASCII if sublimelinter_objj_check_ascii setting is true.

- Default settings are defined and documented in Base File.sublime-settings.

- Added Preferences menu items to access package settings and key equivalents.

- Added ability to specify a custom executable for non-built in linters.

- Added ability to map a syntax to a language to support syntax variants such as "Python Django".

- During startup, linters indicate if they are built in or the path to their executable.

- The pyflakes error message shows a column number that matches ST2 column numbers.

Enjoy!
aparajita
 
Posts: 173
Joined: Sun Jul 24, 2011 10:42 pm

Re: SublimeLinter

Postby dlprice on Tue Sep 20, 2011 12:38 am

I tried changing the executable path to my php.exe, however I can't seem to get it to work. If I add it to, either, the "Base File.sublime-settings" in the Packages\SublimeLinter, or in the User folder, nothing happens. The get_executable just doesn't seem to be picking up the "Base File"... at least in my instance. I tried renaming the Base File.sublime-settings to something like "Linter.sublime-settings", and then changing the get_executable load_settings to pick up this one, and it worked. Any ideas?
dlprice
 
Posts: 4
Joined: Thu Aug 25, 2011 2:21 am

Re: SublimeLinter

Postby aparajita on Wed Sep 21, 2011 5:28 am

I didn't test on Windows yet, can you please file an issue in github?
aparajita
 
Posts: 173
Joined: Sun Jul 24, 2011 10:42 pm

Re: SublimeLinter

Postby aparajita on Thu Sep 22, 2011 6:39 pm

It works, you must not be using the right path. Here's what my user settings look like:

"sublimelinter_executable_map":
{
"php": "c:/Program Files/PHP/php"
}
aparajita
 
Posts: 173
Joined: Sun Jul 24, 2011 10:42 pm

Re: SublimeLinter

Postby dlprice on Sun Sep 25, 2011 6:46 pm

Very odd. I put:

Code: Select all
    "sublimelinter_executable_map":
    {
        "php": "C:/xampp/php/php"
    }


into every occurrence of Base File.sublime-settings I could find (default, user, and the one in sublimelinter). Figured this would help me determine which Base File it was expecting to find it in. I put a "print map" statement in the module_utils.py to see what was happening and to make sure it wasn't just me putting in an invalid path, and, unfortunately, it consistently shows "None".

My original thought was it was something screwy about using "Base File" in the sublimelinter folder, since changing the name of the file from "Base File.sublime-settings" to "SublimeLinter.sublime-settings", and then adjusting the module_utils.py file to reflect the same resolved the issue. But with you being able to get work makes things just that much more confusing. Thanks for checking.
dlprice
 
Posts: 4
Joined: Thu Aug 25, 2011 2:21 am

Re: SublimeLinter

Postby aparajita on Fri Sep 30, 2011 6:23 am

Try a lowercase "C" for the drive letter, that may make a difference.
aparajita
 
Posts: 173
Joined: Sun Jul 24, 2011 10:42 pm

Re: SublimeLinter

Postby shaun on Fri Sep 30, 2011 5:04 pm

I love this... but I wish I could turn off the outlining. It's a bit too distracting as I'm typing.
Would also be nice to have an option where it ran a lint on every Save operation.
shaun
 
Posts: 7
Joined: Fri Sep 30, 2011 4:52 pm

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 3 guests