This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 248259 - Add optional warning/hint if line is not ended by semicolon
Summary: Add optional warning/hint if line is not ended by semicolon
Status: RESOLVED WORKSFORME
Alias: None
Product: javascript
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: PC Other
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-29 20:17 UTC by elennaro
Modified: 2014-10-30 10:52 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description elennaro 2014-10-29 20:17:04 UTC
I know that JS does not need ; at the end of a line.
But I thing this is a needed feature os an option to warn about not putting semicolons. And that's why we do need this:
Given code:
var lexer = new marked.Lexer(options);
lexer.rules.heading = /^\s*(#{1,6})\s+([^\n]+?) *#* *(?:\n+|$)/	
var options = {};
I didn't put semicolon at the end of line 2 and after minify code I've got an error bag flag at the end of regexp: /v.
Anyway someone likes putting ; at the end of lines.
Comment 1 Vladimir Riha 2014-10-29 21:24:31 UTC
But the hint is already there, right?
Comment 2 Vladimir Riha 2014-10-30 08:47:23 UTC
works for me, hint is displayed as supposed. Please note that you might have to wait for background scanning to finish


Product Version: NetBeans IDE Dev (Build javascript2-frameworks-487-on-20141029)
Java: 1.8.0_20; Java HotSpot(TM) Client VM 25.20-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_20-b26
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
Comment 3 Petr Pisl 2014-10-30 09:17:48 UTC
Vlada is right, the hint is already implemented here.
Comment 4 elennaro 2014-10-30 10:52:24 UTC
Oh. I so terribly sorry. I swear it was not. But can't reproduce it now.
Sorry.
BTW it would be nice if NB could automatically put it on alt enter, like as in Java hints.