Sublime Forum

SublimeLinter

#21

Currently there is no facility to specify globals via the settings. If wouldn’t be hard to implement, add a ticket to the issue tracker on github. You can put the declaration directly in your source code at the top:

/*global DISQUS:true, jQuery:false */
0 Likes

#22

How to force run linter in ruby without warnings check? Like “ruby -c”.

0 Likes

#23

Look for “lint_args” in the README.

0 Likes

#24

One of the options, “predef”, can be an array of names, which will be used to declare global variables, or an object whose keys are used as global names, with a boolean value that determines if they are assignable.

0 Likes

#25

The trick is that you need to provide the path of your php install to both the sublimelinter_executable_map and the sublimelinter_syntax_map (notice one is executable and the other is syntax). So in my case I’ve got it installed in my xammp directory on a windoz 7 64 box. So leave the default settings folder alone and add the following to your preferences > file settings > user

"sublimelinter_executable_map": { "php": "c:/xampp/php/php" }, "sublimelinter_syntax_map": { "php": "c:/xampp/php/php" }
Put a comma in before the last entry and make sure the whole thing is in curly braces. You need both of these rules for it to work.

[quote=“aparajita”]>I’ve tested this on windows and it does require some workaround. I finally got it working by editing both “Packages\SublimeLinter\Base File.sublime-settings” and “Packages\User\Base File.sublime-settings”…

I can guarantee if you provide the correct path and don’t have any missing/extra commas in Packages\User\Base File.sublime-settings it will work correctly without modifying the default.[/quote]

0 Likes

#26

sublimelinter_syntax_map has nothing to do with the executable. It is mapping to a .tmLanguage file, which is not in the php binary distribution, but in the ST2 Packages directory. So I can’t see how that has anything to do with it working or now working, especially since you are providing a path to your php install.

0 Likes

#27

ctrl+alt+e and ctrl+alt+shift+e seem to be broken, I’ve tried adding the bindings to my user settings and still it doesn’t work.

0 Likes

#28

Please folks, always give your full configuration information (platform, versions, etc) and sample files when reporting something.

0 Likes

#29

Windows 7
Dev build 2156
Package List

  • Bracket Highlighter

  • Djaneiro

  • HMTL5

  • Jinja2

  • jQuery Snippets Pack

  • nginx

  • Nodejs

  • Package Control

  • Placeholders

  • Prefixr

  • SideBarEnhancements

  • Sublime Tweet

  • SublimeCodeIntel

  • SublimeLinter

  • SublimePaster

  • SublimeWebColors

  • Tag

  • Theme - Soda

  • Wordpress

  • Zen Coding

Aside from that it’s stock with the exception of opening/closing the sidebar being bound to ctrl+5, I haven’t changed any settings across any of these plugins or the preinstalled ones.

0 Likes

#30

[quote=“willy1234x1”]
Package List

  • Bracket Highlighter

  • Djaneiro

  • HMTL5

  • Jinja2

  • jQuery Snippets Pack

  • nginx

  • Nodejs

  • Package Control

  • Placeholders

  • Prefixr

  • SideBarEnhancements

  • Sublime Tweet

  • SublimeCodeIntel

  • SublimeLinter

  • SublimePaster

  • SublimeWebColors

  • Tag

  • Theme - Soda

  • Wordpress

  • Zen Coding

Aside from that it’s stock[/quote]

Yes, aside from that page long list of plugins, it’s stock. :laughing:

Anyway, I am seeing major weirdness with SublimeLinter on Windows in the latest build of ST2. I am not seeing the same symptoms on other platforms, so it seems to be a Windows-only issue. I’ll look into it some more.

0 Likes

#31

You still didn’t give me any sample files. There are 8 different linters, it would help if I knew under what circumstances next/previous error is not working.

0 Likes

#32

