jeremykohn / closure-linter

Automatically exported from code.google.com/p/closure-linter
Apache License 2.0
0 stars 0 forks source link

Feature request - not complaining about incorrect use of semi-colons after else statements #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Type in the following code in a file:
if (true)
  alert('yes');
else;
  alert('no');

2. run gjslint on the file

What is the expected output? What do you see instead?
Expected output is some complaint about the semi-colon after the else. (I think 
I accidentally put them there every now and then because I'm so used to Python)

I would expect a warning at least on the `else;` part. 

What version of the product are you using? On what operating system?
closure-linter 2.2.1

Please provide any additional information below.
When I accidentally left the semi-colon in there the Google Closure compiler 
trips up on it.

Original issue reported on code.google.com by pete...@gmail.com on 7 Nov 2010 at 6:40

Attachments:

GoogleCodeExporter commented 9 years ago
This is more of a feature request than a bug (for the linter, the code is most 
likely buggy). I wouldn't report this is an extra semi-colon, since it is a 
valid place for a semi-colon but the fact that there is a completely empty else 
(not even including a comment) as a result of the badly places semi-colon is 
probably worth of an error.

Original comment by a...@google.com on 15 Nov 2010 at 5:11

GoogleCodeExporter commented 9 years ago

Original comment by a...@google.com on 16 Nov 2010 at 12:46

GoogleCodeExporter commented 9 years ago

Original comment by vagra...@google.com on 29 Jul 2013 at 7:58

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
Issue 15 has been merged into this issue.

Original comment by vagra...@google.com on 22 Aug 2013 at 4:50