mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C#: Convert tests cs/useless-gethashcode-call to inline tests.
This commit is contained in:
@@ -3,14 +3,14 @@ class IntGetHashCode
|
|||||||
void Test()
|
void Test()
|
||||||
{
|
{
|
||||||
// These are all bad:
|
// These are all bad:
|
||||||
default(uint).GetHashCode();
|
default(uint).GetHashCode(); // $ Alert
|
||||||
default(int).GetHashCode();
|
default(int).GetHashCode(); // $ Alert
|
||||||
default(long).GetHashCode();
|
default(long).GetHashCode(); // $ Alert
|
||||||
default(ulong).GetHashCode();
|
default(ulong).GetHashCode(); // $ Alert
|
||||||
default(short).GetHashCode();
|
default(short).GetHashCode(); // $ Alert
|
||||||
default(ushort).GetHashCode();
|
default(ushort).GetHashCode(); // $ Alert
|
||||||
default(byte).GetHashCode();
|
default(byte).GetHashCode(); // $ Alert
|
||||||
default(sbyte).GetHashCode();
|
default(sbyte).GetHashCode(); // $ Alert
|
||||||
|
|
||||||
// These are all good:
|
// These are all good:
|
||||||
default(double).GetHashCode();
|
default(double).GetHashCode();
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
Useless code/IntGetHashCode.ql
|
query: Useless code/IntGetHashCode.ql
|
||||||
|
postprocess: utils/test/InlineExpectationsTestQuery.ql
|
||||||
|
|||||||
Reference in New Issue
Block a user