mirror of
https://github.com/github/codeql.git
synced 2026-01-06 03:00:24 +01:00
36 lines
908 B
XML
36 lines
908 B
XML
<!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>
|