File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
csharp/ql/test/query-tests/Useless Code/IntGetHashCode Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,14 @@ class IntGetHashCode
3
3
void Test ( )
4
4
{
5
5
// These are all bad:
6
- default ( uint ) . GetHashCode ( ) ;
7
- default ( int ) . GetHashCode ( ) ;
8
- default ( long ) . GetHashCode ( ) ;
9
- default ( ulong ) . GetHashCode ( ) ;
10
- default ( short ) . GetHashCode ( ) ;
11
- default ( ushort ) . GetHashCode ( ) ;
12
- default ( byte ) . GetHashCode ( ) ;
13
- default ( sbyte ) . GetHashCode ( ) ;
6
+ default ( uint ) . GetHashCode ( ) ; // $ Alert
7
+ default ( int ) . GetHashCode ( ) ; // $ Alert
8
+ default ( long ) . GetHashCode ( ) ; // $ Alert
9
+ default ( ulong ) . GetHashCode ( ) ; // $ Alert
10
+ default ( short ) . GetHashCode ( ) ; // $ Alert
11
+ default ( ushort ) . GetHashCode ( ) ; // $ Alert
12
+ default ( byte ) . GetHashCode ( ) ; // $ Alert
13
+ default ( sbyte ) . GetHashCode ( ) ; // $ Alert
14
14
15
15
// These are all good:
16
16
default ( double ) . GetHashCode ( ) ;
Original file line number Diff line number Diff line change 1
- Useless code/IntGetHashCode.ql
1
+ query: Useless code/IntGetHashCode.ql
2
+ postprocess: utils/test/InlineExpectationsTestQuery.ql
You can’t perform that action at this time.
0 commit comments