Home Download Buy Blog Forum Support

SublimeLinter

Re: SublimeLinter

Postby facelessuser on Tue Mar 13, 2012 6:25 pm

I have been using SublimeLinter for quite a while, and I am a big fan.

But sometimes when I am looking at other peoples code, it is quite painful if the person does not follow my exact ruleset.

I am not picking on this code at all; everyone codes different. But this is not fun to code in if I want to edit someones code without reformatting all of their code. And I really don't want to have to turn it off everytime I pull up someones code that is not mine.

Screenshot - 3_13_2012 , 12_11_42 PM.png
Screenshot - 3_13_2012 , 12_11_42 PM.png (21.12 KiB) Viewed 4015 times


So here is a proposal: a low profile linting mode (optional of course)
Screenshot - 3_13_2012 , 12_12_31 PM.png
Screenshot - 3_13_2012 , 12_12_31 PM.png (27.52 KiB) Viewed 4014 times


It could even be taken one step further and the red underlines could be hidden but that can be left up to discussion. Clicking on the line still shows you the issue in the status bar, and I can easily see what is an error, what is a warning without making the code unreadable.

I have made this change locally, and I am looking for input from people to see if this would be a desired option before I bother forking and trying to submit a pull request.

Anyways, input would be nice so I can decide whether to try and get this pulled.
facelessuser
 
Posts: 1459
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeLinter

Postby dribble on Tue Mar 13, 2012 6:38 pm

facelessuser wrote:Anyways, input would be nice so I can decide whether to try and get this pulled.

I really like what you've done here, while my code is to my specs it doesn't necessarily translate to the libraries I use.

Have you implemented keybindings to flip between 'traditional' and 'minimalistic' modes? I think that would be valuable.
dribble
 
Posts: 6
Joined: Sun Mar 04, 2012 9:35 pm

Re: SublimeLinter

Postby facelessuser on Tue Mar 13, 2012 6:46 pm

dribble wrote:
facelessuser wrote:Anyways, input would be nice so I can decide whether to try and get this pulled.

I really like what you've done here, while my code is to my specs it doesn't necessarily translate to the libraries I use.

Have you implemented keybindings to flip between 'traditional' and 'minimalistic' modes? I think that would be valuable.


Hadn't thought of that, that might be nice. That way if you really want to make sure you see everything, you can just toggle it. I can look into if it seems people are really digging this idea. I am currently not putting much effort into this until I get some more feedback, but I will make a not of this request.
facelessuser
 
Posts: 1459
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeLinter

Postby viisual on Wed Mar 14, 2012 2:17 pm

facelessuser wrote:I have been using SublimeLinter for quite a while, and I am a big fan.

But sometimes when I am looking at other peoples code, it is quite painful if the person does not follow my exact ruleset.

I am not picking on this code at all; everyone codes different.


WHAT"S wrong with my first attempt at python?!


hehehe

Actually it's quite discouraging, because I use Linter as well and I made sure to get rid of all those syntactical issues.

So either that's an old version of the code or something is different between us: Linter Settings or the Source Code in question. (I'm assuming an old version of source; let me know if it is _still_ syntacticly awful [accessible via package control])

Regardless, not a bad idea. Sincerely, I'm glad my failed attempt at coding actually sparked a creative idea!
viisual
 
Posts: 9
Joined: Tue Feb 21, 2012 3:21 pm

Re: SublimeLinter

Postby facelessuser on Wed Mar 14, 2012 3:02 pm

@viisual, it is an old version I believe. I am not at all picking on your code, trust me. There are a number of plugins by more experienced python people out there that cause a bunch of highlighting. Just because the linter marks a line, it doesn't mean the code isn't sound; just that it isn't following the format rules of that I have set in my linter settings. Yours was the first file I grabbed that really highlighted a bunch.

I just wanted to show how code could look. Having to turn off the linter doesn't give me feed back on the lines I am touching, but leaving it on makes it hard to read. The alternative is to have it highlight only on save, but I personally like having the instant feedback.

I don't even know if people will go for this approach; I just thought I would throw it out there. SublimeLinter was the first plugin I thought of when I realized you could change the gutter icons.

