зеркало из https://github.com/github/codeql.git
Merge pull request #673 from calumgrant/cs/sync-files
C#: Sync samples and qltest cases
This commit is contained in:
Коммит
41a48078f7
|
@ -225,8 +225,8 @@
|
|||
| NullAlwaysBad.cs:9:17:9:25 | ... != ... | false | NullAlwaysBad.cs:9:22:9:25 | null | NullAlwaysBad.cs:9:17:9:17 | access to parameter s |
|
||||
| NullAlwaysGood.cs:9:17:9:25 | ... != ... | false | NullAlwaysGood.cs:9:17:9:17 | access to parameter s | NullAlwaysGood.cs:9:22:9:25 | null |
|
||||
| NullAlwaysGood.cs:9:17:9:25 | ... != ... | false | NullAlwaysGood.cs:9:22:9:25 | null | NullAlwaysGood.cs:9:17:9:17 | access to parameter s |
|
||||
| NullMaybeGood.cs:9:17:9:25 | ... != ... | false | NullMaybeGood.cs:9:17:9:17 | access to parameter o | NullMaybeGood.cs:9:22:9:25 | null |
|
||||
| NullMaybeGood.cs:9:17:9:25 | ... != ... | false | NullMaybeGood.cs:9:22:9:25 | null | NullMaybeGood.cs:9:17:9:17 | access to parameter o |
|
||||
| NullMaybeGood.cs:7:13:7:21 | ... != ... | false | NullMaybeGood.cs:7:13:7:13 | access to parameter o | NullMaybeGood.cs:7:18:7:21 | null |
|
||||
| NullMaybeGood.cs:7:13:7:21 | ... != ... | false | NullMaybeGood.cs:7:18:7:21 | null | NullMaybeGood.cs:7:13:7:13 | access to parameter o |
|
||||
| StringConcatenation.cs:15:16:15:22 | ... != ... | false | StringConcatenation.cs:15:16:15:16 | access to local variable s | StringConcatenation.cs:15:21:15:22 | "" |
|
||||
| StringConcatenation.cs:15:16:15:22 | ... != ... | false | StringConcatenation.cs:15:21:15:22 | "" | StringConcatenation.cs:15:16:15:16 | access to local variable s |
|
||||
| StringConcatenation.cs:22:16:22:22 | ... != ... | false | StringConcatenation.cs:22:16:22:16 | access to local variable s | StringConcatenation.cs:22:21:22:22 | "" |
|
||||
|
|
|
@ -1580,8 +1580,8 @@
|
|||
| NullAlwaysGood.cs:9:17:9:25 | ... != ... | true | NullAlwaysGood.cs:9:17:9:17 | access to parameter s | non-null |
|
||||
| NullAlwaysGood.cs:9:17:9:41 | ... && ... | true | NullAlwaysGood.cs:9:17:9:25 | ... != ... | true |
|
||||
| NullAlwaysGood.cs:9:17:9:41 | ... && ... | true | NullAlwaysGood.cs:9:30:9:41 | ... > ... | true |
|
||||
| NullMaybeGood.cs:9:17:9:25 | ... != ... | false | NullMaybeGood.cs:9:17:9:17 | access to parameter o | null |
|
||||
| NullMaybeGood.cs:9:17:9:25 | ... != ... | true | NullMaybeGood.cs:9:17:9:17 | access to parameter o | non-null |
|
||||
| NullMaybeGood.cs:7:13:7:21 | ... != ... | false | NullMaybeGood.cs:7:13:7:13 | access to parameter o | null |
|
||||
| NullMaybeGood.cs:7:13:7:21 | ... != ... | true | NullMaybeGood.cs:7:13:7:13 | access to parameter o | non-null |
|
||||
| StringConcatenation.cs:7:16:7:23 | String s = ... | non-null | StringConcatenation.cs:7:16:7:16 | access to local variable s | non-null |
|
||||
| StringConcatenation.cs:7:16:7:23 | String s = ... | null | StringConcatenation.cs:7:16:7:16 | access to local variable s | null |
|
||||
| StringConcatenation.cs:8:9:8:9 | access to local variable s | non-null | StringConcatenation.cs:7:20:7:23 | null | non-null |
|
||||
|
|
|
@ -239,7 +239,7 @@
|
|||
| NullAlwaysBad.cs:9:17:9:25 | ... != ... | NullAlwaysBad.cs:9:17:9:17 | access to parameter s | true | false |
|
||||
| NullAlwaysGood.cs:9:17:9:25 | ... != ... | NullAlwaysGood.cs:9:17:9:17 | access to parameter s | false | true |
|
||||
| NullAlwaysGood.cs:9:17:9:25 | ... != ... | NullAlwaysGood.cs:9:17:9:17 | access to parameter s | true | false |
|
||||
| NullMaybeGood.cs:9:17:9:25 | ... != ... | NullMaybeGood.cs:9:17:9:17 | access to parameter o | false | true |
|
||||
| NullMaybeGood.cs:9:17:9:25 | ... != ... | NullMaybeGood.cs:9:17:9:17 | access to parameter o | true | false |
|
||||
| NullMaybeGood.cs:7:13:7:21 | ... != ... | NullMaybeGood.cs:7:13:7:13 | access to parameter o | false | true |
|
||||
| NullMaybeGood.cs:7:13:7:21 | ... != ... | NullMaybeGood.cs:7:13:7:13 | access to parameter o | true | false |
|
||||
| StringConcatenation.cs:15:16:15:22 | ... != ... | StringConcatenation.cs:15:16:15:16 | access to local variable s | false | false |
|
||||
| StringConcatenation.cs:22:16:22:22 | ... != ... | StringConcatenation.cs:22:16:22:16 | access to local variable s | false | false |
|
||||
|
|
|
@ -69,5 +69,5 @@
|
|||
| E.cs:235:16:235:16 | access to parameter i | Variable $@ may be null here because it has a nullable type. | E.cs:233:26:233:26 | i | i | E.cs:233:26:233:26 | i | this |
|
||||
| E.cs:240:21:240:21 | access to parameter i | Variable $@ may be null here because it has a nullable type. | E.cs:238:26:238:26 | i | i | E.cs:238:26:238:26 | i | this |
|
||||
| GuardedString.cs:35:31:35:31 | access to local variable s | Variable $@ may be null here because of $@ assignment. | GuardedString.cs:7:16:7:16 | s | s | GuardedString.cs:7:16:7:32 | String s = ... | this |
|
||||
| NullMaybeBad.cs:9:31:9:31 | access to parameter o | Variable $@ may be null here because of $@ null argument. | NullMaybeBad.cs:7:29:7:29 | o | o | NullMaybeBad.cs:15:21:15:24 | null | this |
|
||||
| NullMaybeBad.cs:7:27:7:27 | access to parameter o | Variable $@ may be null here because of $@ null argument. | NullMaybeBad.cs:5:25:5:25 | o | o | NullMaybeBad.cs:13:17:13:20 | null | this |
|
||||
| StringConcatenation.cs:16:17:16:17 | access to local variable s | Variable $@ may be null here because of $@ assignment. | StringConcatenation.cs:14:16:14:16 | s | s | StringConcatenation.cs:14:16:14:23 | String s = ... | this |
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
using System;
|
||||
|
||||
namespace NullMaybe
|
||||
class Bad
|
||||
{
|
||||
class Bad
|
||||
void DoPrint(object o)
|
||||
{
|
||||
void DoPrint(object o)
|
||||
{
|
||||
Console.WriteLine(o.ToString());
|
||||
}
|
||||
Console.WriteLine(o.ToString());
|
||||
}
|
||||
|
||||
void M()
|
||||
{
|
||||
DoPrint("Hello");
|
||||
DoPrint(null);
|
||||
}
|
||||
void M()
|
||||
{
|
||||
DoPrint("Hello");
|
||||
DoPrint(null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
using System;
|
||||
|
||||
namespace NullMaybe
|
||||
class Good
|
||||
{
|
||||
class Good
|
||||
void DoPrint(object o)
|
||||
{
|
||||
void DoPrint(object o)
|
||||
{
|
||||
if (o != null)
|
||||
Console.WriteLine(o.ToString());
|
||||
}
|
||||
if (o != null)
|
||||
Console.WriteLine(o.ToString());
|
||||
}
|
||||
|
||||
void M()
|
||||
{
|
||||
DoPrint("Hello");
|
||||
DoPrint(null);
|
||||
}
|
||||
void M()
|
||||
{
|
||||
DoPrint("Hello");
|
||||
DoPrint(null);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче