mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
C#: Simplify the output of cs/wrong-compareto-signature to remove entity locations
This commit is contained in:
@@ -40,6 +40,5 @@ where
|
||||
compareToMethod(m, actualParamType) and
|
||||
not implementsIComparable(declaringType, actualParamType)
|
||||
select m,
|
||||
"The parameter of this 'CompareTo' method is of type $@, but $@ does not implement 'IComparable<$@>'.",
|
||||
actualParamType, actualParamType.getName(), declaringType, declaringType.getName(),
|
||||
actualParamType, actualParamType.getName()
|
||||
"The parameter of this 'CompareTo' method is of type '" + actualParamType.getName() +
|
||||
"', but the declaring type does not implement 'IComparable<" + actualParamType.getName() + ">'."
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
| IncorrectCompareToSignature.cs:5:16:5:24 | CompareTo | The parameter of this 'CompareTo' method is of type $@, but $@ does not implement 'IComparable<$@>'. | IncorrectCompareToSignature.cs:3:10:3:10 | T | T | IncorrectCompareToSignature.cs:3:7:3:11 | C1`1 | C1`1 | IncorrectCompareToSignature.cs:3:10:3:10 | T | T |
|
||||
| IncorrectCompareToSignatureBad.cs:5:16:5:24 | CompareTo | The parameter of this 'CompareTo' method is of type $@, but $@ does not implement 'IComparable<$@>'. | IncorrectCompareToSignatureBad.cs:3:7:3:9 | Bad | Bad | IncorrectCompareToSignatureBad.cs:3:7:3:9 | Bad | Bad | IncorrectCompareToSignatureBad.cs:3:7:3:9 | Bad | Bad |
|
||||
| IncorrectCompareToSignature.cs:5:16:5:24 | CompareTo | The parameter of this 'CompareTo' method is of type 'T', but the declaring type does not implement 'IComparable<T>'. |
|
||||
| IncorrectCompareToSignatureBad.cs:5:16:5:24 | CompareTo | The parameter of this 'CompareTo' method is of type 'Bad', but the declaring type does not implement 'IComparable<Bad>'. |
|
||||
|
||||
Reference in New Issue
Block a user