mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
Java: Use .inc.qhelp extension for included help files
This commit is contained in:
@@ -4,6 +4,6 @@
|
||||
<qhelp>
|
||||
|
||||
|
||||
<include src="Generics_Common.qhelp" />
|
||||
<include src="Generics_Common.inc.qhelp" />
|
||||
|
||||
</qhelp>
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
<qhelp>
|
||||
|
||||
|
||||
<include src="Generics_Common.qhelp" />
|
||||
<include src="Generics_Common.inc.qhelp" />
|
||||
|
||||
</qhelp>
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
<qhelp>
|
||||
|
||||
|
||||
<include src="Generics_Common.qhelp" />
|
||||
<include src="Generics_Common.inc.qhelp" />
|
||||
|
||||
</qhelp>
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<include src="UnusedMavenDependency.qhelp" />
|
||||
<include src="UnusedMavenDependency.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<include src="UnusedMavenDependency.qhelp" />
|
||||
<include src="UnusedMavenDependency.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<p>
|
||||
Classes that are never used at runtime are redundant and should be removed.
|
||||
</p>
|
||||
<include src="DeadCodeSummary.qhelp"/>
|
||||
<include src="DeadCodeSummary.inc.qhelp"/>
|
||||
<p>
|
||||
Classes are considered dead if at runtime:
|
||||
</p>
|
||||
@@ -26,7 +26,7 @@ fields, methods and nested classes - it is never instantiated, has no public con
|
||||
instance methods. If a class is considered to be a namespace class, then it is live if at least one
|
||||
of the static members of that class is live - including static nested classes.
|
||||
</p>
|
||||
<include src="DeadCodeDetails.qhelp"/>
|
||||
<include src="DeadCodeDetails.inc.qhelp"/>
|
||||
</overview>
|
||||
<recommendation>
|
||||
<p>
|
||||
@@ -48,7 +48,7 @@ if there are some live nested classes within the dead class, the class can be re
|
||||
converting all live nested classes to static members, and removing all instance methods and fields,
|
||||
and all dead static members (see Example 2).
|
||||
</p>
|
||||
<include src="DeadCodeExtraEntryPoints.qhelp"/>
|
||||
<include src="DeadCodeExtraEntryPoints.inc.qhelp"/>
|
||||
</recommendation>
|
||||
<section title="Example 1">
|
||||
<p>
|
||||
@@ -95,5 +95,5 @@ Taking the second approach, this is the final result.
|
||||
</p>
|
||||
<sample src="NamespaceClass2.java" />
|
||||
</section>
|
||||
<include src="DeadCodeReferences.qhelp" />
|
||||
<include src="DeadCodeReferences.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<p>
|
||||
Enum constants that are never used at runtime are redundant and should be removed.
|
||||
</p>
|
||||
<include src="DeadCodeSummary.qhelp"/>
|
||||
<include src="DeadCodeSummary.inc.qhelp"/>
|
||||
<p>
|
||||
An enum constant is considered dead if at runtime it is never used, or only used in comparisons. Any
|
||||
enum constant which is not dead is considered to be "live".
|
||||
@@ -17,7 +17,7 @@ An enum constant that is only used in a comparison is considered dead because th
|
||||
always produce the same result. This is because no variable holds the value of the enum constant,
|
||||
so the comparison of any variable against the constant will always return the same result.
|
||||
</p>
|
||||
<include src="DeadCodeDetails.qhelp"/>
|
||||
<include src="DeadCodeDetails.inc.qhelp"/>
|
||||
</overview>
|
||||
<recommendation>
|
||||
<p>
|
||||
@@ -32,7 +32,7 @@ After confirming that the enum constant is not required, remove the enum constan
|
||||
need to remove any references to this enum constant, which may, in turn, require removing other dead
|
||||
code.
|
||||
</p>
|
||||
<include src="DeadCodeExtraEntryPoints.qhelp"/>
|
||||
<include src="DeadCodeExtraEntryPoints.inc.qhelp"/>
|
||||
</recommendation>
|
||||
<example>
|
||||
<p>
|
||||
@@ -51,5 +51,5 @@ stored or returned anywhere in the program. Therefore, <code>ERROR</code> is dea
|
||||
along with the comparison check, and the <code>exit(1);</code>.
|
||||
</p>
|
||||
</example>
|
||||
<include src="DeadCodeReferences.qhelp" />
|
||||
<include src="DeadCodeReferences.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<p>
|
||||
Fields that are never read at runtime are unnecessary and should be removed.
|
||||
</p>
|
||||
<include src="DeadCodeSummary.qhelp"/>
|
||||
<include src="DeadCodeSummary.inc.qhelp"/>
|
||||
<p>
|
||||
Fields are considered dead if at runtime they are never read directly or indirectly, for example
|
||||
through a framework or a use of reflection. Any field which is not dead is considered to be "live".
|
||||
@@ -15,7 +15,7 @@ through a framework or a use of reflection. Any field which is not dead is consi
|
||||
<p>
|
||||
Fields are considered to be dead if they are only written to, and never read.
|
||||
</p>
|
||||
<include src="DeadCodeDetails.qhelp"/>
|
||||
<include src="DeadCodeDetails.inc.qhelp"/>
|
||||
</overview>
|
||||
<recommendation>
|
||||
<p>
|
||||
@@ -30,7 +30,7 @@ After confirming that the field is not required, remove the field. You will also
|
||||
references to this field, which may, in turn, require removing other unused classes, methods
|
||||
and fields.
|
||||
</p>
|
||||
<include src="DeadCodeExtraEntryPoints.qhelp"/>
|
||||
<include src="DeadCodeExtraEntryPoints.inc.qhelp"/>
|
||||
</recommendation>
|
||||
<section title="Example 1">
|
||||
<p>
|
||||
@@ -64,5 +64,5 @@ the contents of the object in an XML file, or to construct an instance of the ob
|
||||
file. The field is therefore considered to be read at runtime, which makes the field live.
|
||||
</p>
|
||||
</section>
|
||||
<include src="DeadCodeReferences.qhelp" />
|
||||
<include src="DeadCodeReferences.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<p>
|
||||
Methods that are never called at runtime are redundant and should be removed.
|
||||
</p>
|
||||
<include src="DeadCodeSummary.qhelp"/>
|
||||
<include src="DeadCodeSummary.inc.qhelp"/>
|
||||
<p>
|
||||
Methods are considered dead if at runtime they are never called, either directly, by a method call,
|
||||
or indirectly, through a framework or use of reflection. Any method which is not dead is considered
|
||||
@@ -18,7 +18,7 @@ The results can include methods, constructors and initializers. Initializers com
|
||||
instance initializers and static initializers. For each class there will be at most one dead
|
||||
initializer of each type, representing all the initialization of that type in the class.
|
||||
</p>
|
||||
<include src="DeadCodeDetails.qhelp"/>
|
||||
<include src="DeadCodeDetails.inc.qhelp"/>
|
||||
</overview>
|
||||
<recommendation>
|
||||
<p>
|
||||
@@ -47,7 +47,7 @@ and initializers on instance fields are dead. In addition, the lack of instance
|
||||
implies that the class is never constructed, which means that all instance methods and fields are
|
||||
also dead and can be removed. These methods and fields will also be reported separately.
|
||||
</p>
|
||||
<include src="DeadCodeExtraEntryPoints.qhelp"/>
|
||||
<include src="DeadCodeExtraEntryPoints.inc.qhelp"/>
|
||||
</recommendation>
|
||||
<section title="Example 1">
|
||||
<p>
|
||||
@@ -77,5 +77,5 @@ framework when running the tests. <code>testCustomer</code> and <code>setUp</cod
|
||||
considered to be "live".
|
||||
</p>
|
||||
</section>
|
||||
<include src="DeadCodeReferences.qhelp" />
|
||||
<include src="DeadCodeReferences.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<overview>
|
||||
<include src="DeadCodeSummary.qhelp"/>
|
||||
<include src="DeadCodeDetails.qhelp"/>
|
||||
<include src="DeadCodeSummary.inc.qhelp"/>
|
||||
<include src="DeadCodeDetails.inc.qhelp"/>
|
||||
</overview>
|
||||
<recommendation>
|
||||
<p>
|
||||
@@ -13,5 +13,5 @@ can see which classes, methods and fields contribute to this metric using the ru
|
||||
analysis.
|
||||
</p>
|
||||
</recommendation>
|
||||
<include src="DeadCodeReferences.qhelp" />
|
||||
<include src="DeadCodeReferences.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
@@ -35,5 +35,5 @@ parameter <code>name</code> is not used within the body of the method. The param
|
||||
as useless, and can be removed from the program.
|
||||
</p>
|
||||
</example>
|
||||
<include src="DeadCodeReferences.qhelp" />
|
||||
<include src="DeadCodeReferences.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
|
||||
<include src="IterableOverview.qhelp" />
|
||||
<include src="IterableOverview.inc.qhelp" />
|
||||
|
||||
<recommendation>
|
||||
<p>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
|
||||
<include src="IterableOverview.qhelp" />
|
||||
<include src="IterableOverview.inc.qhelp" />
|
||||
|
||||
<recommendation>
|
||||
<p>
|
||||
|
||||
@@ -12,7 +12,7 @@ the contract for <code>Cloneable</code>.
|
||||
</p>
|
||||
|
||||
</overview>
|
||||
<include src="MissingCloneDetails.qhelp" />
|
||||
<include src="MissingCloneDetails.inc.qhelp" />
|
||||
|
||||
<recommendation>
|
||||
<p>
|
||||
|
||||
@@ -12,7 +12,7 @@ that does not have a <code>clone</code> method indicates that the class is break
|
||||
</p>
|
||||
|
||||
</overview>
|
||||
<include src="MissingCloneDetails.qhelp" />
|
||||
<include src="MissingCloneDetails.inc.qhelp" />
|
||||
|
||||
<recommendation>
|
||||
<p>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
|
||||
<include src="DoubleCheckedLockingShared.qhelp" />
|
||||
<include src="DoubleCheckedLockingShared.inc.qhelp" />
|
||||
|
||||
</qhelp>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
|
||||
<include src="DoubleCheckedLockingShared.qhelp" />
|
||||
<include src="DoubleCheckedLockingShared.inc.qhelp" />
|
||||
|
||||
</qhelp>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
|
||||
<include src="FormatStringsOverview.qhelp" />
|
||||
<include src="FormatStringsOverview.inc.qhelp" />
|
||||
|
||||
<recommendation>
|
||||
<p>
|
||||
@@ -22,6 +22,6 @@ format string refers to two arguments, so this will throw an
|
||||
|
||||
</example>
|
||||
|
||||
<include src="FormatStringsRefs.qhelp" />
|
||||
<include src="FormatStringsRefs.inc.qhelp" />
|
||||
|
||||
</qhelp>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
|
||||
<include src="FormatStringsOverview.qhelp" />
|
||||
<include src="FormatStringsOverview.inc.qhelp" />
|
||||
|
||||
<recommendation>
|
||||
<p>
|
||||
@@ -21,6 +21,6 @@ third argument.
|
||||
|
||||
</example>
|
||||
|
||||
<include src="FormatStringsRefs.qhelp" />
|
||||
<include src="FormatStringsRefs.inc.qhelp" />
|
||||
|
||||
</qhelp>
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<include src="FCommentRatioCommon.qhelp" />
|
||||
<include src="FCommentRatioCommon.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<overview>
|
||||
<include src="FLinesOfCodeOverview.qhelp" />
|
||||
<include src="FLinesOfCodeOverview.inc.qhelp" />
|
||||
</overview>
|
||||
|
||||
<recommendation>
|
||||
@@ -36,5 +36,5 @@ will not be maintained by a programmer.
|
||||
</ul>
|
||||
|
||||
</recommendation>
|
||||
<include src="FLinesOfCodeReferences.qhelp" />
|
||||
<include src="FLinesOfCodeReferences.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<include src="CommentedOutCodeMetricOverview.qhelp" />
|
||||
<include src="CommentedOutCodeReferences.qhelp" />
|
||||
<include src="CommentedOutCodeMetricOverview.inc.qhelp" />
|
||||
<include src="CommentedOutCodeReferences.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<include src="FLinesOfDuplicatedCodeCommon.qhelp" />
|
||||
<include src="FLinesOfDuplicatedCodeCommon.inc.qhelp" />
|
||||
</qhelp>
|
||||
@@ -14,7 +14,7 @@ for a number of reasons.
|
||||
</p>
|
||||
|
||||
</overview>
|
||||
<include src="DuplicationProblems.qhelp" />
|
||||
<include src="DuplicationProblems.inc.qhelp" />
|
||||
|
||||
<recommendation>
|
||||
|
||||
@@ -10,7 +10,7 @@ duplicated code.
|
||||
</p>
|
||||
|
||||
</overview>
|
||||
<include src="DuplicationProblems.qhelp" />
|
||||
<include src="DuplicationProblems.inc.qhelp" />
|
||||
|
||||
<recommendation>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ SQL and the Java Persistence Query Language.</p>
|
||||
</overview>
|
||||
<recommendation>
|
||||
|
||||
<include src="HowToAddress.qhelp" />
|
||||
<include src="HowToAddress.inc.qhelp" />
|
||||
|
||||
</recommendation>
|
||||
<example>
|
||||
|
||||
@@ -13,7 +13,7 @@ it enough to cause the SQL query to fail to run.</p>
|
||||
</overview>
|
||||
<recommendation>
|
||||
|
||||
<include src="HowToAddress.qhelp" />
|
||||
<include src="HowToAddress.inc.qhelp" />
|
||||
|
||||
</recommendation>
|
||||
<example>
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<include src="CleartextStorage.qhelp" /></qhelp>
|
||||
<include src="CleartextStorage.inc.qhelp" /></qhelp>
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<include src="CleartextStorage.qhelp" /></qhelp>
|
||||
<include src="CleartextStorage.inc.qhelp" /></qhelp>
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<include src="CleartextStorage.qhelp" /></qhelp>
|
||||
<include src="CleartextStorage.inc.qhelp" /></qhelp>
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<include src="CommentedOutCodeQuery.qhelp" />
|
||||
<include src="../../Metrics/Files/CommentedOutCodeReferences.qhelp" />
|
||||
<include src="CommentedOutCodeQuery.inc.qhelp" />
|
||||
<include src="../../Metrics/Files/CommentedOutCodeReferences.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
@@ -19,5 +19,5 @@ it is important to keep this to preserve the overall behavior.</p>
|
||||
|
||||
</recommendation>
|
||||
|
||||
<include src="../../DeadCode/DeadCodeReferences.qhelp" />
|
||||
<include src="../../DeadCode/DeadCodeReferences.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
@@ -19,6 +19,6 @@ it is important to keep this to preserve the overall behavior.</p>
|
||||
|
||||
</recommendation>
|
||||
|
||||
<include src="../../DeadCode/DeadCodeReferences.qhelp" />
|
||||
<include src="../../DeadCode/DeadCodeReferences.inc.qhelp" />
|
||||
|
||||
</qhelp>
|
||||
|
||||
@@ -17,5 +17,5 @@ needed.</p>
|
||||
|
||||
</recommendation>
|
||||
|
||||
<include src="../../DeadCode/DeadCodeReferences.qhelp" />
|
||||
<include src="../../DeadCode/DeadCodeReferences.inc.qhelp" />
|
||||
</qhelp>
|
||||
|
||||
Reference in New Issue
Block a user