mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
QL code and tests for C#/C++/JavaScript.
This commit is contained in:
35
javascript/ql/src/Expressions/MissingSpaceInAppend.qhelp
Normal file
35
javascript/ql/src/Expressions/MissingSpaceInAppend.qhelp
Normal file
@@ -0,0 +1,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>
|
||||
Reference in New Issue
Block a user