qooxdoo / qooxdoo

qooxdoo - Universal JavaScript Framework
http://qooxdoo.org
Other
765 stars 260 forks source link

Editor is more pedantic than generator about missing semicolons (BZ#5705) #5775

Closed qx-bug-importer closed 8 years ago

qx-bug-importer commented 12 years ago

(oliverst) wrote:

When passing demos or examples with missing semicolons to the playground the editor will show a warning. The code will run though. Maybe the check for missing semicolons should also added to the generator - at least in the "lint" mode.

assigned to Thomas Herchenroeder (@thron7)

qx-bug-importer commented 12 years ago

Martin Wittemann (@wittemann) wrote:

The editor uses JSLint internally (the editor itself is an external component we just use) so thats where the differences come from. In general, the lint check could warn about missing semicolons too.

qx-bug-importer commented 12 years ago

Thomas Herchenroeder (@thron7) wrote:

The problem with lint warning about missing semicolons is that our lint module doesn't see any semicolons at all! It is looking at the AST which doesn't contain any semicolons. So with the existing infrastructure it would not be straight forward to implement that feature.

(Possible approaches would be to (a) have the parser warn about missing semicolons (but we have just removed all warnings from the parser to have them only in the lint module), or (b) construct two syntax trees, one "concrete" that retains all punctuation and is later transformed into an abstract tree; the concrete tree could then be used for the semicolon checking (this could be used to other advantages as well)).

qx-bug-importer commented 12 years ago

Martin Wittemann (@wittemann) wrote:

I then mark the bug as wontfix. First, we will always have differences between our custom lint and the JSLint which is used by the playground. Additionally, checking for semicolons would be too much work to implement.