I’m sorry but I don’t understand what you mean by sample file. Do you just want a file full of code that next/previous isn’t working in? Here’s a simple Python file next/previous stopped working in. The Python Linter is the only one I really use but I can try the others if you would like.

# alternate implementation with lengths

def myzip(*seqs):
	minlen = min(len(s) for s in seqs)
	return [tuple(s[i] for s in seqs) for i in range(minlen)]

def mymapPad(*seqs, **pad):
	maxlen = max(len(s) for s in seqs)
	index = range(maxlen)
	return [tuple((s[i] if len(s) > i else pad) for s in seqs) for i in index]

s1, s2 = 'abc', 'xyz123'
print myzip(s1, s2)
print mymapPad(s1, s2)
print mymapPad(s1, s2, pad=99)
0 Likes

#33

I get errors on lines 3-5 and 7-10, and next/previous error is working perfectly for me. Please remove all plugins but SublimeLinter from the Packages directory, restart ST2 and see if it works. If it does, some other plugin must be eating those key combinations.

0 Likes

#34

If I disable a particular linter using sublimelinter_disable, will the name still appear in the console as having loaded? (i.e. “SublimeLinter: NAME_OF_LANGUAGE loaded”)

I’m just checking to see if I typed the name wrong or if it will still appear in the console…

Thanks.

0 Likes

#35

It is loaded but disabled.

0 Likes

#36

This is a great plugin!

I have a coloring question: I like the
“sublimelinter_fill_outlines”: true
option with a very light color that barely differs from the background (e.g. light red for white background). Doing this, however, overwrites the syntax highlighting for this line sublimelinter. foreground color. Is it possible to avoid that? I would like to preserve the text highlighting and only color the background slightly differently. Maybe it’s just a question of language definition but I wasn’t able to find a solution…

Thanks!

0 Likes

#37

Addition:

Based on next post, I’ve solved it!!

The path was a red herring. The issue was that somehow, my php files are classified as “html5”, not “php”. When I manually change the syntax to “php”, sublimelinter works!

For those that run into this problem:
a) open one of your php files
b) note in the lower right, it says “html5”, not “php”
c) left-click on that “html5”, and at the top, choose “Open all with current extension as…”
d) choose php
Thanks

Heya,

I’m not able to get sublimelinter to work. I’m on Windows 7 with the latest beta Sublime Text (2172).

I’m not sure exactly what “working” means since I haven’t seen SublimeLinter in action, but “not working” means: I’ve tried typing junk in the source file thinking something would pop up (nothing did), tried pressing ctrl-alt-l, nothing happens. I’ve done ctrl-shift-p and entered “lint”, but the only entry I see is “Sublime Linter: Extract Notations”. I choose that and a new empty file pops up named “Annotations from file.php”. But no lint output.

My User/Base File.sublime-settings contains:

"sublimelinter_executable_map":
{
	"php": "c:/wamp/bin/php/php5.3.8/php"
},

I’ve also tried c:\wamp\bin\php\php5.3.8\php", tried with single 's, tried with “php.exe”, tried upper/lower case drive c.

I’ve tried all the previous suggestions in this thread.

My console output is below. Any help appreciated; this sure sounds cool.

Thanks,
Bill

