forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMissingSpaceInAppend.qhelp
More file actions
35 lines (30 loc) · 908 Bytes
/
MissingSpaceInAppend.qhelp
File metadata and controls
35 lines (30 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>
Splitting a long string literal over multiple lines can often aid readability,
but this also makes it difficult to notice whether a space is missing where the
strings are concatenated.
</p>
</overview>
<recommendation>
<p>
Check the string literal to see whether it has the intended text.
In particular, look for missing spaces near line breaks.
</p>
</recommendation>
<example>
<p>
The following example shows a text literal that is split over two lines and
omits a space character between the two words at the line break.
</p>
<sample src="examples/MissingSpaceInAppend.js" />
</example>
<references>
<li>Mozilla Developer Network:
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#Long_literal_strings">Strings: Long literal strings</a>.
</li>
</references>
</qhelp>