forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnreachableCode.qhelp
More file actions
27 lines (21 loc) · 831 Bytes
/
UnreachableCode.qhelp
File metadata and controls
27 lines (21 loc) · 831 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
<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>Unreachable code makes the code more difficult to understand and may slow down loading of modules.</p>
</overview>
<recommendation>
<p>Deleting the unreachable code will make the code clearer and preserve the meaning of the code.
However, it is possible that the original intention was that the code should execute and that it is
unreachable signifies some other error.</p>
</recommendation>
<example>
<p>In this example the assignment to <code>remainder</code> is never reached because there is a <code>
return</code> statement on the previous line.</p>
<sample src="UnreachableCode.py" />
</example>
<references>
<li>Wikipedia: <a href="http://en.wikipedia.org/wiki/Unreachable_code">Unreachable Code</a>.</li>
</references>
</qhelp>