startup, version: 2172 windows x64 channel: dev
executable: /C/Program Files/Sublime Text 2/sublime_text.exe
working dir: /C/wamp/www/opttown
packages path: /C/Users/Bill/AppData/Roaming/Sublime Text 2/Packages
settings path: /C/Users/Bill/AppData/Roaming/Sublime Text 2/Settings
error parsing session: No data at: 0:0
package /C/Program Files/Sublime Text 2/Pristine Packages/ActionScript.sublime-package is newer than the installed version (/C/Users/Bill/AppData/Roaming/Sublime Text 2/Pristine Packages/ActionScript.sublime-package), running PackageSetup
PackageSetup returned: -1
catalogue loaded
found 8 files for base name Default.sublime-keymap
found 2 files for base name Default.sublime-mousemap
found 6 files for base name Main.sublime-menu
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\comment.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\copy_path.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\delete_word.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\detect_indentation.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\duplicate_line.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\echo.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\exec.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\fold.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\font.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\goto_line.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\indentation.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\kill_ring.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\mark.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\new_templates.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\open_file_settings.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\paragraph.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\save_on_focus_lost.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\scroll.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\side_bar.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\sort.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\swap_line.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\switch_file.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\transform.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\transpose.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Default\trim_trailing_white_space.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Diff\diff.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Git\git.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\HTML\encode_html_entities.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\HTML\html_completions.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Package Control\Package Control.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\SublimeCodeIntel\SublimeCodeIntel.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\SublimeLinter\SublimeLinter.py
SublimeLinter: coffeescript loaded
SublimeLinter: java loaded
SublimeLinter: JavaScript loaded
SublimeLinter: annotations loaded
SublimeLinter: Objective-J loaded
SublimeLinter: perl loaded
SublimeLinter: php loaded
SublimeLinter: python loaded
SublimeLinter: ruby loaded
SublimeLinter: pylint loaded
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\SublimeTODO\todo.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\SublimeTagmatcher\Elements.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\SublimeTagmatcher\SublimeTagmatcher.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\Tortoise\Tortoise.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\ZenCoding\dynamicsnippets.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\ZenCoding\sublimezen.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\ZenCoding\sublimezenplugin.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\ZenCoding\zenmeta.py
Reloading plugin C:\Users\Bill\AppData\Roaming\Sublime Text 2\Packages\ZenCoding\zentrackers.py
loading bindings
loading pointer bindings
found 1 files for base name Default.sublime-theme
theme loaded
app ready
pre session restore time: 0.734349
wrote startup cache, added files: 1 orphaned files: 0 total files: 109 cache hits: 108
startup time: 1.18203 (package setup was run)
loaded 1111 snippets
Package Control: Skipping automatic upgrade, last run at 2012-01-30 16:09:04, next run at 2012-01-30 17:09:04 or after

0 Likes

#38

I am having exactly the same issue as the above poster.

Using Windows 7 32bit and latest Sublime
Console output: pastebin.com/L4zbPAFi
Sublimelinter settings: pastebin.com/VKNz4aYS

EDIT:
Just tried sublimelint, and it’s working perfectly from the start.
Also noticed that if the Syntax is NOT PHP, sublimelinter doesn’t work at all.
Sometimes PHP can be embedded in HTML.
I got sublimelinter to work only when i pressed CTRL+ALT+l and i always get an error saying: No lint errors (there where errors in the document tho)

0 Likes

#39

Hi having a problem getting sublime linter to work. Win 7 64.

The console is outputting the following error:

SublimeLinter: php enabled (using “c:/PHP/php” for executable)
wrote startup cache, added files: 2 orphaned files: 5 total files: 102 cache hits: 100
startup time: 2.61651 (package setup was not run)
Package Control: Removed old directory for package SublimeCodeIntel
Traceback (most recent call last):
File “.\sublime_plugin.py”, line 176, in on_load
File “.\sublime_plugin.py”, line 155, in run_timed_function
File “.\sublime_plugin.py”, line 175, in
File “.\SublimeLinter.py”, line 619, in on_load
File “.\SublimeLinter.py”, line 84, in background_run
File “.\SublimeLinter.py”, line 102, in run_once
File “.\sublimelinter\modules\base_linter.py”, line 260, in run
File “.\sublimelinter\modules\base_linter.py”, line 193, in executable_check
File “.\subprocess.py”, line 701, in communicate
File “.\subprocess.py”, line 911, in _communicate
IOError: [Errno 32] Broken pipe

0 Likes

#40

I was doing most of the coding and support from end of July last year until recently. I can’t spare the time any more. It would be nice if some other people would step forward.

  • Aparajita
0 Likes