New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]disable specific error message #16

Closed
GoogleCodeExporter opened this Issue Jun 17, 2015 · 17 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter

GoogleCodeExporter commented Jun 17, 2015

for example I want disable E0110 line too long.

gjslint --js myjs.js --disable E0110

Actually, 80 columns is very limited, for my own use, I'd like to set it to 100 
or 120. Is there any way to set this variable.

Original issue reported on code.google.com by guil...@gmail.com on 8 Nov 2010 at 12:24

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

This is a change we should support for the open source version of the Closure 
Linter. Internally (and with anyone contributing to the Closure Tools) we don't 
want to allow suppression of errors as it allows ignoring a part of the Google 
JavaScript Style Guide. But, not everyone using this tool is following our 
style guide completely.

Original comment by a...@google.com on 12 Nov 2010 at 5:58

  • Changed state: Accepted
  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

GoogleCodeExporter commented Jun 17, 2015

This is a change we should support for the open source version of the Closure 
Linter. Internally (and with anyone contributing to the Closure Tools) we don't 
want to allow suppression of errors as it allows ignoring a part of the Google 
JavaScript Style Guide. But, not everyone using this tool is following our 
style guide completely.

Original comment by a...@google.com on 12 Nov 2010 at 5:58

  • Changed state: Accepted
  • Added labels: Priority-Low
  • Removed labels: Priority-Medium
@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

I think so too - it will be very cool to disable (or increase) line length.
I'll wait for such functionality.

Original comment by ua.and...@gmail.com on 3 Feb 2011 at 5:35

GoogleCodeExporter commented Jun 17, 2015

I think so too - it will be very cool to disable (or increase) line length.
I'll wait for such functionality.

Original comment by ua.and...@gmail.com on 3 Feb 2011 at 5:35

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

Hmm.. Google still doing code reviews with pen and paper? ;) 

+1 Ability to set custom line length.

Original comment by peter.su...@gmail.com on 24 Feb 2011 at 1:01

GoogleCodeExporter commented Jun 17, 2015

Hmm.. Google still doing code reviews with pen and paper? ;) 

+1 Ability to set custom line length.

Original comment by peter.su...@gmail.com on 24 Feb 2011 at 1:01

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

Created a small patch which hardcodes a new max line length. 

Original comment by peter.su...@gmail.com on 24 Feb 2011 at 2:13

Attachments:

GoogleCodeExporter commented Jun 17, 2015

Created a small patch which hardcodes a new max line length. 

Original comment by peter.su...@gmail.com on 24 Feb 2011 at 2:13

Attachments:

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

Thanks for this patch - worked well! :)

But it will be good to have a possibility to pass it as parameter (or turn off 
checking at all).

Original comment by ua.and...@gmail.com on 24 Feb 2011 at 2:32

GoogleCodeExporter commented Jun 17, 2015

Thanks for this patch - worked well! :)

But it will be good to have a possibility to pass it as parameter (or turn off 
checking at all).

Original comment by ua.and...@gmail.com on 24 Feb 2011 at 2:32

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

I've created a patch that does this: http://codereview.appspot.com/4291044/

It adds --ignore_errors which takes a comma-separated list of the integer error 
numbers (i.e. 110, not E0110).

Original comment by ibmirkin@gmail.com on 12 Mar 2011 at 7:54

GoogleCodeExporter commented Jun 17, 2015

I've created a patch that does this: http://codereview.appspot.com/4291044/

It adds --ignore_errors which takes a comma-separated list of the integer error 
numbers (i.e. 110, not E0110).

Original comment by ibmirkin@gmail.com on 12 Mar 2011 at 7:54

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

Thanks, worked as expected!

One note: parameters must be passed before the path, e.g.:
c:\gjslint --ignore_errors 110,5 D:\project\*.js

Original comment by ua.and...@gmail.com on 14 Mar 2011 at 9:32

GoogleCodeExporter commented Jun 17, 2015

Thanks, worked as expected!

One note: parameters must be passed before the path, e.g.:
c:\gjslint --ignore_errors 110,5 D:\project\*.js

Original comment by ua.and...@gmail.com on 14 Mar 2011 at 9:32

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

[deleted comment]

GoogleCodeExporter commented Jun 17, 2015

[deleted comment]
@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

It would be nice for this to be an official patch. What is the philosophy 
behind throwing an error for lines exceeding 80 chars in length?

