Update Python and C# help for commented-out code to use common qhelp

This commit is contained in:
Felicity Chapman
2019-07-15 09:26:17 +01:00
parent e1454abaf4
commit cb48af7395
6 changed files with 23 additions and 51 deletions

View File

@@ -3,5 +3,6 @@
"qhelp.dtd">
<qhelp>
<include src="CommentedOutCodeQuery.qhelp" />
<include src="CommentedOutCodeCommon.qhelp" />
<include src="CommentedOutCodeExample.qhelp" />
<include src="CommentedOutCodeReferences.qhelp" />
</qhelp>

View File

@@ -1,6 +1,6 @@
/**
* @name Commented out code
* @description Commented out code causes visual clutter as it is neither code nor comment.
* @name Commented-out code
* @description Commented-out code makes the remaining code more difficult to read.
* @kind problem
* @tags maintainability
* readability

View File

@@ -1,28 +0,0 @@
<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<recommendation>
<p>
Remove the commented-out code, or reinstate it if necessary. If you want to include a snippet
of example code in a comment, consider adding an <code>@example</code> tag or enclosing the code
in a <code>code</code> or <code>pre</code> element.
</p>
</recommendation>
<example>
<p>
In the following example, a <code>print</code> statement, originally used
for debugging, is left in the code, but commented out. It should be removed altogether.
</p>
<sample src="CommentedOutCode.py" />
</example>
<references>
<li>Los Techies: <a href="http://lostechies.com/rodpaddock/2010/12/29/commented-code-technical-debt">Commented Code == Technical Debt</a>.</li>
</references>
</qhelp>

View File

@@ -0,0 +1,16 @@
<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<example>
<p>
In the following example, a <code>print</code> statement, originally used
for debugging, is left in the code, but commented out. It should be removed altogether.
</p>
<sample src="CommentedOutCode.py" />
</example>
</qhelp>