| Summary: | The 'missing semicolon' warning appears too often | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | curtis.windatt.public, mamacdon |
| Version: | 5.0 | ||
| Target Milestone: | 6.0 M1 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
(In reply to Michael Rennie from comment #0) > Should we try to suppress / ignore warnings like that that are confusing in > a broken statement context? Yes, I think it would reduce confusion if we prevented these cascades of warnings. If a token has a parse error on it, we could just throw away any "semi" warnings for that token. Pushed fix to: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=1265e93108c685be6b8964e2b1745911f71656d9 I added some post-processing to filter out reported eslint problems that are reported on the same node as a parser error. Closing as fixed. If we think we should do more filtering we can reopen or create a new bug. |
Consider the following invalid snippet: var foo = {}; (var foo.bar if you check the annotations on the second line after eslint runs you get the following: Multiple annotations: Syntax error on token 'var', delete this token. Syntax error on token 'foo', delete this token. Syntax error on token '.', delete this token. Syntax error on token 'bar', delete this token. 'bar' is not defined. Missing semicolon. Missing semicolon. Missing semicolon. I would expect at most one missing semicolon warning - if any at all since the statement is incomplete. For reference the above warnings are reported after 'foo' after '.' and after 'bar'. Should we try to suppress / ignore warnings like that that are confusing in a broken statement context?