Original comment by ra...@gamzee.com on 6 Sep 2011 at 6:55

GoogleCodeExporter commented Jun 17, 2015

It would be nice for this to be an official patch. What is the philosophy 
behind throwing an error for lines exceeding 80 chars in length?

Original comment by ra...@gamzee.com on 6 Sep 2011 at 6:55

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

The bottom line to the philosophy question is because that's what Google's JS 
style guide says is the limit.  This page has some good explanations about how 
the limit came about, and arguments for and against it:  
http://programmers.stackexchange.com/questions/100392/should-we-keep-the-80-char
acter-per-line-limit-in-java-code

Original comment by JayYoung...@gmail.com on 6 Sep 2011 at 4:19

GoogleCodeExporter commented Jun 17, 2015

The bottom line to the philosophy question is because that's what Google's JS 
style guide says is the limit.  This page has some good explanations about how 
the limit came about, and arguments for and against it:  
http://programmers.stackexchange.com/questions/100392/should-we-keep-the-80-char
acter-per-line-limit-in-java-code

Original comment by JayYoung...@gmail.com on 6 Sep 2011 at 4:19

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

Since this seems to be personal preference, it seems to be it should be a 
warning at best, if gjslint differentiates between warnings and errors.

Original comment by ra...@gamzee.com on 6 Sep 2011 at 7:43

GoogleCodeExporter commented Jun 17, 2015

Since this seems to be personal preference, it seems to be it should be a 
warning at best, if gjslint differentiates between warnings and errors.

Original comment by ra...@gamzee.com on 6 Sep 2011 at 7:43

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

I agree too.

Sometimes I don't need limit width. 
Or I have specific requirements.
So I want change/disable this error (or maybe others too) by code.

Original comment by ua.and...@gmail.com on 7 Sep 2011 at 7:32

GoogleCodeExporter commented Jun 17, 2015

I agree too.

Sometimes I don't need limit width. 
Or I have specific requirements.
So I want change/disable this error (or maybe others too) by code.

Original comment by ua.and...@gmail.com on 7 Sep 2011 at 7:32

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

Reasonable programmers can disagree with style guidelines like maximum line 
length.  Different environments also impose different requirements.  Given 
this, I vote for merging in the patch that allows selectively ignoring 
particular errors.

Original comment by t...@animoto.com on 11 Nov 2011 at 7:14

GoogleCodeExporter commented Jun 17, 2015

Reasonable programmers can disagree with style guidelines like maximum line 
length.  Different environments also impose different requirements.  Given 
this, I vote for merging in the patch that allows selectively ignoring 
particular errors.

Original comment by t...@animoto.com on 11 Nov 2011 at 7:14

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

Issue 38 has been merged into this issue.

Original comment by a...@google.com on 7 Mar 2012 at 12:06

GoogleCodeExporter commented Jun 17, 2015

Issue 38 has been merged into this issue.

Original comment by a...@google.com on 7 Mar 2012 at 12:06

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

I've created a wrapper that allows disabling specific errors without modifying 
the closure-linter source code. See here for details:

http://kewisch.wordpress.com/2012/07/28/disable-specific-error-messages-in-closu
re-linter/

Original comment by kewi...@gmail.com on 28 Jul 2012 at 10:47

GoogleCodeExporter commented Jun 17, 2015

I've created a wrapper that allows disabling specific errors without modifying 
the closure-linter source code. See here for details:

http://kewisch.wordpress.com/2012/07/28/disable-specific-error-messages-in-closu
re-linter/

Original comment by kewi...@gmail.com on 28 Jul 2012 at 10:47

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

--disable Disable specific error. Usage Ex.: gjslint --disable 1,0011 foo.js.
--max_line_length Maximum line length allowed without warning.

Original comment by vagra...@google.com on 29 Jul 2013 at 8:01

  • Changed state: Fixed

GoogleCodeExporter commented Jun 17, 2015

--disable Disable specific error. Usage Ex.: gjslint --disable 1,0011 foo.js.
--max_line_length Maximum line length allowed without warning.

Original comment by vagra...@google.com on 29 Jul 2013 at 8:01

  • Changed state: Fixed
@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Jun 17, 2015

Original comment by vagra...@google.com on 29 Jul 2013 at 8:17

GoogleCodeExporter commented Jun 17, 2015

Original comment by vagra...@google.com on 29 Jul 2013 at 8:17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment