Skip to content

Commit 90f013d

Browse files
authored
Merge pull request #4176 from aibaars/missing-qhelp
Add missing QHelp files
2 parents 2c0e9f0 + aedfa47 commit 90f013d

File tree

50 files changed

+754
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+754
-16
lines changed

config/identical-files.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,5 +335,50 @@
335335
"java/ql/src/semmle/code/xml/XML.qll",
336336
"javascript/ql/src/semmle/javascript/XML.qll",
337337
"python/ql/src/semmle/python/xml/XML.qll"
338+
],
339+
"DuplicationProblems.qhelp": [
340+
"cpp/ql/src/Metrics/Files/DuplicationProblems.qhelp",
341+
"csharp/ql/src/Metrics/Files/DuplicationProblems.qhelp",
342+
"javascript/ql/src/Metrics/DuplicationProblems.qhelp",
343+
"python/ql/src/Metrics/DuplicationProblems.qhelp"
344+
],
345+
"CommentedOutCodeQuery.qhelp": [
346+
"cpp/ql/src/Documentation/CommentedOutCodeQuery.qhelp",
347+
"python/ql/src/Lexical/CommentedOutCodeQuery.qhelp",
348+
"csharp/ql/src/Bad Practices/Comments/CommentedOutCodeQuery.qhelp",
349+
"java/ql/src/Violations of Best Practice/Comments/CommentedOutCodeQuery.qhelp",
350+
"javascript/ql/src/Comments/CommentedOutCodeQuery.qhelp"
351+
],
352+
"FLinesOfCodeReferences.qhelp": [
353+
"java/ql/src/Metrics/Files/FLinesOfCodeReferences.qhelp",
354+
"javascript/ql/src/Metrics/FLinesOfCodeReferences.qhelp"
355+
],
356+
"FCommentRatioCommon.qhelp": [
357+
"java/ql/src/Metrics/Files/FCommentRatioCommon.qhelp",
358+
"javascript/ql/src/Metrics/FCommentRatioCommon.qhelp"
359+
],
360+
"FLinesOfCodeOverview.qhelp": [
361+
"java/ql/src/Metrics/Files/FLinesOfCodeOverview.qhelp",
362+
"javascript/ql/src/Metrics/FLinesOfCodeOverview.qhelp"
363+
],
364+
"CommentedOutCodeMetricOverview.qhelp": [
365+
"cpp/ql/src/Metrics/Files/CommentedOutCodeMetricOverview.qhelp",
366+
"csharp/ql/src/Metrics/Files/CommentedOutCodeMetricOverview.qhelp",
367+
"java/ql/src/Metrics/Files/CommentedOutCodeMetricOverview.qhelp",
368+
"javascript/ql/src/Comments/CommentedOutCodeMetricOverview.qhelp",
369+
"python/ql/src/Lexical/CommentedOutCodeMetricOverview.qhelp"
370+
],
371+
"FLinesOfDuplicatedCodeCommon.qhelp": [
372+
"cpp/ql/src/Metrics/Files/FLinesOfDuplicatedCodeCommon.qhelp",
373+
"java/ql/src/Metrics/Files/FLinesOfDuplicatedCodeCommon.qhelp",
374+
"javascript/ql/src/Metrics/FLinesOfDuplicatedCodeCommon.qhelp",
375+
"python/ql/src/Metrics/FLinesOfDuplicatedCodeCommon.qhelp"
376+
],
377+
"CommentedOutCodeReferences.qhelp": [
378+
"cpp/ql/src/Metrics/Files/CommentedOutCodeReferences.qhelp",
379+
"csharp/ql/src/Metrics/Files/CommentedOutCodeReferences.qhelp",
380+
"java/ql/src/Metrics/Files/CommentedOutCodeReferences.qhelp",
381+
"javascript/ql/src/Comments/CommentedOutCodeReferences.qhelp",
382+
"python/ql/src/Lexical/CommentedOutCodeReferences.qhelp"
338383
]
339384
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
<fragment>
6+
<warning>
7+
This check is an approximation, so some results may not be actual defects in the program.
8+
It is not possible in general to compute the exact value of the variable without running the program with all possible input data.
9+
</warning>
10+
</fragment>
11+
</qhelp>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
<fragment>
6+
<warning>
7+
This check is an approximation, so some results may not be actual defects in the program.
8+
It is not possible in general to compute which function is actually called in a virtual call,
9+
or a call through a pointer, without running the program with all possible input data.
10+
</warning>
11+
</fragment>
12+
</qhelp>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
<fragment>
6+
<warning>
7+
This check is an approximation, so some results may not be actual defects in the program.
8+
It is not possible in general to compute the actual branch taken in conditional statements such
9+
as "if" without running the program with all possible input data. This means that it is not possible
10+
to determine if a particular statement is going to be executed.
11+
</warning>
12+
</fragment>
13+
</qhelp>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
<fragment>
6+
<warning>
7+
This check is an approximation, so some results may not be actual defects in the program. It is not possible
8+
in general to compute the values of pointers without running the program with all input data.
9+
</warning>
10+
</fragment>
11+
</qhelp>

cpp/ql/src/Documentation/CommentedOutCode.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"qhelp.dtd">
44
<qhelp>
55
<include src="CommentedOutCodeQuery.qhelp" />
6-
<include src="CommentedOutCodeReferences.qhelp" />
6+
<include src="../Metrics/Files/CommentedOutCodeReferences.qhelp" />
77
</qhelp>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
6+
<overview>
7+
<p>
8+
Commented-out code is distracting and confusing for developers who read the surrounding code,
9+
and its significance is often unclear. It will not get compiled or tested when the code around
10+
it changes, so it's likely to break over time. For these reasons, commented-out code should be
11+
avoided.
12+
</p>
13+
14+
</overview>
15+
16+
<recommendation>
17+
18+
<p>
19+
Remove or reinstate the commented-out code. If you want to include a snippet of example code
20+
in a comment, consider enclosing it in quotes or marking it up as appropriate for the source
21+
language.
22+
</p>
23+
24+
</recommendation>
25+
</qhelp>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
<overview>
6+
<p>
7+
This metric counts the number of lines of commented-out code in each file. Large amounts of
8+
commented-out code often indicate poorly maintained code.
9+
</p>
10+
11+
</overview>
12+
</qhelp>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
<references>
6+
7+
<li>Mark Needham: <a href="http://www.markhneedham.com/blog/2009/01/17/the-danger-of-commenting-out-code/">The danger of commenting out code</a>.</li>
8+
<li>Los Techies: <a href="http://lostechies.com/rodpaddock/2010/12/29/commented-code-technical-debt">Commented Code == Technical Debt</a>.</li>
9+
<li>High Integrity C++ Coding Standard: <a href="http://www.codingstandard.com/rule/2-3-2-do-not-comment-out-code/">2.3.2 Do not comment out code</a>.</li>
10+
11+
</references>
12+
</qhelp>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
<overview>
6+
<p>
7+
Duplicated code increases overall code size, making the code base
8+
harder to maintain and harder to understand. It also becomes harder to fix bugs,
9+
since a programmer applying a fix to one copy has to always remember to update
10+
other copies accordingly. Finally, code duplication is generally an indication of
11+
a poorly designed or hastily written code base, which typically suffers from other
12+
problems as well.
13+
</p>
14+
15+
</overview>
16+
</qhelp>

0 commit comments

Comments
 (0)