| Summary: | [eslint] Region flagged by "Missing semicolon" is too large | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | JS Tools | Assignee: | Mark Macdonald <mamacdon> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | maciej.bendkowski |
| Version: | 5.0 | ||
| Target Milestone: | 5.0 M1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
I think it's a more general problem. I've got the same issue in case of missing parentheses. The whole function up to where the missing bracket should be was marked with the warning. Also, I noticed this particular warning occurs when there's a missing comma ',' instead of a missing semicolon ';'. (In reply to Maciej Bendkowski from comment #1) > I think it's a more general problem. I've got the same issue in case of > missing parentheses. The whole function up to where the missing bracket > should be was marked with the warning. Opening a separate bug for that. There's supposed to be a "Parse error" shown at the end of the file, but it's being hidden. > Also, I noticed this particular warning occurs when there's a missing comma ',' > instead of a missing semicolon ';'. Can you post the code you're using? In general, recovering from a parse error can cause cascading errors which are not intuitive. There may be something the validator can do to highlight the root cause and suppress distracting messages. Fixed. The warning now appears only on the token before where the semicolon should be. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=d37f3fd |
1. Create a js file with this code: foo(function() { // blah blah }) 2. You get a "missing semicolon" warning on the entire 3 lines. It would be nicer if the semicolon message was just on the closing ')' of the function call. Sometimes having it on the entire region obscures more valuable warnings inside the region.