I checked out the SublimeLinter repository and I saw a bunch of pull requests, some that have been there a while. So I am not sure if/when this could/would ever get pulled. From what I understand from reading this thread, the maintainer doesn't really have the time they used to have.

No hard feeling hopefully. I think your plugin is pretty cool, I wouldn't have had it on my computer to use if I didn't like it :).
facelessuser
 
Posts: 1459
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeLinter

Postby facelessuser on Wed Mar 14, 2012 3:58 pm

@viisual, since you asked, the one from Package control still has a lot of lint warnings and such. The only setting I disable is the 80 chars per line warning.

It is mainly things like trailing spaces, using tabs instead of spaces, variables set but not used, un-needed semi-colons, and lastly spaces after "(" or before ")". None of these are big deals, the code is sound, and some people straight up don't like some of these rules. It is no big deal. I have strict rules for my python plugins just so I don't cause the linter to highlight a bunch of lines when someone from the community tries to make edits to my plugin. Someone once made a complaint when I had a pull request about not following PEP8 standards, so I started following PEP8 standards. I just really want to minimalize the feedback.

I want the linter to show me what I need to know without hindering me.
facelessuser
 
Posts: 1459
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeLinter

Postby bizoo on Thu Mar 15, 2012 7:47 am

Just to start discussion:

Gutter icons are nice, but too many gutter icons is... too much.

IMHO, when there is so many gutter icons like the print screen of low profile linting mode, it become almost useless.
Same for BracketHighlighter, I first liked the idea but now find it counter productive.

Add to the equation that only one gutter icon could be displayed per line, and it become a mess when used by more than one plugin.

But I like the idea of low profile mode for linter :)
bizoo
 
Posts: 859
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: SublimeLinter

Postby viisual on Thu Mar 15, 2012 2:33 pm

facelessuser wrote:@viisual, it is an old version I believe. I am not at all picking on your code, trust me.

No hard feeling hopefully. I think your plugin is pretty cool, I wouldn't have had it on my computer to use if I didn't like it :).


Maybe I should have been more playful with my response, surely I wasn't sincere.

In fact I used the Linter on a production JS file, which had countless lines of things highlighted I was ... unaware were even plausible issues... but knowing how finicky some issues can be (trailing comma gotcha in IE6, for instance) I went ahead and applied the suggested Linter changes.

What would have taken me 30m-6h of debugging (IE6 really is a jerk, and terrible to deduce issues with) took all of 5 minutes.

Linter rocks.

And your idea is a good one.
viisual
 
Posts: 9
Joined: Tue Feb 21, 2012 3:21 pm

Re: SublimeLinter

Postby facelessuser on Thu Mar 15, 2012 3:11 pm

bizoo wrote:Just to start discussion:

Gutter icons are nice, but too many gutter icons is... too much.

IMHO, when there is so many gutter icons like the print screen of low profile linting mode, it become almost useless.


A very fair argument. This is just one proposal. What I am most interested in is getting the linter out of the way to let me code, but still alerting me. So what about this: Remove the outline in low profile mode and show a permanent lint status in the status bar like: SublimeLinter: 24 issues. The underlines could possibly remain.

bizoo wrote:Same for BracketHighlighter, I first liked the idea but now find it counter productive.

Add to the equation that only one gutter icon could be displayed per line, and it become a mess when used by more than one plugin.
But I like the idea of low profile mode for linter :)


True. On the topic of BracketHighlighter, would you be interested in an option to only show icons when there is only one selection and no icons on multi-select? I understand that the effectiveness of the icons is lost when a bunch of selections are made. I think this might be a good compromise.
facelessuser
 
Posts: 1459
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeLinter

Postby bizoo on Fri Mar 16, 2012 9:48 am

facelessuser wrote:What I am most interested in is getting the linter out of the way to let me code, but still alerting me. So what about this: Remove the outline in low profile mode and show a permanent lint status in the status bar like: SublimeLinter: 24 issues. The underlines could possibly remain.

Good idea, IMHO underlines are not too distracting.
bizoo
 
Posts: 859
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 13 guests

cron