forked from qt-creator/qt-creator
Doc: checking JavaScript syntax
Change-Id: Iad66cc619ed1027389569dea9bfd72bea6399af6 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
This commit is contained in:
@@ -346,6 +346,41 @@
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 Checking JavaScript Syntax
|
||||
|
||||
You can run static checks on JavaScript to find common problems, such as:
|
||||
|
||||
\list
|
||||
|
||||
\o Duplicate or conflicting variable, function, and formal parameter
|
||||
declarations
|
||||
|
||||
\o Variables and functions that are used before they are declared
|
||||
|
||||
\o Possibly unsafe uses of the == or != operators
|
||||
|
||||
\o Comma expressions, except in \c for statements
|
||||
|
||||
\o Expression statements, except function or method calls, assignments,
|
||||
or \c delete
|
||||
|
||||
\o Assignments within conditions (such as, \c {if (a = b)})
|
||||
|
||||
\o Case blocks within a switch that do not end with a return, break,
|
||||
continue, or throw and that are not empty
|
||||
|
||||
\o Nested block statements
|
||||
|
||||
\o \c with statements
|
||||
|
||||
\o \c void expressions
|
||||
|
||||
\endlist
|
||||
|
||||
To run the checks, select \gui {Tools > QML/JS > Run Checks} or press
|
||||
\key Ctrl+Shift+C. The results are shown in the \gui {QML Analysis}
|
||||
filter of the \gui {Issues} output pane.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user