Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc8eccf

Browse files
committed
C#: Add some basic qhelp. Since these are internal queries, this is probably not needed.
1 parent 75c19e3 commit fc8eccf

6 files changed

Lines changed: 79 additions & 4 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
6+
<overview>
7+
<p>
8+
This is an internal query that finds all compilation errors reported by the C# compiler.</p>
9+
</overview>
10+
11+
<recommendation>
12+
<p>
13+
Fix the cause of the compilation error.
14+
</p>
15+
</recommendation>
16+
17+
</qhelp>

csharp/ql/src/Diagnostics/CompilerError.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* @name Compilation error
3-
* @description A compilation error can lead to extraction problems, and may indicate
4-
* a bug in the extractor.
3+
* @description A compilation error can cause extraction problems, and could lead to inaccurate results.
54
* @kind problem
65
* @problem.severity recommendation
76
* @precision medium
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
6+
<overview>
7+
<p>
8+
This is an internal query that finds all messages reported by the compiler. This may include both compiler errors and
9+
compiler warnings. Compiler errors can lead to inaccurate results and should be fixed.
10+
</p>
11+
</overview>
12+
13+
<recommendation>
14+
<p>
15+
Fix the cause of the compilation error.
16+
</p>
17+
</recommendation>
18+
19+
</qhelp>

csharp/ql/src/Diagnostics/CompilerMessage.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
22
* @name Compilation message
3-
* @description A message emitted by the compiler.
3+
* @description A message emitted by the compiler, including warnings and errors.
44
* @kind problem
55
* @problem.severity recommendation
66
* @precision medium
7-
* @id cs/compilation-warning
7+
* @id cs/compilation-message
88
* @tags internal
99
*/
1010

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
6+
<overview>
7+
<p>
8+
This is an internal query that finds all errors reported by the C# extractor. It excludes results from files containing
9+
compilation errors, because these errors are likely to be caused by the compilation error rather than due to an internal
10+
error in the extractor.
11+
</p>
12+
13+
<p>Extractor errors can lead to inaccurate results.</p>
14+
</overview>
15+
16+
<recommendation>
17+
<p>
18+
Report extractor errors to Semmle.
19+
</p>
20+
</recommendation>
21+
22+
</qhelp>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
6+
<overview>
7+
<p>
8+
This is an internal query that finds all messages reported by the extractor. These results may include extraction errors
9+
that are caused by compilation errors.
10+
</p>
11+
<p>
12+
Extractor errors can lead to inaccurate results.
13+
</p>
14+
</overview>
15+
16+
<recommendation></recommendation>
17+
18+
</qhelp>

0 commit comments

Comments
 (0)